Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
onload validation problem
Old 06-05-2007, 02:17 PM onload validation problem
Junior Talker

Posts: 3
Name: Daniel
Trades: 0
Hi folks,
Im trying to get the following section of code to validate. However I have no idea what is wrong with it..

Code:
<a href="#" target="_blank" onclick="openLiveHelp(); return false"><img src="http://www.mydomain.co.uk/livehelp/include/status.php" id="LiveHelpStatus" name="LiveHelpStatus" border="0" alt="Live Help" onload="statusImagesLiveHelp[statusImagesLiveHelp.length] = this;"/></a>
This code is entered in the body of the page. The doctype is..

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
The error I am getting with the validator is..



Any help with this would be appreciated.

Many thanks.

Dan
Daniel@EZPZ is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-05-2007, 02:39 PM Re: onload validation problem
willcode4beer's Avatar
Super Moderator

Posts: 1,533
Name: Paul Davis
Location: San Francisco
Trades: 1
You have left out the error message.
However, from looking at your post, I can tell you that there is no onload attribute for the img tag in XHTML so, that is probably your first validation error. To fix, remove it
__________________

Please login or register to view this content. Registration is FREE

willcode4beer is offline
Reply With Quote
View Public Profile
 
Old 06-05-2007, 03:48 PM Re: onload validation problem
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
The "target" attribute is deprecated in XHTML and should not be used - and that is also a likely error message source.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Last edited by LadynRed; 06-05-2007 at 03:50 PM..
LadynRed is offline
Reply With Quote
View Public Profile
 
Old 06-05-2007, 04:12 PM Re: onload validation problem
Junior Talker

Posts: 3
Name: Daniel
Trades: 0
It was the onload causing a problem with a "no attribute" message however I had no idea what that meant.

Removing it has fixed the issue, I assumed removing it would stop something from working but everything seems normal so far, odd!

Thanks for you help folks
Daniel@EZPZ is offline
Reply With Quote
View Public Profile
 
Old 06-05-2007, 05:21 PM Re: onload validation problem
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
This onclick was triggered only uppon a click on the link.
Your link should be non-working now, if you simply removed the onclick.

And be warned that the target= attribute is deprecated too in the xhtml strict doctype.
Your code will only validate on xhtml/transitional
Migrate the onclick into the href to have it valid and operational:
HTML Code:
<a href="javascript:openLiveHelp();" target="_blank" ><img src="http://www.mydomain.co.uk/livehelp/include/status.php" id="LiveHelpStatus" name="LiveHelpStatus" border="0" alt="Live Help" onload="statusImagesLiveHelp[statusImagesLiveHelp.length] = this;"/></a>
__________________
Only a biker knows why a dog sticks his head out the window.

Last edited by tripy; 06-05-2007 at 05:23 PM..
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 06-05-2007, 06:33 PM Re: onload validation problem
Junior Talker

Posts: 3
Name: Daniel
Trades: 0
Thanks tripy - the link seems to work fine without it which is odd.

I'll try your suggestion in the morning incase i've missed something, its late here in the UK

Dan
Daniel@EZPZ is offline
Reply With Quote
View Public Profile
 
Old 06-05-2007, 07:10 PM Re: onload validation problem
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Central Europe here...
1 hour ahead of you even, but it's true I'm getting a bit tired...

Have a good rest.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Reply     « Reply to onload validation problem
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.24457 seconds with 12 queries