|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Hi,
I'm using an onLoad event for a pop-up window. If the user doesn't *close* the pop-up and then returns to page handling the onLoad event, the popup window flashes when triggered, but remains behind the main window - it don't come forward, even though I'm using a *newWin.focus();*! What am I doing wrong? Here's the code: <script language="JavaScript"> <!-- // function dothis(){ var windowprops = "toolbar=no,location=no,directories=no,status=no,me nubar=no,scrollbars=no,resizable=no,width=260,heig ht=520,left=205px,top=15px"; var newWin = window.open("holiday/happyholidays.html", "MyWindow987", windowprops); // Use to load a page newWin.focus(); } // --> </script> Any ideas?? Thanks, Robsta
__________________
http://www.fond-regards.com |
|
#2
|
||||
|
||||
|
Hmmm - your code looks fine... might be a browser issue?
Although you shouldn't have to, you could call the focus method from the child, once it's loaded. Note that most new browsers (opera, firebird, mozilla (plus ad-blocking software)) coming out these days will block a new window generated via onLoad in the parent. |
|
#3
|
|||
|
|||
|
Hey Stumpy,
Thanks for the reply. It might be a browser related issue - I've been lazy and haven't viewed it on a PC yet. What's the web developer's answer to web-blocking software? I take it that on-Load triggered pop-ups are passé. What would be a good alternative method to the pop-up if I want to let customers know that the office is closed for two weeks? Something attention-grabbing... All the best, Robsta ![]() |
|
#4
|
||||
|
||||
|
Generally, you should let the user control their web experience (http://www.useit.com/alertbox/990530.html - point 2). Auto-popups are considered rude, and are usually used by dodgy advertising companies (hence the existence of ad-blocking software).
If you want to let the user know about something new, make the info stand out on the page. Maybe surround the notice in a yellow bkg, 20px padded div, with red dotted border.... or something ![]() |
|
#5
|
||||
|
||||
|
Or, you know, if you're hell-bent on a popup, build one, do a screen cap, stick it in a layer, and pop the layer up onload. Stumpy's right, though. I sure as hell block popups.
|
|
#6
|
|||
|
|||
|
Quote:
Yeah, that sounds like it should work! How can I get the red border to flash? ![]() (Seriously) I'll have to re-think the design of the home page to incorpoarte an designated area for «announcements». I only use the auto pop-ups rarely, when I have an announcement to make. Point taken about letting the user control the experience. - Robsta ![]() |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > onReload event?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|