Re: Special Action Form
by "Frank Boumphrey" <bckman(at)ix.netcom.com>
|
| Date: |
Sun, 1 Dec 2002 11:12:38 -0500 |
| To: |
"Teajai Kimsey" <tkimsey(at)budgetwebsitedesign.com>, "Hwg" <hwg-techniques(at)hwg.org> |
| References: |
whc pieceoshit cox |
| |
todo: View
Thread,
Original
|
|
This is best done server side using a redirect....
However it can be done with clientside Java script but it is a bit of a
hack.
You need three forms:
<html>
<title>Javasript clientside hack</title>
<form name='fm1' >
<div>Which do you prefer, Microsoft ?
<input type='radio' name='quest' />
or Sun?<input type='radio' name='quest' />
<input type='button' value='go to site' onclick='sendtosite()' />
</div>
</form>
<form name='fm2' action='http://www.sun.com' >
</form>
<form name='fm3' action='http://www.microsoft.com' >
</form>
<script type='text/javascript'>
function sendtosite()
{
if(document.fm1.quest[0].checked==true)
{
document.fm3.submit();
}
else if(document.fm1.quest[1].checked==true)
{
document.fm2.submit();
}
else
{
alert("Please make a selection");
return 0;
}
}
</script>
</html>
----- Original Message -----
From: "Teajai Kimsey" <tkimsey(at)budgetwebsitedesign.com>
To: "Hwg" <hwg-techniques(at)hwg.org>
Sent: Saturday, November 30, 2002 7:01 PM
Subject: Special Action Form
> Hello all...
>
> I am sure someone knows the answer to this one...
>
> I need the script that makes a form take the person to a certain
destination
> based on the answer to a question. Example: yes -- visitor goes to page
a,
> no -- visitor goes to page b.
>
> What do I need to put in the form (I am using formmail) Or do I just use a
> complete javascript based program?
>
> Thanks for your help!
>
> Teajai Kimsey
> Managing Partner
> Beyond Web Design
> www.bwdesignservices.com
> 316.944.8700
> Websites From Concept to Completion and Beyond
>
>
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.