[thelist] Js change mailto

Karen J. Bowen lists at miinx.com.au
Sat Sep 28 10:33:00 CDT 2002


fstorr wrote:
> I'm trying to change a mailto address depending on whether a checkbox is
> checked or not.
>

Hi Francis,

Try this:

---- js: ----

function formcheck() {
   if (document.forms["letter1"].useragent.checked)
     document.forms["letter1"].action="mailto:urgent at foo.com"
   else
     document.forms["letter1"].action="mailto:normal at foo.com"
}


---- form code: ----

<form name="letter1" action="mailto:normal at foo.com">
	<input type="checkbox" name="useragent" onclick="formcheck();">
</form>


hth
Karen
-------
Miinx Design & Development
e :: karen at miinx.com.au
p :: 0413.880.302
w :: www.miinx.com.au





More information about the thelist mailing list