This is a discussion on "Window Highlighting problem in JavaScript" within the JavaScript Forum section. This forum, and the thread "Window Highlighting problem in JavaScript are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Window Highlighting problem in JavaScript
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Window Highlighting problem in JavaScript
I am developing site, which highlight the inactive/Minimized window browser. Please check this coding.
[html]<html> <head> <title></title> </head> <body> <A HREF="http://google.com" TARGET="NewTarget" onClick="window.focus() Window.open('http://google.com', 'NewTarget') return false;"> Google</A> <br/> <A HREF="http://gmail.com" TARGET="NewTarget" onClick="window.focus() Window.open('http://gmail.com', 'NewTarget') return false;"> Gmail</A> <br/> <A HREF="http://answers.google.com" TARGET="NewTarget" onClick="window.focus() Window.open('http://answers.google.com', 'NewTarget') return false;"> Google Answers</A> <br/> <A HREF="http://answers.yahoo.com" TARGET="NewTarget" onClick="window.focus() Window.open('http://answers.yahoo.com', 'NewTarget') return false;"> Yahoo Answers</A> <br/> <A HREF="http://inbox.com" TARGET="NewTarget" onClick="window.focus() Window.open('http://ginbox.com', 'NewTarget') return false;"> Inbox</A> <br/> </body> </html> The problem is If i use only one link for a page then it will highlighting the existing inactive window. I am using 4 links in this page, the first link google only highlighting others not reflecting. Please help me to solve this one. If any other method to solve this problem then please provide your code, and your valuable suggestions. Thanks |
|
|
|
||||
|
Re: Window Highlighting problem in JavaScript
So you want to open a new window for each link?
If that is the case, you would need to name each window differently. eg Window.open('http://thelinke', 'uniqueName1'); Window.open('http://thelinke', 'uniqueName2'); etc... I think this is what you mean? If not let me know in a bit more detail. Cheers
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
|||
|
Re: Window Highlighting problem in JavaScript
Thanks for replying.
Each link should open in a same named target window, thats y i gave the same target name for each link. The problem is first time if u click any one of the link it will open a new window, after second time it will open the same window, but we dont know whether it is opened or not, so i need to indicate to the user link that named browser blinking in taskbar or appear on the screen. It will help to user to know whether the new link is opened. the function Window.focus() will help to do this. I tried, but i didn't get result. Please help me.. Thanks |
|
||||
|
Re: Window Highlighting problem in JavaScript
You'd be much better off doing this with a javascript function.
like
Cheers
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
|||
|
Re: Window Highlighting problem in JavaScript
Thanks for send this code.
But code is not focussing the inactive (minimized) window. Please check this code. I need the output like this
Thanks |
|
||||
|
Re: Window Highlighting problem in JavaScript
The function from my last post does the same thing as the code you posted.
The call to newWindow.focus() is the only thing I know and it doesn't work on all browsers/OS etc. You would be better off closing the window and opening again each time you run the function.
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Open another new window from javascript window | thehermitage | JavaScript Forum | 10 | Jan 27th, 2008 19:42 |
| Need JavaScript for html links should open in a new window in the first time, after.. | jayaramgussy | JavaScript Forum | 0 | Jun 19th, 2007 09:00 |
| javascript Window.event help | trylah | JavaScript Forum | 3 | Apr 10th, 2007 13:31 |
| javascript to open new window | snappy | JavaScript Forum | 4 | Nov 9th, 2006 13:02 |
| Javascript popup window with ASP | madhuri.t | Classic ASP | 0 | May 3rd, 2006 10:42 |