Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
|
|
Mozilla / Javascript problem(s)... :( |
Page: 1 | Reply |
Jan 5th 2004 | #136208 Report |
Member since: Dec 9th 2003 Posts: 180 |
can someone please tell me why my gallery code doesn't work in Mozilla ? (it works fine in IE6) When I click on an image in Mozilla, nothing happens...i don't even get a lousy error. this is the gallery: http://tcorp.de/site4/?page=gallery.html&music=off code on page to call an image [CODE][b][a HREF="#" onmousedown=loadimage('7') class="categorypics"] ---thumbnail image here--- [/a][/b][/CODE] (a simple "link" to "#" there the "onmousedown" does the actual action) code in js file for "loadimage" [CODE] function loadimage(im,op) { if (checkb.checked ){ if (!op=="1"){window.open('dgal.html?picnum='+im+'&nw=yes','nwin','width=800,height=440,resizable=yes,scrollbars=yes,status=no,left=10');}else {window.open('dgal.html?picnum='+im+'&nw=yes','nwin','width=580,height=680,resizable=yes,scrollbars=yes,status=no,top=20');} } else{ window.location.href ='dgal.html?picnum='+im; } } // the "op" param is optional [/CODE] (if checkbox on page is checked, page that shows image is opened in new window...if not, page that shows image is opened in same window. The "op" param is to choose a window size format) |
Reply with Quote Reply |
Jan 6th 2004 | #136350 Report |
Member since: Aug 29th 2003 Posts: 97 |
Maybe it's because Mozilla only lives by the W3C standards, whilst IE is compatible with all kinds of weird coding. Try checking your code... BTW, I'm just guessing (dunno crap ;) :D ) |
Reply with Quote Reply |
Jan 11th 2004 | #137205 Report |
Member since: Dec 9th 2003 Posts: 180 |
I got it to work by adding an ID to the checkbox and using getElementById to point to the object. Apparently Mozilla doesn't like objects that aren't "defined". |
Reply with Quote Reply |
Page: 1 | Back to top |
Please login or register above to post in this forum |
© Web Media Network Limited. All rights reserved. No part of this website may be reproduced without written permission. Photoshop is a registered trademark of Adobe Inc.. TeamPhotoshop.com is not associated in any way with Adobe, nor is an offical Photoshop website. |