Yes sir! however you might wanna make sure and wait for another commenter to confirm this as I am not completely sure. Better yet, why don't you contact the iPage guys because they can answer you better...
Ahh that is true, but he never said anything about a image as the button, just a button..
Good catch goldi..
Ok, your both right. It doesn't happen automatically, but I'm not using an image as a button. I am however not submiting directly, but calling formHandler() first. Sorry, I guess I should have said all this before. I tried to implement that script you suggested goldilocks, but couldn't get it to work. Here's the relevant page code:.
Any further help welcome :0)..
You could have an onchange in the select tag and make it do what you want without the need of that button. so whenever you change the select statement it will open that page..
<select class="select" name="select" onChange="formHandler1();">..
Hi scoutt, thanks for that. Even so, I'm not sure. See, I think it would be a little confusing to have the select without the go, however, with the onChange event handler, there's no point it being there. No way of having the best of both ways?.
I cannot see where the user does any typing..
Are there some INPUT boxes not shown?.
Why would the user press <Enter> after selecting from a drop down?.
You could set the focus to the button when the value of the SELECT changes:.
<select class="select" name="select" onchange="this.form.button.focus()">.
But that's not natural behavior..
Also, you're gonna run into trouble with naming stuff like:.
<select class="select" name="select">..
I've got something, at least for Internet Explorer..
Add this script to the head tag:.
And then, add this attribute to every field in the form that you want to trigger form submit when hitting enter:.
It's ok in <input> fields, but I don't recommend to use it in textareas since people would submit the form if they'd hit enter for a carriage return when typing to the textarea...
Thanks for that jon, it works perfectly. Why do you have reservations about using this as a method? And why will I run into problems using the same name as class?.
Also, could you take a look at my other post about my menu script? not sure if it's ok or not - appreciate any advice on improvements (i.e. it'll name things the same as their class!).
Ta muchely, and thanks again,.
Oh, also, I modified the code you suggested slightly, by instead putting onchange="consultants.button.focus();", where consultants is the name of the form, and button the name of the button. How does the "this.etc" work? I see it quite a lot but don't understand what it's referring to, or how it works...
For instance, if you have.
<select name="select"> then how do you select this method via script? The normal answer is to use the select() method, but if you say form.select.select() then weird things will happen. You see it a lot when people name a button 'submit' <button name="submit">. Then, when they try to submit the form, by form.submit(), the browser complains - as you cannot execute a button!.
Get in the habit of prefixing the name by the element type, as in selSelect or btnSubmit..
Is a reference to the current object. In the case of a control (form element), then there will also be a.
Object, which is a reference to the parent form..