PDA

View Full Version : Swiss Army slideshow: onclick event and specs parameter conflict



richy
10-17-2007, 12:57 PM
1) Script Title: Swiss Army Image Slideshow

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/swissarmy/index.htm

3) Describe problem:
Hello great script thanks for writing it, I want some javascript to run using the onclick event as well as using the _new parameter and specifying the size of the window etc using the specs parameter.

EG here is the some of my code.

slides[0] = ["photo1.jpg","http://www.google.com","_new"];
slides.specs='width=800,height=445,location=yes,scrollbars,status,resizable,toolbar,menubar';
slides.onclick="s_objectID='HP_Large_Promo'";

I assume the format of the new window is handled by the onclick event which is already in use. I haven't looked at the code to see this is the case though.

It seems the two can't be used together it might be worth mentioning this in the script documentation. Or perhaps concatenating the two so they can both run in the onclick?

In the meantime I have got round this by adding an onclick event to a surrounding div that incorporates the slideshow.

Thanks
Rich