How do I populate popup link when processing serverside?
How do I populate popup link when processing serverside?
I have a datatable where each row has an edit icon, that when clicked should open up a popup div. There is also a button on the page above the table that opens the popup div, for the user to add a new row to the database. When the button or edit icon is clicked, the page is reloaded with some parameters in the url to tell it which row is being edited, or if it's a new row. The problem seems to be that when I reload the page I end up getting a bad json response, and when I look at the response it looks like all of the html from the page instead of what I am requesting from my database. So there is some sort of conflict going on. I should mention that I am using the Zend Framework.
Can someone explain to me what is happening when the page gets reloaded? What happens with my request? Is there a better way to do this?
Answers
It turns out my whole problem was that in my datatables initialization for the ajax url I was using a relative path to my action. I replaced that with an absolute path (the entire url to my action) and that solved my problem, yipee!