User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 328,890 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,583 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 3037 | Replies: 13 | Solved
Reply
Join Date: Dec 2006
Posts: 12
Reputation: evank is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
evank's Avatar
evank evank is offline Offline
Newbie Poster

Re: How does IE determine a popup?

  #11  
Jan 22nd, 2007
Originally Posted by MidiMagic View Post
Why not just put an anchor tagged link on the page. If I want the extra page, I will click it. I don't need bamboozlers popping up to attract me to the link.


you misunderstand the original issue, being that ie blocks any use of window.open(), even in a link. meaning the following is still blocked, and by the default explorer configuration, no less:
[html]<a href="javascript:window.open('newpage.html',params)">[/html]
--
The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it.
~Terry Pratchett
Reply With Quote  
Join Date: Oct 2005
Posts: 223
Reputation: Inny is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 4
Inny's Avatar
Inny Inny is offline Offline
Posting Whiz in Training

Question Re: How does IE determine a popup?

  #12  
Jan 23rd, 2007
Originally Posted by evank View Post
you misunderstand the original issue, being that ie blocks any use of window.open(), even in a link. meaning the following is still blocked, and by the default explorer configuration, no less:
[html]<a href="javascript:window.open('newpage.html',params)">[/html]



Are you sure its not your browser settings or something? My example above works perfectly in IE.
Last edited by Inny : Jan 23rd, 2007 at 6:04 am.
Always carry a flagon of whiskey in case of snakebite and furthermore always carry a small snake.
W. C. Fields
Reply With Quote  
Join Date: Dec 2006
Posts: 12
Reputation: evank is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
evank's Avatar
evank evank is offline Offline
Newbie Poster

Re: How does IE determine a popup?

  #13  
Jan 23rd, 2007
Originally Posted by Inny View Post
Are you sure its not your browser settings or something? My example above works perfectly in IE.


:shrug: it didnt work for me and like 10 other people, all on default ie settings (not sure about ie7)
--
The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it.
~Terry Pratchett
Reply With Quote  
Join Date: Sep 2005
Posts: 557
Reputation: digital-ether will become famous soon enough digital-ether will become famous soon enough 
Rep Power: 5
Solved Threads: 33
Moderator
digital-ether's Avatar
digital-ether digital-ether is offline Offline
Posting Pro

Re: How does IE determine a popup?

  #14  
Jan 23rd, 2007
A "better way" to write:
[html]
<a href="javascript:window.open('newpage.html',params)">
[/html]
is:
[html]
<a href="newpage.html" onclick="window.open('newpage.html',params); return false;">[/html]

That way it satisfies both users with and withought JavaScript support on their browser.
(winout JS you wont be able to control the window anyway)

Using href="javascriptsome code)" will also write the returned object to the document window. So you'll get a blank page with "[object]" written in it in IE and in FF you get "[object Window]".

You could wrap the javascript in void() like:

[html]
<a href="javascript:void(window.open('newpage.html',params));">
[/html]

but thats just adding unnecessary code.

I've never had a problem with popup blockers blocking window.open() in an "onclick" event..
On non-interactive events.. like window.onload or setTimeout .. yes.

I've never tries javascript:window.open in the href attribute. Maybe thats handled differently. You should probably try the onclick method, as its more standard.
www.fijiwebdesign.com - web design and development and fun
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Marketplace (Sponsored Links)
Thread Tools Display Modes

Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 12:44 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC