is onbeforeunload xhtml valid

This is a discussion on "is onbeforeunload xhtml valid" within the Web Page Design section. This forum, and the thread "is onbeforeunload xhtml valid are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jul 24th, 2006, 22:42
Reputable Member
Join Date: Dec 2005
Location: scotland
Age: 27
Posts: 141
Thanks: 0
Thanked 0 Times in 0 Posts
is onbeforeunload xhtml valid

hi, i keep getting an error message for this bit of code

<a href="%20"><img src="Images/Detailed%20map.gif" alt="" width="157" height="118" hspace="20" border="2" onbeforeunload="MM_openBrWindow('http://www.upmystreet.com/map/l/ph34%2B4%2Bex.html','map1','scrollbars=yes,resizab le=yes,width=400,height=400')" /></a>


is it possible to use the onbeforeunload in XHTML trans?

or can someone tell why it wont validate?

cheers
Reply With Quote

  #2 (permalink)  
Old Jul 24th, 2006, 23:29
Reputable Member
Join Date: Dec 2005
Location: U.S.A.
Posts: 131
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ScottR Send a message via Skype™ to ScottR
Re: is onbeforeunload xhtml valid

First off, hspace and border and deprecated and are not valid xtml. Although I'm not sure onbeforeunload is valid javascript anyway.
Reply With Quote
  #3 (permalink)  
Old Jul 25th, 2006, 00:09
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sypher
Re: is onbeforeunload xhtml valid

im afraid your a little mixed up.
Theres no such xhtml class as onbeforeunload, that is a javascript function.
Reply With Quote
  #4 (permalink)  
Old Jul 25th, 2006, 08:23
Reputable Member
Join Date: Dec 2005
Location: scotland
Age: 27
Posts: 141
Thanks: 0
Thanked 0 Times in 0 Posts
Re: is onbeforeunload xhtml valid

i understand that onbeforeunload is javascript, but was wondering if placing it in this way in an XHTML file is ok (well i know its not seeing as it isn't valid ).

i'll try get rid of the hspace, etc scott.


Any ideas on how to make this code valid other than deleting it

cheers 4 the replys
Reply With Quote
  #5 (permalink)  
Old Jul 25th, 2006, 12:36
minute44's Avatar
Moderator
Join Date: Apr 2006
Location: Nottingham UK
Age: 24
Posts: 1,347
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to minute44
Re: is onbeforeunload xhtml valid

You should always keep scripts and CSS in seperate files then you wouldn't have this problem... I don't think...
Last Blog Entry: Annoying people.... (Jan 16th, 2008)
Reply With Quote
  #6 (permalink)  
Old Jul 25th, 2006, 12:52
Reputable Member
Join Date: Dec 2005
Location: scotland
Age: 27
Posts: 141
Thanks: 0
Thanked 0 Times in 0 Posts
Re: is onbeforeunload xhtml valid

don't suppose u could point me in the right direction of what needs to go in the external file and what needs to stay in xhtml?
Reply With Quote
  #7 (permalink)  
Old Jul 25th, 2006, 12:57
minute44's Avatar
Moderator
Join Date: Apr 2006
Location: Nottingham UK
Age: 24
Posts: 1,347
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to minute44
Re: is onbeforeunload xhtml valid

Anything that is javascript needs to go in the.js file. ANything that is CSS needs to go in a .css file.

Simple...
Last Blog Entry: Annoying people.... (Jan 16th, 2008)
Reply With Quote
  #8 (permalink)  
Old Jul 25th, 2006, 13:07
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,608
Thanks: 0
Thanked 6 Times in 6 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: is onbeforeunload xhtml valid

These are what you would use in your XHTML document in the <head> tags or wherever you needed to call the javascript. The CSS call has to go in the <head></head>.

Javascript Link to: <script src="foo.js" language="text/javascript"></script>
CSS Link to: <link rel="stylesheet" href="foo.css" media="screen" type="text/css" />

Last edited by moojoo; Jul 25th, 2006 at 13:22.
Reply With Quote
  #9 (permalink)  
Old Jul 25th, 2006, 13:15
minute44's Avatar
Moderator
Join Date: Apr 2006
Location: Nottingham UK
Age: 24
Posts: 1,347
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to minute44
Re: is onbeforeunload xhtml valid

Quote:
Originally Posted by moojoo View Post
Javascript Link to: <script src="foo.js" language="text/javascript"></script>
CSS Link to: <link rel="stylesheet" href="foo.css" media="screen" type="text/css" />
Just like that!
</tommy cooper>
Last Blog Entry: Annoying people.... (Jan 16th, 2008)
Reply With Quote
Reply

Tags
onbeforeunload, xhtml, valid

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
Designing + XHTML/CSS Valid. PicoDeath Job Opportunities 0 Oct 29th, 2007 10:16
Valid Coding ThePerfectCrime Free Web Site Critique 23 Jul 27th, 2007 17:01
Valid php syntax nate2099 PHP Forum 2 Jul 18th, 2007 04:23
embed a valid attribute for XHTML swetha Web Page Design 3 Jan 20th, 2006 12:47
flash in XHTML valid document gwx03 Web Page Design 3 Jun 6th, 2004 14:33


All times are GMT. The time now is 01:05.


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