W3C home > Mailing lists > Public > www-forms@w3.org > November 2007

Need help with XForms

From: Carlos NarvŠez <crakup@gmail.com>
Date: Fri, 23 Nov 2007 14:07:37 -0600
Message-ID: <e660b2250711231207w3e618bdelf526580c7501c220@mail.gmail.com>
To: www-forms@w3.org

Hi, i'm having some problems with my html form, this is what i have:


<form>
<input type="button" value="Agree" onClick="location.href='admit.html'">
<input type="button" value="Disagree" onClick="location.href='deny.html'">
</form>

Just 2 buttons that redirect the user when pushed.

I went to a w3 tutorial and have looked over the button section but
can't seem to get it right.

I added this to the html tag,

<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://www.w3.org/2002/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events">

I added this to the head,

<f:model>
<f:submission action="http://example.com/home.php" method="get" id="s"/>
</f:model>

I added this to the body,

<f:trigger>
<f:label>Agree</f:label>
<f:script ev:event="DOMActivate" type="text/javascript"><!--
onClick="location.href='agree.html'"; --></f:script>
</f:trigger>

It only prints out the text Agree, no button.

Any help will be much appreciated.

-- 
Carlos NarvŠez
http://www.aderezame.com
Received on Friday, 23 November 2007 20:08:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:11 GMT