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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Netscape problem

Status
Not open for further replies.

dirkg

Technical User
May 20, 2000
170
BE
Hi all,

could anyone tell me why this code does not work in Netscape?

<script language=&quot;JavaScript&quot;><!--
if ((screen.availWidth <950) || (screen.availHeight < 720)) {

document.write('<object classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot; width=&quot;100%&quot; height=&quot;100%&quot;>');
document.write('<param name=movie value=&quot;FlashMovies/welcome 800x600.swf&quot;>');
document.write('<param name=quality value=high>');
document.write('<embed src=&quot;FlashMovies/welcome 800x600.swf&quot; quality=high pluginspage=&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;100%&quot; height=&quot;100%&quot;></embed>');
document.write('</object>')
}
else{

document.write('<object classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot; width=&quot;100%&quot; height=&quot;100%&quot;>');
document.write('<param name=movie value=&quot;FlashMovies/welcome.swf&quot;>');
document.write('<param name=quality value=high>');
document.write('<embed src=&quot;FlashMovies/welcome.swf&quot; quality=high pluginspage=&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;100%&quot; height=&quot;100%&quot;></embed>');
document.write('</object>')
}

//--></script>

It works perfectly in IE and I don't have a clue why it doesn't work in Netscape :-s

Thanks a lot in advance for your help!

Greetz,

Dirk
 
dont think netscape supports 'screen' to get dimensions you should use..

window.innerWidth; or self.innerWidth
window.innerHeight; or self.innerHeight
 
I tried it but the problem isn't solved :-(
 
Did you figure out the problem with this?

I am having a similar problem but I am trying to use java applet. The porblem I think is with directive height=&quot;100%&quot;. If I use hardcoded value for height my applet works fine in Netscape but as soon as I specify a % directive I am having problems.

Please let me know if you find any solution or the reason behind this.

Thanks
Pat
 
no I didn't...:-(, the problem still exists...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top