Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-15-2006, 10:10 AM   PM User | #1
saravanan.r
New to the CF scene

 
Join Date: Nov 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
saravanan.r is an unknown quantity at this point
Thumbs up child Window always on TOP

Hi All,

I am opening a popup window by clicking a link. It should be always on TOP. what shall i do ? I have tried alwaysRaised=1 like this by using window.open. But It doesn't work properly.

Please assist me.....

Thanks
Saravanan.R
saravanan.r is offline   Reply With Quote
Old 11-15-2006, 10:40 AM   PM User | #2
ess
Regular Coder

 
Join Date: Oct 2006
Location: United Kingdom
Posts: 865
Thanks: 7
Thanked 29 Times in 28 Posts
ess will become famous soon enough
Hi there.

It would have been helpful if would have included your code so that we could help you out.

anyway..here is a quick solution...which may be very different to what you had already written...

Code:
var newWindow = window.open( '','','scrollbars=yes,menubar=no,height=460,width=960,resizable=yes,toolbar=no,location=no,status=no');
newWindow.document.write( "text in new window goes here" );
newWindow.document.write( "text in new window goes here" );
newWindow.document.write( "text in new window goes here" );
newWindow.document.close();
newWindow.focus(); // this should bring the focus
Note..you should include the above script in a function...and call it when when you want the popup to appear. if you just dump it in a page as it is..it would just open the popup with every page refresh...not a lot people like that.

good luck
ess
ess is offline   Reply With Quote
Old 11-15-2006, 10:51 AM   PM User | #3
saravanan.r
New to the CF scene

 
Join Date: Nov 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
saravanan.r is an unknown quantity at this point
thanks for quick reply ess.

I have tried this code also. But it doesn't work.
Actually my situation as follows,

I have opened a child window childWin from parentWin. after that i can able to navigate entire site. But the childWin should be always on TOP. this is what i want
saravanan.r is offline   Reply With Quote
Old 11-15-2006, 11:23 AM   PM User | #4
ess
Regular Coder

 
Join Date: Oct 2006
Location: United Kingdom
Posts: 865
Thanks: 7
Thanked 29 Times in 28 Posts
ess will become famous soon enough
I see what you mean now...

what about trying this out.

newWindow.onblure = function() { newWindow.self.focus(); };

hope that would do the trick.

good luck.
ess
ess is offline   Reply With Quote
Old 11-15-2006, 12:39 PM   PM User | #5
A1ien51
Senior Coder

 
A1ien51's Avatar
 
Join Date: Jun 2002
Location: Between DC and Baltimore In a Cave
Posts: 2,717
Thanks: 1
Thanked 94 Times in 88 Posts
A1ien51 will become famous soon enough
And why don't you use a modal window?

Eric
__________________
Tech Author [Ajax In Action, JavaScript: Visual Blueprint]
A1ien51 is offline   Reply With Quote
Old 11-15-2006, 08:49 PM   PM User | #6
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,455
Thanks: 0
Thanked 498 Times in 490 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
1. blur is not a standard window event and so not all browsers support it.
2. modal windows only exist for Internet Explorer and for Firefox running on an intranet
3. the only cross browser way to do it is within the same window using a lightbox script or similar.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is online now   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
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

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

Forum Jump


All times are GMT +1. The time now is 08:41 PM.


Advertisement
Log in to turn off these ads.