Page 1 of 1

Slideshow.

Posted: Wed Dec 29, 2004 2:12 pm
by conscience
I've got a shopping cart I'm working on and need some help with finding a starting place for a particular aspect of functionality.

I've got your basic MySQL query stuffed into a variable array. One of the columns is named "itemPic". What I want to do is implement the following series of functions:

-User clicks on product photo in cart/product list.
-Small window pops up with next/back buttons and flips through the $row["itemPic"] values for that item only.
-Window closes onBlur.

Ideally, the pop-up would be called from an <a href> tag in the previous window. Do I need to create a function that draws the window as I want it, using $row["itemName"] as an argument or somesuch? Quite simply, I have no idea of how to make it happen. I've tried analysing various PHP-based slideshow scripts out there, but have just managed to confuse myself further.

Any assistance would be greatly appreciated.[/b]

Posted: Wed Dec 29, 2004 2:20 pm
by feyd
sending the unique information needed to retrieve the image(s) can easily be done through the url ($_GET variables). As for the slideshow aspect, since you are requiring Javascript, just use that to create the slideshow system. :)

Posted: Wed Dec 29, 2004 2:28 pm
by conscience
Thanks for the prompt responce.

How would I use $_GET in this instance? Could I use $_POST instead?

I'm not very Javascript-savvy, and would like to keep it all server-side, too, maybe a "Close Window" button instead of the onBlur event.

Could an example be posted of these cases? Sorry for being so dim. =P

Posted: Wed Dec 29, 2004 2:35 pm
by feyd
having a popup alone, requires javascript at some level.

$_GET is the better to use for the call, as you don't have to do special form manipulation or submissions then... If you want to avoid Javascript all together, then the slideshow should happen in the window. Once you get into a slideshow, you can then use html refreshes to switch to the next picture.

Posted: Wed Dec 29, 2004 2:41 pm
by conscience
Javascript being outside the scope of this forum, of course. ;)

Should I just read up on using $_GET and JS slides, then?

Posted: Wed Dec 29, 2004 2:49 pm
by feyd
We talk Javascript in the Clientside forum. You can do it either way.. In the past, I'd have done the whole thing in Javascript, but now that I work for more compatibility, I'd do it through php.

Posted: Wed Dec 29, 2004 2:55 pm
by conscience
Awesome. Thanks for your help, Feyd.