Slideshow.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
conscience
Forum Commoner
Posts: 33
Joined: Mon Dec 27, 2004 12:34 pm

Slideshow.

Post 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]
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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. :)
conscience
Forum Commoner
Posts: 33
Joined: Mon Dec 27, 2004 12:34 pm

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
conscience
Forum Commoner
Posts: 33
Joined: Mon Dec 27, 2004 12:34 pm

Post by conscience »

Javascript being outside the scope of this forum, of course. ;)

Should I just read up on using $_GET and JS slides, then?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
conscience
Forum Commoner
Posts: 33
Joined: Mon Dec 27, 2004 12:34 pm

Post by conscience »

Awesome. Thanks for your help, Feyd.
Post Reply