Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

window.open only working on localhost

Status
Not open for further replies.

klon

Programmer
Jan 5, 2005
2
ES
Hi,

I've developed a simple web page with a script that opens a new window, with the following code:

<html>
<head>
<SCRIPT language=JavaScript1.2> <!--
nova=window.open(' 'new','menubar=0, status=none, scrollbar=0, top=0, left=0, width=790, height=550');
// -->
</SCRIPT>
</head>
<body leftmargin=15>

A new window has been opened.

</body>
</html>

While having the file.html stored in localhost, everything works fine. But when uploading it to a server (I have tried several servers), it opens the new windows only in some computers. For instance, there's a computer with windows 2000 and another with windows xp that are not able no run the stcript, but with another computer with windows XP it works perfectly.

Anyone knows why it works in some computers and it doesn't in others?

thank you very much for your help
 
>>Anyone knows why it works in some computers and it doesn't in others?

it is a javascript security error, u cannot open files from differnt domains, ie:
u cannot open yahoo.com from another site using window.open...

Known is handfull, Unknown is worldfull
 
Thanks for your quick answer. Then, why it's working on my work computer, if I try to open a page from different domain? Moreover, I used the script with files from the same domain, but I posted this code in order to simplify things (although I didn't know this security failure...), and I got the same results...

Anyway, very pleased for your quick answer.
 
what error does it throw up???

Known is handfull, Unknown is worldfull
 
Hi Klon...

click the globe at the bottom of the browser window (IE6)
click the internet globe at the popup.
go to userdefined niveau.

click the:
Allow reading rom different domaines...
(I only got XP Pro in Danish so i haven't seen the english menu)

This is never "clicked" default
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top