• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Contact form error.

Newbie Spellweaver
Joined
Jul 5, 2011
Messages
15
Reaction score
0
Hello, i'm now making one Website of entertainment, i'm coding the Contact form right now, i've been coding this for about 2 hours, and now i've found 1 error.

I've made one Subject with multiple options, and one option is called "Other Problem" it will open one text bar behind the options that allow people to write what problem they are having that isn't current listed at the options made, but watch something weird happend.

aaaa - Contact form error. - RaGEZONE Forums

The first option, even if i delete that option, it will always allow people to write i want it to allow people to write only if people click " Other Problem "

JavaScript :

Code:
<script type="text/javascript">
function toggleElements(formObj,selectObj)
{
	formObj.elements["dateavail"].style.display = "none";
  {
 if(selectObj.value=='sendinfo' || selectObj.value=='inform')
 {

 }
	if(selectObj.value=='inform')
	{
		formObj.elements["dateavail"].style.display = "inline";
	}
	if(selectObj.value=='available')
	{
		formObj.elements["dateavail"].style.display = "inline";
	}
  }
	return false;
}


</script>


HTML Script :
Code:
      <tr>
                                <td>Subject :<br>
                                 <body onload="toggleElements(document.getElementById('contactform'));">
<div>
<select name="subject" onchange="toggleElements(this.form,this);" style="border: solid 1px #000;">
                                        <option value="Escolhe uma opção" class="active">Choose one option</option>
                                        <option value="Problemas no website">Problemas no website</option>
                                        <option value="Falha de canais">Falha de canais</option>
                                        <option value="Falha de Rádios">Falha de Rádios</option>
                                        <option value="Erros encontrados">Erros encontrados</option>
                                        <option value="Dúvidas">Dúvidas</option>
                                        <option value="available">Other problem?</option>
</select>
<br>
<label for="dateavail">Write another problem :</label>
<input type="text" name="dateavail" id="dateavail" value="<?=$_SESSION['post']['dateavail']?>" style="border: solid 1px #000;" />
</div>
</body>
</html>
                        </td>
                              </tr>


Ill wait one answer.
Thanks.
 

Attachments

You must be registered for see attachments list
Back
Top