Chomauk
Programmer
- Jun 8, 2001
- 130
I have two buttons, one for downloading and the other to print the page. After I finished writing the code(which works) I decided to validate it all using the W3C Markup Validation Service and I got this message:
Line 151, column 5: required attribute "ACTION" not specified
<form>
The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.
Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.
Here is my code:
I understand the message and I've tried different combinations and searched Google for help to get it to work AND validate but no luck. Now, once again I ask you, the fine people of Tek-tips to help me solve this problem.
thanks
"In great attempts it is glorious even to fail."
either Unknown or Vincent Thomas "Vince" Lombardi
Depends on what source you find
Line 151, column 5: required attribute "ACTION" not specified
<form>
The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.
Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.
Here is my code:
Code:
<form>
<input type="button" value="Download"
onclick="document.location.href='[URL unfurl="true"]http://www.somewetsite.com/aword.doc'">[/URL]
<SCRIPT LANGUAGE="JavaScript">
if (window.print)
{
document.write('<input type=button name=print value="Print" '
+ 'onClick="javascript:window.print()">');
}
</script>
</form>
thanks
"In great attempts it is glorious even to fail."
either Unknown or Vincent Thomas "Vince" Lombardi
Depends on what source you find