Click to See Complete Forum and Search --> : seeking advice re: Khalid Ali's slideshow script
raivon
01-05-2004, 04:56 AM
Greetings,
Am completely baffled at my attempt to utilise Khalid's slideshow script. I'm sure it doesn't help that I only have an Intro to Javascript class under my belt and that was some time ago...
Anyway - I originally tested the script on my site with only 12 items in the arrays. I should say that I stuck in my own thumbnails in the first array, while leaving Khalid's urls in the second array intact. It worked beautifully, when clicking on a thumbnail, a new window opened.
The problem came in when I added items to the first array, and put my own corresponding urls in the second. I no longer get a new window when clicking on the thumbnail.
The site is here:
slideshow test (http://www.soltran.com.au/jubilee/gallery.htm)
Attached is my .js file in plain text.
Can anyone please advise and save me a gray hair or two?
raivon
Khalid Ali
01-05-2004, 06:33 AM
whats the error you are getting I just went to the link above (Mozilla 1.4.1) and it seems like its workig perfectly..
Post your desired results as well as the results which you think are not correct.
If some one else does not help you,I'll be able to help you this evening.
raivon
01-05-2004, 08:05 AM
:o
I think? that we can only put this one down to operator error, as it's working for me now too. Previously the clicked thumbnail was simply opening in the same window as the original webpage, which is not what I wanted. (IE6)
It's a lovely piece of work there, Khalid, and I am very grateful to you for sharing it. And thanks for looking at it. :)
raivon
raivon
01-05-2004, 09:36 AM
I am wondering... if this is possible - Is there any way that this little function could be modified in order to accommodate an if/else statement.
function openImageURL(obj){
var url = getImageURL(obj);
var newWin = window.open(url,"newWin");
}
I'd be looking to do something that Olerag had answered in another post - his code:
var aWindow;
function openWin(URL) {
var winName = "newwin";
var winAttr = "toolbar=no," +
"menubar=no";
if ( (!aWindow) || (aWindow.closed() ) {
aWindow = window.open(URL,winName,winAttr);
}
else {
aWindow.focus();
}
}
Specifically, what I'd like to do is - if my "newWin" in the slideshow script isn't the active window - to bring the focus back to it, when the user clicks the next thumbnail. Fingers crossed that this makes sense.
tia
raivon
Khalid Ali
01-05-2004, 05:40 PM
it should work.try it and let me know,I'll try to help you in case any problems
ANd you are wellcome
:D
raivon
01-16-2004, 07:22 AM
and having troubles when trying to view the slideshow in Netscape 6.2 and Opera. In Mozilla 1.6 and IE, the slideshow is working as intended.
Brief synopsis - the thumbnails should be clickable, and pull the url out of the second array in the script. However, in NN and Opera, I get an undefined error in the address bar of the browser. The site error logs read thus:
File does not exist: /home/jubilee/public_html/404.shtml
File does not exist: /home/jubilee/public_html/undefined
even though the URL is correctly defined in the 2nd array as:
blahblah.com/PhotoGal/2kArnold_jpeg.htm (for instance)
The site is here: jubilee (http://www.jubileepugs.com/gallery.htm)
Can anyone tell me how to fix this?
tia
raivon
Khalid Ali
01-16-2004, 09:04 AM
ok....buddy...I wen t to the link you posted above and viewed it with
Mozilla 1.4.1
Netscape 7.1
Opera 7.10
IE 6.1
An nowehre I got any errors everything worked it was suppose to be...
raivon
01-16-2004, 09:18 AM
Just finished d/l NN 7.1 and yep, it works. Guess I'll be updating Opera next.
Sorry to ruffle your feathers, Khalid. I still appreciate the script.
raivon <---- generally a buddette ;)
Khalid Ali
01-16-2004, 09:27 AM
:p
No problems...just glad to be of help