hwg-style archives | Sep 2000 | new search | results | previous | next |
Re: variable form actionby =?iso-8859-1?q?andy=20dunbar?= <krone9(at)yahoo.com> |
|
no hassle: if your form is called form1 like the following form: <html> <head> <script language="javascript"> function actionchange(){ if (document.form1.choice.value=="bill"){ document.form1.action = "javascript:alert('billgates(at)microsoft.com')" ; return true; } if (document.form1.choice.value=="george"){ document.form1.action = "javascript:alert('georgelucas(at)starwars.com')" ; return true; } alert('I do not know that person'); return false; } </script> </head> <body> Please enter 'bill' or 'george' to get that person's email<br> <form name="form1" action="javascript:alert('action has not been changed')" onsubmit="return actionchange()"> <input name="choice" value="bill" type="text"> <input type="submit" value="submit"> </form> </body> </html> hope that helps! @ndy __________________________________________________ Do You Yahoo!? Send instant messages & get email alerts with Yahoo! Messenger. http://im.yahoo.com/
HWG hwg-style mailing list archives, maintained by Webmasters @ IWA