Saturday, April 24, 2010

How to open a new window using javascript in IE and FIREFOX?

i have the followig javascript code to open a new window. it works great in IE but the window is not maximised in FIREFOX. please help.



function makeNewWin()



{



newwin=window.open('','newwin','toolbar=... fullscreen=yes');



}



%26lt;a href="join.html" target="newwin" onClick="makeNewWin()"%26gt;click here%26lt;/a%26gt;



How to open a new window using javascript in IE and FIREFOX?opera browser





Well.... I must say that firefox has a lot of trouble with javascript. It's possible that it doesn't recognize the 'fullscreen' thing. In that way, you need to previously define the width and height of the window:



function makeNewWin()



{



h=screen.availHeight;



w=screen.availWidth;



newwin=window.open('','newwin'... width='+w+' height='+h+'');



}



That should work in both browsers. The screen.availHeight is the amount of pixels that can be used by the browser.



How to open a new window using javascript in IE and FIREFOX?microsoft windows internet explorer



that's cuz firefox sucks.

No comments:

Post a Comment

 
web hosting providers