0
votes

http://validator.w3.org/check?uri=http%3A%2F%2Fwww.ualr.edu%2Facsindle%2Fjoin.html&charset=%28detect+automatically%29&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.2

site: www.ualr.org/acsindle/join.html

<script language="javascript" type="text/javascript"> 
function toggle() {
    var ele = document.getElementById("toggleText");
    var text = document.getElementById("displayText");
    if(ele.style.display == "block") {
            ele.style.display = "none";
        text.innerHTML = "+ Application";
    }
    else {
        ele.style.display = "block";
        text.innerHTML = "- Application";
    }
} 
</script>

<a id="displayText" href="javascript:toggle();">+ Application</a>
<div id="toggleText" style="display: none">
<h3>
<form action="scripts\contact.php" method="post">
Name:<br /><input type="text" name="name" /><br />
Pseudonym:<br /><input type="text" name="pseudonym" /><br />
Email:<br /><input type="text" name="email" /><br />
Age:<br /><input type="text" name="age" /><br />
Location:<br /><input type="text" name="location" /><br />
Past Games:<br /><textarea name="past_games" cols="40" rows="10"></textarea><br />
Current Games:<br /><textarea name="current_games" cols="40" rows="10"></textarea><br />
Why you're interested:<br /><textarea name="why" cols="40" rows="10"></textarea><br />
<input type="submit" value="Send"/>
<input type="reset" value="Clear"/>

</form>
</h3>

I also threw in the javascript I used for the show/hide. I don't understand why it's not validating. Thanks for your help guys!

2

2 Answers

2
votes

You can't have a FORM tag inside a H3 tag (why would you even want that?!).

2
votes

No HTML spec till date allows form tag to be inserted in h3 tag. If you want the h3 tag's css or styles to be transitioned to form elements, then enclose the texts individually in h3 tag.

Like : <h3>Name: </h3>