Form Woes !
8 Message(s) by 3 Author(s) originally posted in javascript
| From: Leon |
Date: Tuesday, February 13, 2007
|
Hi Chaps,
I've been looking around the internet and I really can not see what I'm
doing wrong here !
This
code works in firefox, but not internet explorer.
Any suggestions please?
Internet Explorer just doesnt update the action
of the form so when you
hit the
button - it seemingly just refrehes the
page!
<form name="actions" action="" method="post">
<select name="action" 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
Activation Email
<option value="deletaccount"
onclick="this.form.action.value='./admin_process.php?a=delete';">Delete
This Account
</select>
<input class="formBox" type="submit" name="submit" value="Go">
</form>
Thanks,
Leon
| From: VK |
Date: Tuesday, February 13, 2007
|
wrote in message:
Hi Chaps,
I've been looking around the internet and I really can not 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
list ener for option
element isn't 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>
| From: Leon |
Date: Tuesday, February 13, 2007
|
wrote in message:
wrote in message:
Hi Chaps,
I've been looking around the internet and I really can not 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.
Yeah - I noticed this already and updated - thanks :-)
As a side comment: onclick listener for option element isn't 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.
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>
?
<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>Thanks,
Leon
| From: VK |
Date: Tuesday, February 13, 2007
|
wrote in message:
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'll save a lot of nerves to them.
| From: Leon |
Date: Tuesday, February 13, 2007
|
wrote in message:
wrote in message:
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'll 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;
}
</script>
<form name="test" action="" method="post">
<select name="myselect" action="" method="post"
onchange="myfunction(this.options[this.selectedIndex].value)">
<option value="admin_process.php?a=resend">Resend
</select>
<input class="formBox" type="submit" name="submit" value="Go">
</form>
Leon
| From: VK |
Date: Tuesday, February 13, 2007
|
wrote in message:
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 don't 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();
}
| From: Leon |
Date: Tuesday, February 13, 2007
|
wrote in message:
wrote in message:
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 don't 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();
}
oops that submit shouldnt have been in there - was just me
testing to
see if I could update the submit button value.
I will give it a go and report !
Thanks,
Leon
| From: Randy Webb |
Date: Tuesday, February 13, 2007
|
Leon said the following on 2/13/2007 3:43 PM:
wrote in message:
wrote in message:
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'll 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;
}
document.test.action=gourl
--
Randy
Chance Favors The Prepared Mind
comp.lang.JAVAscript
FAQ -
http://jibbering.com/faq/index.html
JAVAscript Best Practices -
http://www.JAVAscriptToolbox.com/bestpractices/
Answer:It destroys the order of the conversation
Question: Why?
Answer: Top-Posting.
Question: Whats the most annoying thing on Usenet?
Next Message: extract dynamic IP number from router
Blogs related to Form Woes !
Webservice Woes
I have a cfc that processes
form data, if the user chose "Test" it will just hit
... call the same cfc on a remote server as a ws and post the
form data there.
... have attempted to dereference a scalar variable of type class
java.lang.
...
ST Telemedia rides out Indonesian woes
One was that a politically connected Indonesian telecommunications company was in talks with a cash-rich foreign player to
form a partnership.
... which currently operates only in some cities on
Java island, a licence to operate
...
[TSE] Rapid Web Application Development with Rob Harrop
JSP
form tags: Creating
forms in Spring 1.* was painful.
... Spring 2.0 introduces new <
form:*/> tags. These tags are much easier to read and write.
... For example, how do you call methods in a dynamic object from
Java.
...
Listernerstart woes [again!]
... command_link anchors will have javascript code that submits the corresponding form. ... http://java.sun.com/jsp/jstl/core ...
More Visual Studio Woes
This error message is given in the form of a little popup finger of happiness to all our developers daily, thanks so much Microsoft for all your quality control and ... It is little wonder we are all looking to jump ship to Sun and Java.
XML woes
I'm currently working with SVG files, which (in case you didn't know) are vector graphics stored in XML form. ... Unfortunately, in actuality (Java) I also need things like a resource descriptor, a document factory, a svg generator ...