Re: [WSG] Is there a Javascript issue in Safari?

2006-04-10 Thread CK

Safari does not like the JS psudo protocol.
(javascript:newWindowMinorSwing())

Try This Method:
http://www.alistapart.com/articles/popuplinks/





On Apr 10, 2006, at 12:37 PM, Fred Ehmann wrote:


Hello All,

I have this simple javascript in the head of a page:

!--
function newWindowMinorSwing()
{
window.open 
('minor_swing.html','jav','width=550,height=360,resizable=yes');

}
//--


In the body, I have this:
a href=javascript:newWindowMinorSwing()CLICK TO WATCH QUICKTIME  
(5.5 MB)/abr /


The doc is XHTML Transitional.

The function works fine in Firefox (on Mac) and IE 5.2 (Mac) but  
not Safari--no popups. (Popup blocker is not on)


I must be overlooking something obvious...any ideas?

Thanks,
Fred

**
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**


**
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**



Re: [WSG] Is there a Javascript issue in Safari?

2006-04-10 Thread Lachlan Hunt

Fred Ehmann wrote:

I have this simple javascript in the head of a page:

!--
function newWindowMinorSwing()
{
window.open('minor_swing.html','jav','width=550,height=360,resizable=yes');
}
//--


Do not use those HTML-style comments (!--  --)inside script and style 
elements in XHTML documents.  In fact, they're completely unnecessary in 
HTML these days as well, so just don't use them at all.


http://lachy.id.au/log/2005/05/script-comments

Although this wasn't mentioned in that article, use this in XHTML instead:

script type=text/javascript//![CDATA[

//]/script


In the body, I have this:
a href=javascript:newWindowMinorSwing()CLICK TO WATCH QUICKTIME (5.5 
MB)/abr /


That's inaccessible to anyone without javascript enabled/supported and 
popups are evil.  Link directly to the movie from the href attribute 
and, if you insist on using a popup, use a script that handles the click 
event and creates a popup with the value from the href attribute.


--
Lachlan Hunt
http://lachy.id.au/
**
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**



Re: [WSG] Is there a Javascript issue in Safari?

2006-04-10 Thread Lachlan Hunt

Lachlan Hunt wrote:

http://lachy.id.au/log/2005/05/script-comments

Although this wasn't mentioned in that article, use this in XHTML instead:

script type=text/javascript//![CDATA[

//]/script


Oops, typo.  Requires 2 square brackets ']'.

//]]/script

--
Lachlan Hunt
http://lachy.id.au/
**
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**