Jump to content

[SOLVED] Textbox submits on Click but not Enter - new


marmite

Recommended Posts

Hi,

 

I thought that since IE4 it was default that textboxes would submit their information if focus was on the textbox and the user hit enter... however, when I hit Enter, the form resets itself and the information is not submitted. Any ideas why?

 

Thanks  ::)

 

				<form id="form1" name="form1" method="post" action="<?=$_SERVER['PHP_SELF']?>">
				<label><img src = "buttons/free_news.gif" > <br />
			  </label>
				<input name="email" type="text" id="email" onfocus="this.value = ''; this.onfocus = function () {}" value="E-mail address" size="15">
				</label>
				  <input type="submit" name="submit1" value="GO!" onclick="return validate(form1)">
			</form>

Link to comment
Share on other sites

I wonder whether my config settings are different, somehow...? The other problem (in the javascript forum area) also seems very odd - my dropdowns all reset to "All". And my text input doesn't work on Enter. Any chance they're connected, do you think?

Link to comment
Share on other sites

It's in there somewhere. So the dropdowns default to "All". Then someone selects "Birthday" and their selection should stay as "Birthday". But when I click apply, the value resets to "All". Even though I have now hardcoded the value to be "Birthday". The dropdown flashes "Birthday" briefly, but then it disappears and becomes "ALL" again.

 

Frustrated, of London

Emma

Link to comment
Share on other sites

Yes, that was helpful, thanks. It seems that it should work, but IE (4, according to the article) occasionally failed to submit on enter for a single text box, while working for several text boxes (!). Seems like a bug to me. If it's that broswer dependent, I'll have to leave it.

 

Maybe I'll give a pop-up if they hit enter, asking them to press the button instead. So much time for such a tiny thing...!

 

Thanks, tho

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.