469,271 Members | 1,785 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

window.open not working in i.e 6

5
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
Aug 8 '06 #1
8 16413
Banfa
9,064 Expert Mod 8TB
put a space in before onClick
spell onClick onclick
Aug 8 '06 #2
groeny
5
Thanks for looking at it. I'm afraid it didn't solve the problem. Any other ideas?
Aug 8 '06 #3
groeny
5
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>
Aug 8 '06 #4
iam_clint
1,208 Expert 1GB
the code you pasted actually worked fine for me you got a popup blocker doing something?
Aug 8 '06 #5
groeny
5
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.
Aug 8 '06 #6
iam_clint
1,208 Expert 1GB
Possibly it worked fine with IE 6
Aug 8 '06 #7
groeny
5
Thanks for your help - I have reinstalled Ie 6, still nothing and then instlled ie7 beta version still nothing...
Aug 9 '06 #8
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????
Aug 23 '06 #9

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Michael | last post: by
2 posts views Thread by venkatesh | last post: by
10 posts views Thread by Marshall Dudley | last post: by
14 posts views Thread by D. Alvarado | last post: by
2 posts views Thread by carlor | last post: by
5 posts views Thread by lindanr | last post: by
4 posts views Thread by alexandre.brisebois | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.