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>

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?

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.