/    Sign up×
Community /Pin to ProfileBookmark

New Window Help Plz!

i made a new window that works just fine. the only problem is that the content of the new window shows on the parent page. y is that happening
and how do i prevent it from happening?

see for urself what i mean. here is my url.

[url]http://www.xanga.com/m7mad[/url]

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@saulssOct 26.2005 — MAN... wait more b4 u make more theads... (on the same problem)

well anyways heres the error:
[CODE]<script LANGUAGE="JavaScript">
function openindex()
{
var jsHolder="<script language='JavaScript'>var msg='Right Click Disabled!';function disableIE() {if (document.all) {return false;}}function disableNS(e) {if (document.layers||(document.getElementById&&!document.all)) {if (e.which==2||e.which==3){return false;}}}if (document.layers) {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=disableNS;} else {document.onmouseup=disableNS;document.oncontextmenu=disableIE;}document.oncontextmenu=new Function('return false')</script>";
OpenWindow=window.open("", "newwin", "height=320, width=340,toolbar=no,scrollbars="+scroll+",menubar=no");
OpenWindow.document.write("<TITLE>Title Goes Here</TITLE>")
OpenWindow.document.write(jsHolder)
OpenWindow.document.write("<BODY BGCOLOR=black>")
OpenWindow.document.write("<b><center><font color=gray>Eminem-Just Loose It</font></b></center>")
OpenWindow.document.write("<embed style='FILTER: xray' name='RAOCXplayer' autoplay='true' src='http://x2.musicvideocodes.com/61/6621015359.asf' type='application/x-mplayer2' width='320' height='265' ShowControls='1' ShowStatusBar='0' AutoSize='true' loop='true' EnableContextMenu='0' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/'></embed>")
OpenWindow.document.write("</BODY>")
OpenWindow.document.write("</HTML>")

OpenWindow.document.close()
self.name="main"
}
</script>

<script LANGUAGE="JavaScript">[COLOR=DarkRed][B]</script>[/B][/COLOR]
function openindexa()
{
OpenWindow=window.open("", "newwin", "height=320, width=340,toolbar=no,scrollbars="+scroll+",menubar=no");
OpenWindow.document.write("<TITLE>Title Goes Here</TITLE>")
OpenWindow.document.write("<BODY BGCOLOR=black>")
OpenWindow.document.write("<b><center><font color=gray>Eminem-Ass Like That</font></b></center>")
OpenWindow.document.write("<embed style='FILTER: xray' name='RAOCXplayer' autoplay='true' src='http://files.fragstah.com/s1/mvideos/Eminem_Ass-Like-That.wmv' type='application/x-mplayer2' width='320' height='265' ShowControls='1' ShowStatusBar='0' AutoSize='true' loop='true' EnableContextMenu='0' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/'></embed>")
OpenWindow.document.write("</BODY>")
OpenWindow.document.write("</HTML>")

OpenWindow.document.close()
self.name="main"
}
</script>[/CODE]
You are closing the script tag, then the browser is interpreting the rest of the code as html, simply remove that extra </script> ?
Copy linkTweet thisAlerts:
@m7madauthorOct 26.2005 — i luv u man!!!
Copy linkTweet thisAlerts:
@m7madauthorOct 26.2005 — i gonna go test the code now
×

Success!

Help @m7mad 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.29,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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