Thinking more about this I guess what I need to know is in tapestry how
do I tell the browser on load that the proceed button(second button) is
to have the focus so that when someone hits the return key that is the
one activated instead of the first button?

<div align="right">

    <input type="submit" jwcid="@Submit" value="message:button-previous"
listener="ognl:listeners.previous" />

    <input type="submit" jwcid="@Submit" value="message:button-proceed"
listener="ognl:listeners.submit" />

</div>

since there is no button name how do I point it at the bottom one?

-----Original Message-----
From: Velarde, Domonic R. - WMD [mailto:[EMAIL PROTECTED]

Sent: Friday, June 10, 2005 10:15 AM
To: Tapestry users
Subject: about tapestry and the return key

I have a problem maybe can help?

 

I have a html page has some tapestry on it .  At the bottom of form I
have 2 buttons next to each other.  On says Go Back the other says
Proceed to next step.  

 

Above these are a few text fields for fill in info from client.  What is
happening is that if the client fills in text field and hits the enter
key instead of pressing the nice button at bottom the browser changed to
the first page as if it went back a page. 

 

I need it so if they hit return key it need to act as if they clicked on
the proceed button instead.  

 

Here is snippit of button code:

 

<div align="right">

    <input type="submit" jwcid="@Submit" value="message:button-previous"
listener="ognl:listeners.previous" />

    <input type="submit" jwcid="@Submit" value="message:button-proceed"
listener="ognl:listeners.submit" />

</div>

 

Now I have hunted around and found some javascript that is suppose to
submit form if return button clicked, here

http://www.cs.tut.fi/~jkorpela/forms/enter.html, but not working.  Plus
wondering how would the script know to use the:

 

<input type="submit" jwcid="@Submit" value="message:button-proceed"
listener="ognl:listeners.submit" />

instead of the top one which just does a back page thing instead of
submitting it?

 

Any help appreciated thanks

 

 

 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to