Hello all, My dilemma is this. I have a simple form with several text fields, checkboxes, and textareas. I also have a SimpleModal box that opens from a hyperlink on the form. In this Modal box, I have a simple search form that returns search data from a mysql database. The returned search data (names) is displayed and is hyperlinked for a return to the main form. When the data returns, I display it in a 'div' tag. The problem is when I go to submit the form via .ajax and serialize(), I can not retrieve the data from the 'div' tag. Any help will be greatly appreciated.
Below is some of my searching and updating script. Thank you. JohnM interface.js /****************************/ // Search functions // /***************************/ function getSearchResults(string, offset, pageSize) { $.ajax({ url: ('_searchPIs.php'), //Here's where I get the search data from the DB type: 'POST', data: "str="+ string + "&offset="+offset+"&pageSize="+pageSize +"&ms="+ new Date().getTime(), timeout: 2000, error: function(){ /* alert('Error. Changes have not been saved.'); $('#submitButton').removeClass('locked'); $('#loader').removeClass('active'); */ }, success: function(results) { setSearchContents(results); } }); } function setSearchContents(html) { $('#piSearchResults').html(html); } function selectEmployee(zpid) { $.modal.close(); updatePI(zpid); } function updatePI(zpid) { $.ajax({ url: ('_updatePI.php'), type: 'POST', data: 'zpid='+ zpid +"&ms="+ new Date().getTime(), timeout: 2000, error: function(){ /* alert('Error. Changes have not been saved.'); $('#submitButton').removeClass('locked'); $('#loader').removeClass('active'); */ }, success: function(results) { // This is where I update the 'div' tag on the main form $('#PI').html(results); // Here's where I tried to update the main form $('#piResults').html(results); } }); }