Connecting Tech Pros Worldwide Forums | Help | Site Map

window.open not working in i.e 6

Newbie
 
Join Date: Aug 2006
Posts: 5
#1: Aug 8 '06
Hi all,

I am trying to build a pop-up into a Web page. The pop-up should open when
clicking a button. It works fine on Mozilla, but Internet Explorer
refuses to open the pop-up. How can I make it work?
The code is:
<input type="button" value="Help"onClick="window.open('mda.php','HelpMe ','width=200,height=200,left=200,top=200,resizable ')"/>

I have change it many ways - e.g. tried opening a htm, html file instead of php. It still works on Mozilla and not I.e

Banfa's Avatar
AdministratorVoR
 
Join Date: Feb 2006
Location: South West UK
Posts: 6,167
#2: Aug 8 '06

re: window.open not working in i.e 6


put a space in before onClick
spell onClick onclick
Newbie
 
Join Date: Aug 2006
Posts: 5
#3: Aug 8 '06

re: window.open not working in i.e 6


Thanks for looking at it. I'm afraid it didn't solve the problem. Any other ideas?
Newbie
 
Join Date: Aug 2006
Posts: 5
#4: Aug 8 '06

re: window.open not working in i.e 6


I get the same when using a <href> that calls a javascript function? The function gets called but doesn't open the popup?

as per below

<a href="#" onClick="newWindow(1);">Contact Us</a><br>

<SCRIPT language="Javascript">
// declare a new JavaScript variable
var popWindow;
// declare a new function, newWindow
function newWindow(winID) {

// declare variable winURL, setting it to the name of the PHP file
// and accompanying data.
var winURL = "mda.php?winID=" + winID;
// If the popup window does not exist, or it is currently closed,
// open it.
if (!popWindow || popWindow.closed) {




popWindow = window.open(winURL,'popWindow','dependent,width=20 0,height=200,left=150,top=100');
}
// If the popup window is already open, make it active and update
// its location to winURL.
else {
popWindow.focus();
popWindow.location = winURL;
}
}
</SCRIPT>
iam_clint's Avatar
Forum Leader
 
Join Date: Jul 2006
Location: Oklahoma
Posts: 1,076
#5: Aug 8 '06

re: window.open not working in i.e 6


the code you pasted actually worked fine for me you got a popup blocker doing something?
Newbie
 
Join Date: Aug 2006
Posts: 5
#6: Aug 8 '06

re: window.open not working in i.e 6


No first thing I checked - I did have to re install IE a while ago - I wonder wether that had anything to do with it.
iam_clint's Avatar
Forum Leader
 
Join Date: Jul 2006
Location: Oklahoma
Posts: 1,076
#7: Aug 8 '06

re: window.open not working in i.e 6


Possibly it worked fine with IE 6
Newbie
 
Join Date: Aug 2006
Posts: 5
#8: Aug 9 '06

re: window.open not working in i.e 6


Thanks for your help - I have reinstalled Ie 6, still nothing and then instlled ie7 beta version still nothing...
Newbie
 
Join Date: May 2006
Posts: 2
#9: Aug 23 '06

re: window.open not working in i.e 6


Quote:

Originally Posted by groeny

Thanks for your help - I have reinstalled Ie 6, still nothing and then instlled ie7 beta version still nothing...

This is due to enhanced security in IE6 onwards. The local file isnt within application's scope and hence wont open.

I am still trying to figure it out. Any solutions????
Reply