[thelist] Js change mailto
fstorr
fffrancis at fstorr.demon.co.uk
Sat Sep 28 11:41:04 CDT 2002
One thing I would suggest is something like this:
function formcheck()
{
if (!document.forms["letter1"].useragent.checked)
{
document.forms["letter1"].action="mailto:normal at foo.com";
return;
}
document.forms["letter1"].action="mailto:urgent at foo.com";
}
This saves you on the else clause. Its picky I know, but someone once
told me this was the "proper" way to do things (I believe he had a C
background)..anyway, I liked the idea and use it myself - its merely a
suggestion.
_________________________
Hi Tom
Thanks for that - I knew there'd be a way to get rid of the else bit.
Cheers.
Another question: How can I alter a link in that form? I've got this:
document.links["addresscheck"].href="mailto:urgent at foo.com";
Which works fine in NS but doesn't want to play in IE. I'm playing with
instead of changing the action of the form to changing the value of a
link.
Cheers
F
More information about the thelist
mailing list