Need help with html....

For system help, all hardware / software topics NOTE: use Coders Corner for all coders topics.

Moderators: Krom, Grendel

Post Reply
sonyusa
DBB Captain
DBB Captain
Posts: 577
Joined: Sat Jan 01, 2000 3:01 am
Location: ATL Ho

Need help with html....

Post by sonyusa »

Can you guys take a look at this page and see what i need to edit to get the form to work? when i click submit it doesnt do anything....thanks. link
User avatar
Tyranny
DBB Defender
DBB Defender
Posts: 3399
Joined: Sun Nov 10, 2002 3:01 am
Location: Phoenix, Arizona

Post by Tyranny »

I don't see a specific address where the form is supposed to send the information to, but then again it's early and I haven't been up for very long so *shrug*.

If the form doesn't know where to send the information it usually wont do anything.
User avatar
DCrazy
DBB Alumni
DBB Alumni
Posts: 8826
Joined: Wed Mar 15, 2000 3:01 am
Location: Seattle

Post by DCrazy »

I think your javascript is killing it. You can't just access MyForm as if it were a Javascript variable, as you seem to be doing. You need to use <tt>document.all["MyForm"]</tt> on IE, and <tt>document.getElementByID("MyForm")</tt> on NS/Mozilla. You also need to change the <tt>name="MyForm"</tt> to <tt>id="MyForm"</tt> for this to work (and also be HTML4.01-strict compliant).

Here is a short piece of code you can stick at the beginning of your <SCRIPT> to (hopefully) get it to work:

<pre>
if(document.layers)
{
MyForm = document.getElementByID("MyForm");
}
else if(document.all)
{
MyForm = document.all["MyForm"];
}
else
{
// Could not determine the user's browser
}
</pre>
Post Reply