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 ?

Link to comment
Share on other sites

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

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.