[Javascript] problem with Netscape 6
Peter Brunone
peter at brunone.com
Tue Dec 11 23:16:53 CST 2001
Praveen,
I wasn't even aware that you could assign an IMG SRC this way. Great idea
if it works :-)
Have you tried triggering the selectImage function in the onLoad event
handler of the BODY tag?
-Peter
|-----Original Message-----
|From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On
|Behalf Of Praveen
|Sent: Tuesday, December 11, 2001 10:55 PM
|To: javascript at LaTech.edu
|Subject: [Javascript] problem with Netscape 6
|
|
|Hi
| i am trying to display an image depending upon the screen resolution
| 1024x768 and 800x600 ).
| This is working properly in IE 5 and netscape 4.7 but not in Netscape
|6.My method 'selectImage()' is not at all being called.
| Can any one help me in this regard?
|
|Regards,
|Praveen.
|****************************************
|
|<script language="javascript">
|function selectImage()
|{
| if (screen.height == 768 && screen.width == 1024)
| document.bankerbanner.src = 'banner1.jpg'
| else
| if (screen.height == 600 && screen.width == 800)
| document.bankerbanner.src = "banner2.jpg"
|}
|</script> </head>
|<body bgcolor='#F2D2A4' topmargin="0" leftmargin="0">
| <table border="0" width="100%" cellspacing="0" cellpadding="0">
| <tr> <td width="100%">
| <img name="bankerbanner" border="0" width='100%' vspace='0' hspace='0'
|src='javascript:selectImage()'></img></td> </tr>
| </table>
|</body>
More information about the Javascript
mailing list