javascript and xhtml validation

This is a discussion on "javascript and xhtml validation" within the JavaScript Forum section. This forum, and the thread "javascript and xhtml validation are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Apr 17th, 2007, 10:12
SuperMember

SuperMember
Join Date: Apr 2007
Location: Sydney
Posts: 154
Thanks: 0
Thanked 0 Times in 0 Posts
javascript and xhtml validation

I have a page that has some Javascript in it. It all works fine in IE, but falls apart in Firefox and Netscape, UNLESS I remove the Doctype declaration(in which case IE has trouble..)

Obviously this page dosen't validate to XHTML 1.1 standards. Is it possible to store the javascript in a seperate file and call it from the xhtml? And will this mean that yes, the page may now validate, but will most likely still fall apart in browsers other than IE??

The pages are
http://www3.webng.com/tcnls/av2.html with the doctype dec, and
http://www3.webng.com/tcnls/av3.html without

Thanks for your help,

Nathan.
Reply With Quote

  #2 (permalink)  
Old Apr 17th, 2007, 12:22
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: javascript and xhtml validation

Hmmm ... actually ... your site falls apart in IE6. What does the JS do? I don't see anything on there that can't be achieve with CSS/HTML only!?

Oh and yes you "should" be putting your JS in a separate file. Just link to it with

Code: Select all
<script src="somescript.js" type="text/javascript"></script>
Reply With Quote
  #3 (permalink)  
Old Apr 17th, 2007, 21:00
SuperMember

SuperMember
Join Date: Apr 2007
Location: Sydney
Posts: 154
Thanks: 0
Thanked 0 Times in 0 Posts
Re: javascript and xhtml validation

Sorry, I should have explained that better. The "creation" link on the bottom is the one that activates the javascript. What exactly does it do in IE6?? I've tested it on IE7 and IE5 and it seems ok, so long as the doctype is declared..

Thanks,

Nathan.
Reply With Quote
  #4 (permalink)  
Old May 1st, 2007, 09:06
Reputable Member
Join Date: Apr 2007
Location: Scotland
Age: 17
Posts: 233
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Blake121
Re: javascript and xhtml validation

Well this is what happened to me. (I'm usuing IE6)

the first one, with the doctype, worked fine except that when you click the "creation" link brown smudges appear everywhere.

When you visit the other page the table drops down below the main content and the red highlight doesn't expand. Looking bad, except when the "creation" link is clicked lots of fireworks appear, which I guess means its working.

Also while i'm at it can I say the navagation links in the footer are really hard to read. You should give them more colour.

Hope this helped

-Blake-
www.theloop.org.uk
Reply With Quote
  #5 (permalink)  
Old May 1st, 2007, 18:18
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: javascript and xhtml validation

Falls apart in Safari with both links. It's not a problem of browser issues, it's just shoddy code...
Reply With Quote
  #6 (permalink)  
Old May 1st, 2007, 18:24
craig's Avatar
Reputable Member
Join Date: Sep 2005
Location: Preston, UK
Age: 21
Posts: 381
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to craig
Re: javascript and xhtml validation

Code: Select all
<BGSOUND id=BGSOUND_ID src="" loop="-1">
Runs for the hills...
Reply With Quote
  #7 (permalink)  
Old May 1st, 2007, 18:25
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: javascript and xhtml validation

Lol. Tis all too true.
Reply With Quote
  #8 (permalink)  
Old May 1st, 2007, 18:36
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 22
Posts: 1,620
Blog Entries: 1
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to spinal007 Send a message via MSN to spinal007 Send a message via Yahoo to spinal007 Send a message via Skype™ to spinal007
Re: javascript and xhtml validation

Quote:
Originally Posted by craig View Post
Code: Select all
<BGSOUND id=BGSOUND_ID src="" loop="-1">
Runs for the hills...
LOL, reminds me of me!

I know you didn't ask for a critique but I can't help this one:
- Sound on a webpage is bad
- Background sound is bad
- Sound on mouse over is bad
- A page that requires the Apple Quicktime plugin is bad
- Using Javascript to play sound is non-sense.
Validation is the LAST of your worries. I hate flash, but in your case I think I'll open an exception.

Use flash to do it properly and put yourself out of your misery.
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Reply With Quote
  #9 (permalink)  
Old May 1st, 2007, 20:34
SuperMember

SuperMember
Join Date: Apr 2007
Location: Sydney
Posts: 154
Thanks: 0
Thanked 0 Times in 0 Posts
Re: javascript and xhtml validation

Thanks for your replies.
Constructive criticism is always welcome!
This page site is basically just a test page that I use for testing and playing before I post anything to the real site. I'll take your advice and can the sound entirely, and I think the whole fireworks thing looks kind of corny anyway.
For the falling apart in safari, could I get you to check www.tcnls.com/services.html and see if that does the same thing?

Thanks,

Nathan.
Reply With Quote
  #10 (permalink)  
Old May 1st, 2007, 22:34
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: javascript and xhtml validation

Don't see any JavaScript effects at all. The layout is good, though, if that's what you mean.
Reply With Quote
Reply

Tags
doctype declaration, xhtml validate

Thread Tools

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
xhtml and validation robb Web Page Design 27 Aug 15th, 2006 08:41
W3C Xhtml Validation... Pheonix Implemented Suggestions 13 Oct 7th, 2005 12:44
XHTML Validation Help socalledlove Web Page Design 7 May 3rd, 2005 21:06
XHTML validation keeps21 Web Page Design 4 Mar 21st, 2005 08:27
XHTML validation problems Webforumz Staff Web Page Design 6 Jan 4th, 2004 15:45


All times are GMT. The time now is 04:34.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43