/    Sign up×
Community /Pin to ProfileBookmark

window.open javascript in xsl on safari

I’m trying to open a new window using window.open written within xsl.
the following works fine on FireFox, and Netscape.
However, it opens a new window and also duplicates my menu html frame.

What am i missing?

this is main html. saari opens menu.html under the exsisting menu.html.

[code=html]
<frameset rows=”50,*” framespacing=”0″ frameborder=”no” border=”0″>
<frame src=”menu.html” name=”menu” id=”menu”>
<frame src=”section01.xml” name=”main” id=”main”>
</frameset>
<noframes><body>
</body></noframes>
[/code]

this is my xsl

[code=html]

<script language=”JavaScript”>
<![CDATA[

var subWin=”;
function image(Pic,wVal,hVal,pTitle){

subWin = window.open(“”,Pic,”width=”+ wVal + “,height=” + hVal +”,top=0,left=0″);
subWin.document.open();
subWin.document.write(‘<html><head><title>’+pTitle+'</title></head><body background=”‘+ Pic +'”></body></html>’);
subWin.document.close();

}
]]>
</script>
[/code]

my onClick

[code=html]
<xsl:element name=”A”>
<xsl:attribute name=”href”><xsl:text>#</xsl:text></xsl:attribute>
<xsl:attribute name=”onClick”>
<xsl:text>image(</xsl:text>
<xsl:text>'</xsl:text><xsl:value-of select=”PIC” /><xsl:text>'</xsl:text>
<xsl:text>,</xsl:text>
<xsl:value-of select=”PICW” />
<xsl:text>,</xsl:text>
<xsl:value-of select=”PICH” />
<xsl:text>,</xsl:text>
<xsl:text>'</xsl:text><xsl:value-of select=”PTITLE” /><xsl:text>'</xsl:text>
<xsl:text>)</xsl:text>
</xsl:attribute>[/code]

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @deluxmilkman spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...