View Single Post
 
Old December 7th, 2006, 07:42 PM
mat41 mat41 is offline
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

FYI: You need to name your 'name' and 'email' input type fields uniquely. They can not both be called region1 and post independent values - I assume you are going to post your form?

I assume you posted part of your page, there are some fundamental HTML tags missing from your page. Anyhow, this will work for you:

---------------------cut n paste---------------------
<html><head></head><body bgcolor=ECECEC>
<br><br>
<script type="text/javascript">
function HideOrShowStuff(controlToHide)
{
   if (document.getElementById)
   {
      document.getElementById('n').disabled=true
      document.getElementById('e').disabled=true
      if(controlToHide==2)
      {

      }
      else
      {
         document.getElementById('n').disabled = false;
         document.getElementById('e').disabled = false;
      }
    }
    else
    {
        alert('Sorry, your browser doesn\'t support this');
    }
}

</script>
<form METHOD=post ACTION="/cgi-sys/FormMail.cgi">
Recipient: <select name="recipient" width=20>
<option value="blah@blah.com">Blah 1</option>
<option value="blah@blah.com">Blah 2</option>
</select><br><br>
Anonymous: <input name="anonymous" type="radio" value="Yes" onclick="HideOrShowStuff(2)"/>Yes
<input name="anonymous" type="radio" value="No" onclick="HideOrShowStuff(1)"/>No<br>
Name: <input name="name" id="n" disabled type="text" size="29" /><br>
Email:&nbsp; <input name="name" id="e" disabled type="text" size="29" />
<br>
<br>
<input type=text name="subject"><br>
<input type=text name="email"><br>
<input type=text name="realname"><br>
<INPUT type="Submit" value="Submit">
</form>

-----------------------------------------------------

Wind is your friend
Matt