Display data in HTML form when loaded

GenGorkIrrizeb

New Member
N00b alert; I know enough to be dangerous, so forgive my ignorance...I've been through all of the related questions here and elsewhere, but I just can't seem to comprehend the answer that's surely included in the responses :-(I'm posting a record id to a page where I want a form to display with the contents of the related record. I'm getting the record in correctly (confirmed using the alert) with this script in the HEAD section (jquery 1.9 is called as well):\[code\]<script type="text/javascript">function getSelectedCustomer () { ...use the id to get the right record... databaseAPI.callback = function() { if (databaseAPI.error) { alert("Database Error: " + databaseAPI.error); } else { var customerRecord = databaseAPI.result; alert("Test Callback: " + new String(customerRecord.full_name)); $("#quoteForm").load(customerRecord); } return; }; databaseAPI.ajaxGet(); }window.onload = getSelectedCustomer; </script>\[/code\]...and the form in the BODY to be loaded:\[code\]<form method="post" id="quoteForm" action="process_quote.php"><table><tbody><tr> <td>Name</td> <td><input type="text" value="http://stackoverflow.com/questions/15797320/<?php $customerRecord['full_name']; ?>" name="full_name"></td></tr>...other bits of the form...<tr> <td> <input type="submit" value="http://stackoverflow.com/questions/15797320/Submit"> </td></tr></tbody></table></form>\[/code\]I know I'm incorrectly munging various things together. Can someone please get me straightened out on what to do?
 
Top