Jump to content

can I have an ajax query coming from a div generated by ajax ?


lonewolf217

Recommended Posts

I am having a little trouble with something and I am not sure if I am doing it correctly, or if it is even possible.

 

I have a simple php page that will query a database and return a list of items in a table which will be displayed in a div on the first page via an AJAX query.  My question is basically, can I have another link within this div that will do another AJAX query to return changed data to the same div ?

 

Say for example, in this list of items that were displayed in the table I wanted to sort them.  Within this div I have a dropdown with a distinct list of categories that were returned.  Can I have another query which will take the value of that dropdown and regenerate the list into the same div on the first page?  If it is possible, would the javascript portion of the new AJAX query go on the original page, or on the backend page ?

basically I want to have a link within the div populated by the initial AJAX query which will update the content of that div without refreshing the page.

 

When I had initially tried this, any link that was generated by the backend page via AJAX query did not seen to recognize any javascript function that was on the front end page so I was wondering how it was supposed to be designed

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.