Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Sep 22nd, 2005, 12:17 AM   #1
playpolly
Newbie
 
Join Date: Sep 2005
Posts: 2
Rep Power: 0 playpolly is on a distinguished road
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.
playpolly is offline   Reply With Quote
Old Sep 22nd, 2005, 1:25 PM   #2
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
OK, why?
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Sep 22nd, 2005, 2:06 PM   #3
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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
DaWei is offline   Reply With Quote
Old Sep 22nd, 2005, 2:59 PM   #4
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 5 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
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..
__________________

tempest is offline   Reply With Quote
Old Sep 22nd, 2005, 5:20 PM   #5
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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
DaWei is offline   Reply With Quote
Old Sep 23rd, 2005, 7:48 PM   #6
CrAzY_J
Newbie
 
Join Date: May 2005
Posts: 29
Rep Power: 0 CrAzY_J is on a distinguished road
Send a message via MSN to CrAzY_J
I'm not sure what you mean with
Quote:
then open the URL in a loop
CrAzY_J is offline   Reply With Quote
Old Sep 23rd, 2005, 8:05 PM   #7
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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
DaWei is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:08 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC