Jump to content

Need help with XML data to populate tables...


DeyBwah

Recommended Posts

Hey everyone.

 

I have some experience with PHP and can easily modify existing code, but seem to have trouble writing the logic from scratch.

 

Situation:

 

I'm using this Jquery slider ( http://mine.tuxfamily.org/?p=74#more-74 ) and would like to populate the slides with data coming from an XML file. The data will be text, images(URIs), and links to buy. The thing is, each slide will hold 4 items, and then I want to somehow using PHP logic, allow the code to generate the next slide...

 

In other words, how would I code it so that after 4 entries, it creates a new slide?

 

I'm imagining a For loop + SimpleXML functions... but just kind of fumbling in the dark here.

 

Any direction or guidance is greatly appreciated!

 

Kind regards,

Dey

Link to comment
Share on other sites

Is your problem how to layout the XML file? Does the jQuery plugin read raw XML or JavaScript objects/arrays?

 

To make it create an extra slide if items > 4 that's something you have to write in jQuery.

 

I know how to layout the XML file.

 

The problem begins right after that. :)

 

The jQuery script that I'm using doesn't have any XML reading functionality. It was built to be hard coded.

 

I was picturing that some PHP functions/code would allow me to basically create the logic to print out my the HTML/jQuery code and populate the slides. Are you saying I need to do this in jQuery? I hope not, I'm even less versed in jQuery/JavaScript. :/

 

Please, say it ain't so!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.