Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

onfocus() trought two or more pages

Status
Not open for further replies.

paola13

Technical User
Oct 22, 2001
36
IT
First, i'm sorry to post this twice. i posted in flash forum, but is a js problem...

My swf (1.swf) stays inside an html page (1.htm). I need to get the focus on it just when i open the page. For this i use a js inside the 1.htm head page:

function fuoco(){
var IE = navigator.appName.indexOf("Microsoft") != -1;
var filmato = IE ? window.filmato : window.document.filmato;
filmato.focus();
}
//-->
</script>
This function gives the focus on the 1.swf. When i open from this swf a new window (a pop-up with inside 2.htm), i reset the focus on the last one, using this code in the 2.htm page:
<body onLoad=&quot;self.focus()&quot;>

Now, if I pass to the old page (1.htm) just clickking on the blu-IE-bar of 1.htm, the focus given by the function fuoco(){ is lost! I need to click on the swf file to get once again it!
How can i pass the focus between two or more pages with a js? Why my function fuoco() works just once?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top