JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
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  
Old December 23rd, 2003, 08:36 PM
robsta robsta is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Pacific NW, U.S.A.
Posts: 146 robsta User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Question onReload event??

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

Reply With Quote
  #2  
Old December 30th, 2003, 06:43 AM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 6 m 11 sec
Reputation Power: 8
Send a message via ICQ to stumpy Send a message via MSN to stumpy
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.
__________________
DevArticles Moderator
BlueSix - Web Development and Consulting

Reply With Quote
  #3  
Old December 30th, 2003, 09:57 PM
robsta robsta is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Pacific NW, U.S.A.
Posts: 146 robsta User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
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

Reply With Quote
  #4  
Old December 31st, 2003, 12:31 AM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 6 m 11 sec
Reputation Power: 8
Send a message via ICQ to stumpy Send a message via MSN to stumpy
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

Reply With Quote
  #5  
Old December 31st, 2003, 06:32 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
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.

Reply With Quote
  #6  
Old December 31st, 2003, 10:58 AM
robsta robsta is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Pacific NW, U.S.A.
Posts: 146 robsta User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Quote:
Originally posted by stumpy
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


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

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > onReload event??


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway