| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
Registered User
Join Date: Jul 2006
Posts: 21
|
Validating Javascript in XHTML
Hi Everyone, I'm making a website for someone and although they're not bothered about the site being web compliant I'm trying to do so out of good practice. I have implemented graphic buttons that change on rollover using Javascript created in Dreamweaver MX. The problem is that when I try and validate the page it is fine without the javascript and does not seem to be fond to the external like to a Javascript file. Has anyone had this issue before and how did you combat it? Is the CDATA action better? I'd very much appreciate your help in this matter. ----------------- Raygirl |
|
|
|
|
|
#2 (permalink) |
|
Senior Member
Join Date: Jan 2005
Posts: 12,340
|
I'd use CSS for image rollovers: http://wellstyled.com/css-nopreload-rollovers.html |
|
|
|
#8 (permalink) |
|
Everything is fine.
|
In general, I agree with PGO that your image rollovers would be better of being handled with CSS. The validator shouldn't specifically be choking on the JavaScript unless your markup isn't totally correct. I also couldn't quite understand what you meant in your original post; does the validator screw up when you link to an external JavaScript file ? Or when you have the JavaScript code inline in your HTML document ? If you could perhaps show us the code (or post a link to the page) you're using then I could take a look at it and get a better understanding of what's going wrong and see how to remedy it. However, if you now don't need the JavaScript at all since you will be going with CSS instead then fair play, it's all good. - Mike |
|
|
|
#9 (permalink) |
|
Registered User
Join Date: Jul 2006
Posts: 21
|
Mike, No it's something really simple that can be fixed with CSS so I'm going down that route. The task I was doing was actualy looking into a website someone else had already developed but itwas riddled with bugs. I can't believe that there are companies out there who claim they have experience in developing great sites at a professional level but can't even have a page conforming to web standards... Thanks for your help everyone |
|
|
|
#10 (permalink) | |
|
Everything is fine.
|
Quote:
- Mike |
|
|
![]() |