![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Sep 2005
Posts: 2
Rep Power: 0
![]() |
URL opener - "Pop up trouble"
i want to make a webpage that will automatically open/load a URL in a new window and close that URL window in 3-4secs and then open the URL in a loop how should i do it guys i am frustrated.
I tried one but I can't get my IE not to block it. Firefox does not even do nothing about it. |
|
|
|
|
|
#2 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
OK, why?
|
|
|
|
|
|
#3 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Generally speaking, a user may set his (modern day) browser to handle popups in one of three or four ways. You aren't supposed to be able to dictate your preferences to your user. That said, if you can presume your users like you well enough to overtly let you pop up windows, it's easy enough to accomplish. Your Mozilla and IE browsers are just probably set different. As test beds, they're YOUR browsers, just set them appropriately.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#4 |
|
Programming Guru
![]() |
var win = false;
function popup_win() {
if(!win)
win = window.open("http://www.google.com/");
else {
win.close();
win = false;
}
setTimeout("popup_win", 30);
}
window.onload = new Function("popup_win()");Should work atleast..
__________________
|
|
|
|
|
|
#5 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Might find it runs a tad rapidly....
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#6 | |
|
Newbie
|
I'm not sure what you mean with
Quote:
|
|
|
|
|
|
|
#7 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
That was a little unclear, Crazy, but I judged that he meant repetetively close the window and reopen it with the same URL. Tempest provided the solution, assuming the browser allows popups with external requests. There are ways to do the same thing and avoid the popup blocker problems, actually. Opening a window with a NULL URL is not considered a popup in any browser I'm familiar with. Separate HTTP requests can be generated to pull in additional content, which can then be placed in the window.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|