Ok, so I'm using PHP to get the variables I need from a MySQL database, so I need to know how I should set up the list...
For example, in PHP I would have something like this for each item, one item at a time:
PHP Code:
$thisThing['title']='This One';
$thisThing['date']=date('ymd'); // date-stamp
$thisThing['description']='This one is like this';
$thisThing['image']='thisone.jpg';
...etc
Ok, so I need to set up JavaScript stuff so that I can click on a div (I'm using the onClick thing) and it will switch out 3 different divs of content... so:
Display A, B, C
Click A: Display B, C, D
OR Click C: Display Z, A, B
The first and third boxes are links (to change the content of all three boxes) and the second (middle) box has the "real" links to the actual content pages. (So 1 and 3 are like navigation for the center-part, like a gallery photo-slider, sort of)
Anyway, I am really bad with JavaScript variables and inner-html, so I'm not sure how to set it up.
Let's say there are 5 different things in the database for a consecutive M-F week... I need it to display yesterday, today, and tomorrow and I need it to be able to access all 5 without refreshing the page...
So I need the Javascript to set up "one" piece that I can repeat with PHP for the amount of entries in the database...
So like "in a PHP loop" I can create one JavaScript variable (which I can use PHP to change the names for, like "itemTitle3" or "itemTitle4" or something) and the function for if that one is clicked as a "previous" or as a "next" link (so one variable for each line and 2 functions)
Bookmarks