|
Form Tricks #3: Forms that
Dynamically Change Action
There are some clever tactics programmers can apply
when dealing with forms. They have their drawbacks and should be used sparingly.
Some forms need to vary their action.
filename=/learn/test/FormActionChange.asp
<html><head>
<title>FormTextBox.asp</title>
</head><body bgcolor="#FFFFFF">
<Form name="profile" action = "profilerespond.asp" method="post">
Fill Out This Form For Us:<p>
First Name <Input NAME="NameLast" size ="10"><br>
Last Name <Input NAME="NameLast" size ="10"><br>
<a href="Javascript:army()">Join Army</a>
<a href="Javascript:navy()">Join Navy</a>
<a href="Javascript:marines()">Join Marines</a>
</form>
</body></html>
<form name=myform>
</form>
<script language =javascript>
function army(form)
{
document.myform.action="joinarmy.asp"
document.myform.submit()
}
function navy(form)
{
document.myform.action="joinnavy.asp"
document.myform.submit()
}
function marines(form)
{
document.myform.action="joinmarines.asp"
document.myform.submit()
}
</script>
 |  |  |
 |
There are many worthy charities!!. But perhaps help starving children in Africa or South America AND help Charles too.
a $5 tip buys him lunch at McDonalds,
a $20 tip buys his kid Hitoshi a new computer game,
a $39 tip buys his daughter Michiko a few nice outfits.
See our donor list.
|  |
 |  |  |
|
|
|
|