![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi Chaps, I have been looking around the internet and I really can't see what I'm doing wrong here ! This code works in firefox, but not internet explorer. |
#3
| |||
| |||
|
|
On Feb 13, 10:22 pm, Leon <l... (AT) dontcallmeeeore (DOT) co.uk> wrote: Hi Chaps, I have been looking around the internet and I really can't see what I'm doing wrong here ! This code works in firefox, but not internet explorer. IE has a severe name resolution flaw in forms. btw thanks for remainding - for records I gonna check if this ugliness was finally fixed in IE7 (1:10 by my estimate :-( For the time being NEVER EVER name form controls same names as default attributes and methods of form itself. |
|
As a side comment: onclick listener for option element is not a documented feature, so some browsers may implement it and some not. select onchange="myfunction(this.options[this.selectedIndex].value)" is the universally supported alternative. |
|
form name="actions" action="" method="post" select name="MyAction" class="formBox" option value="null" onclick="this.form.action.value='';">Select Action From List option value="resendActEmail" onclick="this.form.action.value='./ admin_process.php?a=resend';">Re-Send ... /select input class="formBox" type="submit" name="MySubmit" value="Go" /form |
#4
| |||
| |||
|
|
would i need to make the value of each option equal to the URL i want it to go to then ? Eg.. select name="myselect" action="" method="post" onchange="myfunction(this.options[this.selectedIndex].value)" option value="admin_process.php?a=resend">Resend /select |
#5
| |||
| |||
|
|
On Feb 13, 11:21 pm, Leon <l... (AT) dontcallmeeeore (DOT) co.uk> wrote: would i need to make the value of each option equal to the URL i want it to go to then ? Eg.. select name="myselect" action="" method="post" onchange="myfunction(this.options[this.selectedIndex].value)" option value="admin_process.php?a=resend">Resend /select Yes. There is an usability impact in either case - because of bias against keyboard users. On come UAs onchange fired on each scroll using arrow keys. On other UAs onchange is fired if Enter is pressed with select having focus. That means that users have to use mouse to be able to scroll, and still a danger of an "occasional navigation" is rather high. I'm sure youselve at least once navigated on some site while simply studying the list of options. IMHO - but yours of decide of course - "active select" is a sample of intended convenience which is on practice a big disconvenience. A nice confirmation button near of "passive select" will require one extra click from your users but it will save a lot of nerves to them. |
#6
| |||
| |||
|
|
I tried to implement your suggestion - with no luck ! script language="javascript" function myfunction(gourl) { document.test.submit.value=gourl; } |
#7
| |||
| |||
|
|
On Feb 13, 11:43 pm, Leon <l... (AT) dontcallmeeeore (DOT) co.uk> wrote: I tried to implement your suggestion - with no luck ! script language="javascript" function myfunction(gourl) { document.test.submit.value=gourl; } submit is method, not a field. function myfunction(gourl) { document.forms['test'].action = gourl; document.forms['test'].submit(); } On cold turkey I do not remember if all browsers are smart to resolve the partial URL against the current page URL. In case if make a complete URL yourself: function myfunction(gourl) { document.forms['test'].action = "http://www.foo.bar/" + gourl; document.forms['test'].submit(); } |
#8
| |||
| |||
|
|
VK wrote: On Feb 13, 11:21 pm, Leon <l... (AT) dontcallmeeeore (DOT) co.uk> wrote: would i need to make the value of each option equal to the URL i want it to go to then ? Eg.. select name="myselect" action="" method="post" onchange="myfunction(this.options[this.selectedIndex].value)" option value="admin_process.php?a=resend">Resend /select Yes. There is an usability impact in either case - because of bias against keyboard users. On come UAs onchange fired on each scroll using arrow keys. On other UAs onchange is fired if Enter is pressed with select having focus. That means that users have to use mouse to be able to scroll, and still a danger of an "occasional navigation" is rather high. I'm sure youselve at least once navigated on some site while simply studying the list of options. IMHO - but yours of decide of course - "active select" is a sample of intended convenience which is on practice a big disconvenience. A nice confirmation button near of "passive select" will require one extra click from your users but it will save a lot of nerves to them. There are only actually 2 users who will be using the select boxes, one is myself. The problem is - I use Firefox, the other guy uses Internet Explorer ! I tried to implement your suggestion - with no luck ! script language="javascript" function myfunction(gourl) { document.test.submit.value=gourl; } |
![]() |
| Thread Tools | |
| Display Modes | |
| |