Mozilla 1.2.1 and Javascripts
#1
Scooby Regular
Thread Starter
Join Date: Mar 1999
Location: The Great White North
Posts: 25,080
Likes: 0
Received 0 Likes
on
0 Posts
Hi,
Just downloaded Mozilla 1.2.1 (for Mac OS X). Looks nice, and renders damn quick.
One problem though, and it could be just because I'm on a macintosh, however, I'll ask here in case it's not just Mac.
Ok the problem is with Javascript.
Sooooo, if anyone is using Mozilla (mac, PC, *nix, or anything!) then can you do me a flavor?
Fire up mozzy and pop over here
right, can you click on each of the pictures and see what happens.
What *should* happen, and does in IE, is it calls a js which opens a bigger image in a new window.
Now this is just not working for me in Mozzy, and I don't know why.
I think it could be the way I'm calling the JS code, hence the two pics, as they have different ways of calling my js function (oh and both DO work in IE)
To make things easier, the code is:
for the top picture
<A HREF="" onClick="openPictureInWindow('../../artwork/cars/exhaust/exhaust.05.06.2002.1.JPG','4040',624,464,' ');"> ;<IMG SRC="../../artwork/cars/exhaust/thumbnails/exhaust.05.06.2002.1t.JPG" BORDER=1></A>
for the bottom picture
<A HREF="javascriptpenPictureInWindow('../../artwork/cars/exhaust/exhaust.05.06.2002.1.JPG','4040',624,464,' ') "><IMG SRC="../../artwork/cars/exhaust/thumbnails/exhaust.05.06.2002.1t.JPG" BORDER=1></A>
so, why it no work? am I being really silly here?
Any help appreciated.
[Edited by Markus - 12/12/2002 3:08:29 PM]
Just downloaded Mozilla 1.2.1 (for Mac OS X). Looks nice, and renders damn quick.
One problem though, and it could be just because I'm on a macintosh, however, I'll ask here in case it's not just Mac.
Ok the problem is with Javascript.
Sooooo, if anyone is using Mozilla (mac, PC, *nix, or anything!) then can you do me a flavor?
Fire up mozzy and pop over here
right, can you click on each of the pictures and see what happens.
What *should* happen, and does in IE, is it calls a js which opens a bigger image in a new window.
Now this is just not working for me in Mozzy, and I don't know why.
I think it could be the way I'm calling the JS code, hence the two pics, as they have different ways of calling my js function (oh and both DO work in IE)
To make things easier, the code is:
for the top picture
<A HREF="" onClick="openPictureInWindow('../../artwork/cars/exhaust/exhaust.05.06.2002.1.JPG','4040',624,464,' ');"> ;<IMG SRC="../../artwork/cars/exhaust/thumbnails/exhaust.05.06.2002.1t.JPG" BORDER=1></A>
for the bottom picture
<A HREF="javascriptpenPictureInWindow('../../artwork/cars/exhaust/exhaust.05.06.2002.1.JPG','4040',624,464,' ') "><IMG SRC="../../artwork/cars/exhaust/thumbnails/exhaust.05.06.2002.1t.JPG" BORDER=1></A>
so, why it no work? am I being really silly here?
Any help appreciated.
[Edited by Markus - 12/12/2002 3:08:29 PM]
#5
Scooby Regular
Thread Starter
Join Date: Mar 1999
Location: The Great White North
Posts: 25,080
Likes: 0
Received 0 Likes
on
0 Posts
Right.
Thanks to all helping out on this. Esp Rich who gave me some ASP stuff, which means I can do what I originally wanted to do with my site.
I've also found out what the problem was.
There was a bug in my .js code. Basically it went like this:
var refExpressionObj = /[^./]/;
now, this is what Mozilla did not like. Why? well, it was basically saying to look for a newline char and remove it. When what i wanted to do was to remove any '../' type stuff from a url passed to the fucntion.
However IE seems to have an ickle bug, in that it did NOT look on the '.' for a new line, hence the reason it all worked in IE
I've now changed the code to:
var refExpressionObj = /\w/;
Which basically strips off anything that's not a number or letter. This works in both IE and Mozzy.
Thanks to Jim for his help with this bit!
Phew! now all I have to do is reinstate my old menu system, tinker with the ASP stuff, upload it all, and sit back, and chillll!
Thanks to all helping out on this. Esp Rich who gave me some ASP stuff, which means I can do what I originally wanted to do with my site.
I've also found out what the problem was.
There was a bug in my .js code. Basically it went like this:
var refExpressionObj = /[^./]/;
now, this is what Mozilla did not like. Why? well, it was basically saying to look for a newline char and remove it. When what i wanted to do was to remove any '../' type stuff from a url passed to the fucntion.
However IE seems to have an ickle bug, in that it did NOT look on the '.' for a new line, hence the reason it all worked in IE
I've now changed the code to:
var refExpressionObj = /\w/;
Which basically strips off anything that's not a number or letter. This works in both IE and Mozzy.
Thanks to Jim for his help with this bit!
Phew! now all I have to do is reinstate my old menu system, tinker with the ASP stuff, upload it all, and sit back, and chillll!
Thread
Thread Starter
Forum
Replies
Last Post
CodeKey@Lisan
Computer & Technology Related
11
20 February 2004 05:23 PM
RichB
Computer & Technology Related
2
05 November 2003 02:27 PM