| | |
page validation
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Apr 2008
Posts: 78
Reputation:
Solved Threads: 0
I am having some more validation issues I have just added a search box to my page i did have it as xhtml strict and it was validating fine once i added this for it produced 50 errors then i changed the doc type to transitional now there are are only two errors it is saying there in no such attribute as onblur or onfocus??
I would really like to keep this as strict but when i keep it as strict there are three errors the two mentioned above and i also says that target="_self" is an invalid attribute.
Any ideas how i can fix this?
I would really like to keep this as strict but when i keep it as strict there are three errors the two mentioned above and i also says that target="_self" is an invalid attribute.
Any ideas how i can fix this?
HTML and CSS Syntax (Toggle Plain Text)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>APA</title> <link rel="stylesheet" type="text/css" href="css/main.css" /> <link rel="stylesheet" type="text/css" href="css/topmenu.css" /> <link rel="stylesheet" type="text/css" href="css/leftmenu.css" /> </head> <body> <div id="holder"> <div id="header"> <form action="./search.php" method="get" target="_self"> <table class="search"> <tr><td> <input type="hidden" value="SEARCH" name="action" /> <input type="hidden" value="en" name="lan" /> <input type="text" name="keyword" class="text" size="12" maxlength="30" value="" onFocus=" if (value == '') {value=''}" onBlur="if (value == '') {value=''}" /></td> <td><input type="hidden" value="50" name="limit" /> <input type="submit" value="Search" class="button" /> <input type="hidden" value="" name="case" /> <input type="hidden" value="1" name="extracts" /> <input type="hidden" value="25" name="perpage" /> </td></tr> </table> </form> </div>
javascript statements end in '
strict means you have to complete your javascripts,
not sure if it isnt supposed to be
coz I dont write strict, still in html 4.01 trans,
or is it
I have no idea
my javascript sux, incidentally so must yours,
else why 'If this field is blank set this field to blank' (twice)
target='_self' forms take action='self' w3.org-forms
self is redundant,
can be written as
; 'strict means you have to complete your javascripts,
HTML and CSS Syntax (Toggle Plain Text)
<input type="text" name="keyword" class="text" size="12" maxlength="30" value="" onFocus=" if (value == '') {value='';}" onBlur="if (value == '') {value='';}" /></td>
HTML and CSS Syntax (Toggle Plain Text)
<input type="text" name="keyword" class="text" size="12" maxlength="30" value="" onFocus=" if (self.value== '') {self.value='';}" onBlur="if (self.value == '') {self.value='';}" /></td>
or is it
HTML and CSS Syntax (Toggle Plain Text)
<input type="text" name="keyword" class="text" size="12" maxlength="30" value="" onFocus="JAVASCRIPT:if (self.value== '') {self.value='';}" onBlur="JAVASCRIPT:if (self.value == '') {self.value='';}" /></td>
my javascript sux, incidentally so must yours,
else why 'If this field is blank set this field to blank' (twice)
target='_self' forms take action='self' w3.org-forms
self is redundant,
can be written as
action='<?php echo $_SERVER['PHP_SELF']; ?>' (in php) and is equally redundant<form action=""> will get it back here Last edited by almostbob; Feb 10th, 2009 at 2:37 pm.
Failure is not an option It's included free
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it
Please mark solved problems, solved
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it
Please mark solved problems, solved
run the page at validator.w3.org..... and you can find out the code that has to be edited.. the comments provided are self explanatory.....
-onFocus onBlur
onfocus onblur are lower case keywords in xhtml
At least now I am certain, my javascript is terrible,
please what does setting the field blank if it is blank on mouseover mouseout accomplish
onfocus onblur are lower case keywords in xhtml
At least now I am certain, my javascript is terrible,
please what does setting the field blank if it is blank on mouseover mouseout accomplish
Failure is not an option It's included free
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it
Please mark solved problems, solved
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it
Please mark solved problems, solved
•
•
Join Date: Apr 2008
Posts: 78
Reputation:
Solved Threads: 0
thanks almostbob your last comment was perfect onfocus onblur have to be lower case. Yes you are right about my javascript it sucks I hate javascript. The php comment about using php_self well i thought about that before but action has to call search.php anyway thanks for that my page is validating 100% now
Failure is not an option It's included free
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it
Please mark solved problems, solved
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it
Please mark solved problems, solved
![]() |
Similar Threads
- Really Stuck - ASP/Javascript Form Validation (ASP)
- php login page problem (PHP)
- Page Onload problem (JSP)
- Page.IsPostBack (ASP.NET)
- .net validation/javascript conflict (ASP.NET)
- Simple ASP.Net Login Page (Using VB.Net) (ASP.NET)
- HTML validation problems (Search Engine Optimization)
Other Threads in the HTML and CSS Forum
- Previous Thread: Works in IE7 and looks terrible in Firefox and Safari
- Next Thread: CSS unaligned without scroll bar
| Thread Tools | Search this Thread |
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity css design development displayimageinsteadofflash dreamweaver emailmarketing epilepsy explorer firefox flash form format google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization pnginie6 positioning problem scroll seo shopping studio swf swf. textcolor timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7






