Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

submit button not default..

Status
Not open for further replies.

Tracey

Programmer
Oct 16, 2000
690
NZ
Hi i have a form:

Code:
<form name=addprov onSubmit="return submitonce()" action="[URL unfurl="true"]http://aphrodite/cgi-bin/osmos.exe/maintprovpost">[/URL]
<input type=hidden name=id value="29">
<input type=hidden name=personid value="">
<input type=hidden name=record value="">
<input type=hidden name=from value="">
<input type=hidden name=skill value="">
<tr bgcolor="#98A5FC"> 
                <td bgcolor="#FFFFCC"> 
                  <input type="text" name="newprov" size="40">
                  <input type="submit" class=ListButton onMouseOver="this.className='hoverListButton'" onMouseOut="this.className='ListButton'" name="Save" value="Add">
                  <input type="reset" class=ListButton onMouseOver="this.className='hoverListButton'" onMouseOut="this.className='ListButton'" name="Cancel" value="Cancel">
                </td>
              </tr>
</form>

when i fill text into newprov and hit the enter key, i would expect the same behaviour as if i had used the mouse to click the button. However this is not happening. Can anyone clarify what i am doing wrong here?

cheers [cheers]

Tracey

Tracey
Remember... True happiness is not getting what you want...

Its wanting what you have got!
 
Well, seems it might be a bizaar IE thing. Apparently if only one input=text on the form, the name/value pair is not sent on enter, but if you have more than one input=text the name/value pair IS sent. Typical M$

I have now added a hidden input=text and now it works fine.

Tracey
Remember... True happiness is not getting what you want...

Its wanting what you have got!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top