sean04 Posted April 23, 2010 Share Posted April 23, 2010 Hey, So I have this: echo "<a href=\"javascript:window.open('page.php','name1','height=320,width=240');\">pop-up</a>"; In Chrome, the popup works great, in IE the pop up take a while to popup and then the page itself where the popup link was goes white and says [Object]. Any ideas? Not sure why it doesn't work in IE. Link to comment https://forums.phpfreaks.com/topic/199512-javascript-popup/ Share on other sites More sharing options...
F1Fan Posted April 23, 2010 Share Posted April 23, 2010 What is on "page.php?" Sounds like it may be that page. Link to comment https://forums.phpfreaks.com/topic/199512-javascript-popup/#findComment-1047129 Share on other sites More sharing options...
sean04 Posted April 23, 2010 Author Share Posted April 23, 2010 Theres a form. The thing is, the link for the popup is edit_profile.php. after the link is clicked, edit_profile.php turns white with the word [object] on it. Link to comment https://forums.phpfreaks.com/topic/199512-javascript-popup/#findComment-1047138 Share on other sites More sharing options...
F1Fan Posted April 23, 2010 Share Posted April 23, 2010 OK, forget the pop-up aspect for a second. If you manually navigate to edit_profile.php in IE, what do you get? Link to comment https://forums.phpfreaks.com/topic/199512-javascript-popup/#findComment-1047145 Share on other sites More sharing options...
sean04 Posted April 23, 2010 Author Share Posted April 23, 2010 I get my edit_profile.php page with no problems Link to comment https://forums.phpfreaks.com/topic/199512-javascript-popup/#findComment-1047149 Share on other sites More sharing options...
F1Fan Posted April 23, 2010 Share Posted April 23, 2010 Hmm. Is it possible that what you're naming your pop-up something that is significant? Try removing various parameters. Try this first: echo "<a href=\"javascript:window.open('page.php');\">pop-up</a>"; Link to comment https://forums.phpfreaks.com/topic/199512-javascript-popup/#findComment-1047156 Share on other sites More sharing options...
DavidAM Posted April 23, 2010 Share Posted April 23, 2010 Your link is not properly formed. the HREF attribute indicates that a new page should be opened. When the window.open() funtion runs, it returns an object, and that is what the white page is telling you. I'm not sure you can accomplish this with HREF. You could use the ONCLICK attribute (instead of the HREF) but then you might not get the visual indicators that it is a link (use CSS to change the style of that link). <a onclick="window.open('page.php','name1','height=320,width=240');">pop-up</a> Link to comment https://forums.phpfreaks.com/topic/199512-javascript-popup/#findComment-1047164 Share on other sites More sharing options...
F1Fan Posted April 23, 2010 Share Posted April 23, 2010 DavidAM is totally correct. I completely overlooked the fact that you weren't using the onclick event. Generally I use href="#" when there isn't one, so I'm not sure how various browsers will react with having no href attribute. Link to comment https://forums.phpfreaks.com/topic/199512-javascript-popup/#findComment-1047173 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.