marmite Posted March 15, 2007 Share Posted March 15, 2007 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 https://forums.phpfreaks.com/topic/42837-solved-textbox-submits-on-click-but-not-enter-new/ Share on other sites More sharing options...
fenway Posted March 15, 2007 Share Posted March 15, 2007 That is only for text inputs, AFAIK. Link to comment https://forums.phpfreaks.com/topic/42837-solved-textbox-submits-on-click-but-not-enter-new/#findComment-207982 Share on other sites More sharing options...
marmite Posted March 15, 2007 Author Share Posted March 15, 2007 Sorry, I don't understand, on two counts: 1) I am using a text input, so it should work, right? 2) "AFAIK" ? Thanks Link to comment https://forums.phpfreaks.com/topic/42837-solved-textbox-submits-on-click-but-not-enter-new/#findComment-208003 Share on other sites More sharing options...
fenway Posted March 15, 2007 Share Posted March 15, 2007 Sorry, I heard textarea... and "as far as I know". Link to comment https://forums.phpfreaks.com/topic/42837-solved-textbox-submits-on-click-but-not-enter-new/#findComment-208024 Share on other sites More sharing options...
marmite Posted March 15, 2007 Author Share Posted March 15, 2007 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 https://forums.phpfreaks.com/topic/42837-solved-textbox-submits-on-click-but-not-enter-new/#findComment-208038 Share on other sites More sharing options...
fenway Posted March 15, 2007 Share Posted March 15, 2007 I dont' know what you mean by reset... I guess it's in the other thread. Link to comment https://forums.phpfreaks.com/topic/42837-solved-textbox-submits-on-click-but-not-enter-new/#findComment-208125 Share on other sites More sharing options...
marmite Posted March 15, 2007 Author Share Posted March 15, 2007 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 https://forums.phpfreaks.com/topic/42837-solved-textbox-submits-on-click-but-not-enter-new/#findComment-208133 Share on other sites More sharing options...
fenway Posted March 15, 2007 Share Posted March 15, 2007 Well, let's keep that discussion to that thread, or it'll get too confusing... Link to comment https://forums.phpfreaks.com/topic/42837-solved-textbox-submits-on-click-but-not-enter-new/#findComment-208134 Share on other sites More sharing options...
marmite Posted March 15, 2007 Author Share Posted March 15, 2007 OK, although it could equally fall in html as javascript. Any thoughts on this issue? Textbox should default to submitting on Enter. Mine doesn't. Any clues? Thanks Emma Link to comment https://forums.phpfreaks.com/topic/42837-solved-textbox-submits-on-click-but-not-enter-new/#findComment-208138 Share on other sites More sharing options...
fenway Posted March 15, 2007 Share Posted March 15, 2007 This article should provide some insight. Link to comment https://forums.phpfreaks.com/topic/42837-solved-textbox-submits-on-click-but-not-enter-new/#findComment-208241 Share on other sites More sharing options...
marmite Posted March 16, 2007 Author Share Posted March 16, 2007 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 https://forums.phpfreaks.com/topic/42837-solved-textbox-submits-on-click-but-not-enter-new/#findComment-208710 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.