PDA

View Full Version : Photo Gallery, Netscape issues, and some wee IE ones too :)


Lambo
12-29-2002, 02:30 AM
Hi,
I'm trying to make a kinda....... default javascript that'll run all my photo gallerys for the digital camera I though I was gonna get for my Christmas(instead I got a toolkit and some tupperware :D)....... ok..... the page so far is:
http://www.nerocheese.free-online.co.uk/lizzie/gal_liz.html

and the source for the javascript is:http://www.nerocheese.free-online.co.uk/lizzie/gal.js

the idea being these'd use different .css files.

The problem I'm having is with opening up the large images in the popup window...... works fine enough for now in IE........ but wont work in Netscape (I've tested it in 6.2.1)..... I THINK the problem is maybe with evaluting with image to show :S...... I used a code taken from the webxpertz.com FAQ page (http://www.webxpertz.com/forums/showthread.php3?s=&threadid=17456) and...... I don't really understand it :S......

var keyvals = location.search.substring(1).split("&");
var search = new Object();
for (var i = 0; i < keyvals.length; i++) {
var temp = keyvals[i].split("=");
temp[1] = temp[1].split("+").join(" ");
search[temp[0]] = unescape(temp[1]);


anyone kow what I'm missing :S

oh and I'm using the scripts from: http://home.uleth.ca/man/photo/shimazaki/index.shtml

thanks
Lambo

piz
12-29-2002, 06:22 PM
I don't think thats question of the code.
I didn't try it but have a look at the code of popup.html:

<body><center>
<a href="javascript:window.close()">
<script>
<!--
document.write('<IMG SRC=pics/' + search.photo + '.jpg>');
/-->

</script>
</center>
</body>

Do you notice?
You hav no </a> closing tag.
Netscape browsers are sensible with tags not closed.

Lambo
12-30-2002, 12:46 AM
It wasn't even the closing link tag!!! but still thank you cos I noticed what it was straight after I fixed that!! Would still be blaming the code if you hadn't pointed me in the right direction

the: /--> wasn't right (//-->) and that was making the whole thing not work!!!
All fixed now :) so thanks heaps!
Lambo :)