What's the proper structure for forms?
This is my code:
<form action="search.php" method="post" id="search">
<input type="hidden" name="forumchoice" value="- 1" />
<input type="hidden" name="searchin" value="subject" />
<input type="hidden" name="searchdate" value="-1" />
<input type="hidden" name="action" value="simplesearch" />
<input type="hidden" name="booleanand" value="yes" />
<input type="hidden" name="s" value="$session[sessionhash]" />
<input class="searchinput" onFocus="this.value='';"
onBlur="if (this.value=='') {this.value='Search for...';}"
type="text" name="query" value="Search for..." size="14" />
<input type="image" src="$stylevar[imgdir_misc]/navgraphics/go.gif"
alt="$vbphrase[search]" />
</form>
timjpriebe posted this at 19:18 — 22nd December 2005.
He has: 2,667 posts
Joined: Dec 2004
I believe they just need to be enclosed in a tag for it to validate. The form needs to be a part of something, instead of just hanging out there. In this case, a paragraph would probably work best.
But hey, who cares about validation?
Tim
http://www.tandswebdesign.com
Megan posted this at 19:23 — 22nd December 2005.
She has: 11,421 posts
Joined: Jun 1999
I tried to enclose the whole thing in a p and it didn't work (if I remember right...). Does it need to be inside the form tags, is that it???
And I care about validation!
Megan
Connect with us on Facebook!
Renegade posted this at 23:35 — 22nd December 2005.
He has: 3,022 posts
Joined: Oct 2002
What about the tag?
demonhale posted this at 01:29 — 23rd December 2005.
He has: 3,278 posts
Joined: May 2005
and you already have a form tag...
Roo posted this at 04:38 — 23rd December 2005.
She has: 840 posts
Joined: Apr 1999
Perhaps because your onblur and onfocus contains uppercase charecters?
Renegade posted this at 07:56 — 23rd December 2005.
He has: 3,022 posts
Joined: Oct 2002
Oh yeah, didn't see those. That'll be it. They need to be lower case...
Megan posted this at 14:37 — 23rd December 2005.
She has: 11,421 posts
Joined: Jun 1999
So that would be causing the nesting error???? I need to take those out anyway but the functionality needs to be built elsewhere. Will try that and see but I'm rather skeptical. OnFocus and OnBLur are throwing erorrs themselves (but I know how to solve that one! Jeeves!).
Megan
Connect with us on Facebook!
Roo posted this at 20:56 — 23rd December 2005.
She has: 840 posts
Joined: Apr 1999
I once drove myself nuts trying to get a bit of script to validate. It had some uppercase chaerters like that. I spent three days going crazy, because the validator will not retrun an error that tells specfically that when something is written likeThis that you need all lowercase. I wish it would. I've seen something so simple like that throw an entire page into errors. I finally figured it out myself, but was right on the edge of insanity before I did.
Roo
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.