View Single Post
Old 04-01-2004, 11:13 AM  
aiken
Confirmed User
 
Join Date: Jun 2003
Location: Kona, HI
Posts: 204
This is off the top of my head and hand-typed, so probably won't work as is (and definitely needs the usual browser-compatible approach to getElementByID). But the principle is what you want, I think.

Apologies for the color coding; GFY doesn't respect the code tag like it does the php tag. And a few words tweaked to avoid hahahaha-age.

PHP Code:
<div id="errormsg"&nbsp;</div>
<
for_m name=myform action="whatever" method="get">
hahahahahahaha type=text name="checkme">
hahahahahahaha type=submit value="Submit" onclick="if (documen_t.forms.myform.checkme = = 'bad') {documen_t.getElementByID('errormsg').innerHTML='You entered an invalid value'; return false;">
</
form
Cheers
-b
__________________
ICQ: 12005327
aiken is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote