FRIHOSTFORUMSSEARCHFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Proprietary attribute warning

 


inphurno
I get the following warning from a search from on my page when I use the HTML Tidy validator in firefox:

line 218 column 1 - Warning: <input> proprietary attribute "action"
line 218 column 1 - Warning: <input> proprietary attribute "columns"
line 218 column 1 - Warning: <input> proprietary attribute "autocomplete"
line 218 column 1 - Warning: <input> proprietary attribute "delay"

the section of code in question is:
<input type="text" name="query" id="query" size="20" value="" action="search/include/js_suggest/suggest.php" columns="2" autocomplete="on" delay="2000" />

when I do "cleanup this page" I get this:
<input type="text" name="query" id="query" size="20" value="" action="search/include/js_suggest/suggest.php" columns="2" autocomplete="on" delay="2000">

I which is weird since the attributes which Tidy was complaining about are still there after cleanup! Does anyone know how to get rid of these warnings? Any help would be greatly appreciated! Very Happy
jmraker
The "HTML Validator" plugin for firefox lets you hide warnings/errors and has a checkbox to turn off all warnings.

The best way to get rid of the warnings is to fix them.
Diablosblizz
Basically what it is saying is that the attributes that you have on the input (being action, columns, autocomplete, delay) are not valid attributes. They're not doing any harm, but are wasteful code that do nothing. Remove them, and see what happens.
imagefree
use:

Code:
<form action="search/include/js_suggest/suggest.php" method="post">
     <input type="text" name="query" id="query" size="20" value="" />
</form>


you are using columns="2", while the correct is 'size' that you have already used. If you want to limit the number of characters, you should use maxlength="2".
'size' defines the width of input box while 'maxlength' defines maximum characters input.
inphurno
jmraker wrote:
The "HTML Validator" plugin for firefox lets you hide warnings/errors and has a checkbox to turn off all warnings.

The best way to get rid of the warnings is to fix them.


haha thanks, thats eactly why i posted this question!

Diablosblizz wrote:
Basically what it is saying is that the attributes that you have on the input (being action, columns, autocomplete, delay) are not valid attributes. They're not doing any harm, but are wasteful code that do nothing. Remove them, and see what happens.


Yes I understand they do nothing in FF but they are there for IE so I dont think removing them without replacing them with something valid is a good idea.

imagefree wrote:
use:

Code:
<form action="search/include/js_suggest/suggest.php" method="post">
     <input type="text" name="query" id="query" size="20" value="" />
</form>


you are using columns="2", while the correct is 'size' that you have already used. If you want to limit the number of characters, you should use maxlength="2".
'size' defines the width of input box while 'maxlength' defines maximum characters input.


I will try this but I don't think restricting the search tool down to 2 characters is going to make it too usable Sad
inphurno
it doesn't seem like anyone knows valid alternatives for these attributes: "action", "columns", "autocomplete" and "delay". so i think what i can do is use php to add or remove the attribues based on the given user agent. just plain out removing them doesnt make sense to be but i'll try this and do some testing, then i'll let you guys know.. thanks for all the suggestions! Smile
Marcuzzo
Hi,

the <input> Element doesn't have the attributes "action", "columns" or "delay".
"autocomplete" seems to be an attribute of the imput element but it isn't valid xhtml.
but this one was a work around. check below

check http://www.zvon.org/xxl/xhtmlReference/Output/index.html

1. Action
this is an attribute of the form Element, you use it to send input to another page or even the same page if you want to
Code:

   <form action="http://www.google.com/search" method="get">
      <p>
         <input type="text" name="q" value="" />
         <input type="submit" value="submit form" />
      </p>
   </form>


2. Colums
I never used this one but a quick search on google shows that this is an attribute of the "data" element.
http://www.millisecond.com/support/docs/v3/html/language/attributes/columns.htm
can't help you with this one

3. Autocomplete.
this needs a small hack to be valid.

Code:

   <!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Valid Attributes</title>
<script type="text/javascript">
<!--
window.onload=function(){
f = document.getElementById("name");
f.setAttribute("autocomplete", "on");
}
-->
</script>
</head>
<body>
   <form id="ok" action="">
      <p>
         <input id="name" name="name" value="" type="text" />
         <input type="submit" onclick="alert(this.form.name.value);" value="ok"  />
      </p>
   </form>
</body>
</html>


4. Delay.
I couldn't find anything on this attribute.
where did you get that one from?


I hope this helps you out
Related topics

Styling <abbr> in IE
Warning System?
Report button/Warning System/Deal with tide of crud
Da Vinci Code
Warning Emails

the earthquake in pakistan
inactivity warning
preview my site
Warning, you chasis has been opened!!
Heat Gun Wins Wacky Warning Label Contest

Second Inactivity Warning?
credits reducing - is there a warning?
Opera 9.0 Technology Preview 2
Scientists said Coke and Pepsi need health warning labels
Warning: mysql_connect(): Client does not support authentica
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.