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. Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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? Quote Link to comment 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 Quote Link to comment 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>"; Quote Link to comment 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> Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.