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:
  #1  
Old August 18th, 2003, 02:19 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: 7
Pop-up window - bring to the front

Hi there!

When a user exits a pop-up window on my site and returns to the main page, the pop-up takes its place behind the main window.

Is there a way to alter my existing pop-up script so that the pop-up will move forward when the originating link on the main page is clicked?
Code:
<a href="#" class="paper" onClick="window.open('../popups/uno.html','MyWindow2','toolbar=no,location=no,dire  ctories=no,status=no,menubar=no,scrollbars=no,resi  zable=yes,width=400,height=515,left=5px,top=5px');  return false;">
<img alt="Paper" src="../images/TetonUno.jpg" height="89" width="88" border=
"0"></a>

Thanks - all suggestions appreciated.

Robsta

Last edited by robsta : August 18th, 2003 at 04:17 PM.

Reply With Quote
  #2  
Old August 19th, 2003, 09:52 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: 7
Re: Pop-up window - bring to the front

Someone helped me with this.

Here's the solution (actually, the guy who figured it out did it in a much smoother way than what you see here - let me know if you'd like me to post his code). I tweaked it to work with NS7Mac.

Code:
<a href="#" class="paper" onClick="var newWin = window.open('../popups/uno.html','MyWindow2','toolbar=no,location=no,dire ctories=no,status=no,menubar=no,scrollbars=no,resi zable=yes,width=400,height=515,left=5px,top=5px'); newWin.focus();return false;">
<img alt="Paper" src="../images/TetonUno.jpg" height="89" width="88" border=
"0"></a>


Robsta

Reply With Quote
  #3  
Old August 20th, 2003, 09: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 9 m 52 sec
Reputation Power: 10
Send a message via ICQ to stumpy Send a message via MSN to stumpy
Basically, the method you are (were) after is the handy: window.focus

You can call it from anywhere, and refer to any window that you created.

mypopup.focus()
this.focus()

Side note, you can also use it on form objects, like text input. It places the cursor inside the object you call it on.

e.g. document.forms[0].txt_username.focus()

This is a great little trick to use when performing validation on a form, as it brings the user attention to the offending item quickly. Combine it with the 'select' method to really get their attention.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > Pop-up window - bring to the front


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




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

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




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek