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.
|
|
|
|
|
![]() |
||
is onbeforeunload xhtml valid
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
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 |
|
|
|
#2
|
|||
|
|||
|
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.
|
|
#3
|
|||
|
|||
|
Re: is onbeforeunload xhtml valid
im afraid your a little mixed up.
Theres no such xhtml class as onbeforeunload, that is a javascript function. |
|
#4
|
|||
|
|||
|
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 |
|
#5
|
||||
|
||||
|
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: Giving them what they paid for: A (sort of) Follow-up (Oct 15th, 2008)
|
|
#6
|
|||
|
|||
|
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?
|
|
#7
|
||||
|
||||
|
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: Giving them what they paid for: A (sort of) Follow-up (Oct 15th, 2008)
|
|
#8
|
|||
|
|||
|
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 Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Last edited by moojoo; Jul 25th, 2006 at 14:22. |
|
#9
|
||||
|
||||
|
Re: is onbeforeunload xhtml valid
Quote:
</tommy cooper>
Last Blog Entry: Giving them what they paid for: A (sort of) Follow-up (Oct 15th, 2008)
|
![]() |
| Tags |
| onbeforeunload, xhtml, valid |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Designing + XHTML/CSS Valid. | PicoDeath | Job Opportunities | 0 | Oct 29th, 2007 12:16 |
| Valid Coding | ThePerfectCrime | Free Web Site Critique | 23 | Jul 27th, 2007 18:01 |
| Valid php syntax | nate2099 | PHP Forum | 2 | Jul 18th, 2007 05:23 |
| embed a valid attribute for XHTML | swetha | Web Page Design | 3 | Jan 20th, 2006 13:47 |
| flash in XHTML valid document | gwx03 | Web Page Design | 3 | Jun 6th, 2004 15:33 |