Php and ajax problem with getting back to original data in s

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
Darla
Forum Newbie
Posts: 16
Joined: Mon Feb 12, 2007 8:27 am

Php and ajax problem with getting back to original data in s

Post by Darla »

Hello

I am kind of a newbie at ajax. I have a little table displaying some variables, and listbox which triggers the ajax ->javascript->php page. The table displaying the variables is the placeholder (inside a div tag), the table values change upon selecting values here. The change when selecting from the listbox is displaying an average of the values based on date, when the user enter the page the initial values are displayed.

My problem is when the user select from the listbox the table values change accordingly. But how do I get back to the original content/home of the page? I wish to use the same graphical element/same div tag.

I tried creating a jsscript for going the other way, It worked except that the listbox no longer triggers the ajax..

Darla
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

is the SELECT inside the DIV? It sounds like you're just overwriting it. What about putting it outside the DIV?
Darla
Forum Newbie
Posts: 16
Joined: Mon Feb 12, 2007 8:27 am

Post by Darla »

I have tried the select both outside and inside the div. The select appears but with empty values (I use a javascript for loop to list up all 24 hours). I also have a calendar which appears as it should be but when I select a date nothing happens, the function to show average using ajax does not take effect at all.
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

we'll definitely need some code for this one... and an example URL would help as well
Post Reply