/    Sign up×
Community /Pin to ProfileBookmark

Validation : One error left

I have set up y index page and have had a couple of problems, regarding validation for Doc Type xhtml strict 1.0 as I have a couple of ‘3rd party’ scripts on the page. There’s nothing i can do abouit that … so why even try.

However, I have one error left, which i would like to remove.

Error message is :-

Line 287, Column 9: required attribute “action” not specified

<form>

&#9993;

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>.

Code for section only

[CODE]
<form>
<div>
<input type=”image” src=”../cards/6.png” value=”Submit” alt=”Submit” onclick=”open_win()” />
</div>
</form>
[/CODE]

and the function script, in the head section is as shown here

[CODE]
<script type=”text/javascript”>
function open_win()
{
window.open(“apple1.html”,”_blank”,”toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=540, height=200″);
}
</script>
[/CODE]

I know very little about javascript. Do i actually need it in this instant.

I just want users to click on an image, in this case, a playing card picure, to take them to a new smaller window.

thanks for any input

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@KorJun 08.2010 — 
Line 287, Column 9: required attribute "action" not specified
[/QUOTE]

Show us the HTML code for the form attribute. maybe it has no action attribute. On the other hand, an image button acts like a submit button and it will submit the form anyway, regardless the javascript functions you may have called onclick, unless you return false that:
<i>
</i>&lt;form action="" onsubmit="return false"&gt;
Copy linkTweet thisAlerts:
@WilliebeeauthorJun 08.2010 — Thanks for the information Kor

I replaced my <form> line with yours, checked the page and it still works.

Checked validation and all 100% and 'Green Light'

Initially, there were 53 errors, but I had removed the commenting out tags around the 2 pieces of 3rd part code.

Just as a matter of interest, that code is here

[CODE]
<object width="170" height="545"><param name="movie" value="http://www.recyclenow.com/swf/recyclenow_08/SidebarWidget.swf"></param><param name="allowscriptaccess" value="always"></param>
<param name="flashvars" value="widgetBackgroundColor=FFeace"></param><embed src="http://www.recyclenow.com/swf/recyclenow_08/SidebarWidget.swf" type="application/x-shockwave-flash" allowscriptaccess="always" width="170" height="545" flashVars="widgetBackgroundColor=FFeace"></embed><p>Find out what you can recycle at <a href="http://www.recyclenow.com">Recyclenow</a></p></object>
[/CODE]

[CODE]
<script language="JavaScript" type="text/javascript">
document.write('<script language="JavaScript" src="http://www.myweather2.com/Plugins/weather/general.ashx?type=js&n=1&t=24&x=f1_day&inc=False&w=230&h=200&headerbgcolor=284252&headertextcolor=&temp_unit=1&windspeed_unit=1&puref=9e7dffd0-1b50-4210-b154-c112bf002650&cb=' + Math.random() + '" type="text/javascript"></scr' + 'ipt>');
</script><noscript><a href="http://www.myweather2.com/City-Town/United-Kingdom/Newcastle.aspx" title="Our Geordie Weather">Newcastle weather forecast from Weather2</a></noscript>
[/CODE]


As I said in my original posting, there's nothing I have done wrong ... so why get paranoid about the validation. My bit is fine, after your help of course.

Cheers !!
Copy linkTweet thisAlerts:
@KorJun 08.2010 — 
Just as a matter of interest, that code is here
[/QUOTE]

Just a matter of interest, [I]that[/I] is not what could be of interest. We expect to see the HTML code.

On the other hand... just a question: do you know JavaScript language? At least the basis?
×

Success!

Help @Williebee spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...