kokeroulis Posted June 21, 2009 Share Posted June 21, 2009 Hello i have made a popup for my website.In all the browsers exept the ie it works fine.But ie tries to download the file not to open it.The code of the popup is the following <HEAD><script LANGUAGE="JavaScript">function popUp(URL) {day = new Date();id = day.getTime();eval("page" + id + " = window.open(URL, 'New_Window', 'toolbar=0,scrollbars=1,location=1,statusbar=0,menubar=0,resizable=1,width=500,height=500');");}</script><BODY onLoad="java script:popUp('form.php')"> Link to comment Share on other sites More sharing options...
Guest FirefoxRocks Posted June 21, 2009 Share Posted June 21, 2009 Try simplifying your code first by taking out the extra stuff to see if it is the problem: <!DOCTYPE html><head><title>Test JavaScript Popup</title><script type="text/javascript">function popUp(URL) {day = new Date();id = day.getTime();eval("page" + id + " = window.open(URL, 'New_Window')");}</script></head><body onload="popUp('form.php')"></body> Maybe the problem was the java script: thing in the onload function. It could also be a popup blocker issue. What version of IE are you using? Link to comment Share on other sites More sharing options...
sckewi Posted June 21, 2009 Share Posted June 21, 2009 I think that IE doesn't like underscores for the window name.Try:window.open(URL, 'newWindow', 'toolbar=0,scrollbars=1,location=1,statusbar=0,menubar=0,resizable=1,width=500,height=500');Edit: Oh and drop the tags for the window name:window.open(URL, 'newWindow', 'toolbar=0,scrollbars=1,location=1,statusbar=0,menubar=0,resizable=1,width=500,height=500'); Link to comment Share on other sites More sharing options...
kokeroulis Posted June 22, 2009 Author Share Posted June 22, 2009 it doesn't work...Neither of them. Link to comment Share on other sites More sharing options...
sckewi Posted June 22, 2009 Share Posted June 22, 2009 Hmm I've tested it locally replacing URL with 'test.txt' and creating a file called text.txt in the same folder as the web-page running the script. Seems to work for me, the only thing I had to do was remove a line break created by the forum software. Could it be that? Link to comment Share on other sites More sharing options...
Ingolme Posted June 22, 2009 Share Posted June 22, 2009 Is form.php on a server or are you testing this on your computer? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.