Reply
Submit form after pressing Return
Old 08-21-2005, 11:58 AM Submit form after pressing Return
Junior Talker

Posts: 1
Hi
I have a following problem. I have two submits in one form:
<td>
<input type="submit" name="dispatch" value="back">
</td>
<td>
<input type="submit" name="dispatch" value="forward">
</td>
When I press Return on Keyboard the form is submitted by first tbutton(value="back"). I would like that after pressing Return it would submit by second button(value="forwar"). How to do that? How to intercept pressing a Return on Keybord?
wieza is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 08-21-2005, 01:28 PM
pushedtomb's Avatar
Super Talker

Posts: 100
Name: Nathen
Location: Casnewydd, De Cymru, UK
*not tested*

Code:
<script language="javascript">
function back()
{
javascript:history.back(1)
}</script>
<form action="yourfile here" method="enter your method get or post" name="name of your form">
<!--rest of form here -->
<input type="button" name="dispatch" value="back" onClick="back()">
<input type="submit" name="dispatch" value="forward">
</form>
__________________
..::Pushedtomb.co.uk::..

Quote:
- "I've often wondered how MS can say that other software "isn't compatible" with MS when MS stuff isn't even compatible with other MS stuff" - quote from Daily Thing.com
pushedtomb is offline
Reply With Quote
View Public Profile Visit pushedtomb's homepage!
 
Reply     « Reply to Submit form after pressing Return
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11380 seconds with 13 queries