If I call this module, revise.php, from an .html module with: $.post("revise.php", {id: revId, revData: revFlg, dName: dispName}, showResultsFromServer, "json"); the table/form will not be produced. You get a blank screen. Firebug shows the Response as: with no errors. How can I get ths table/form to show??
revise.php run as a standalone you get this: . The array is produced by php/mysql and is what will be encoded as JSON and sent to the call back function.
Thanks in advance for your help, RP
Code: Select all
foreach($rowsRead[0] as $key => $value) {
if($value!="") $connectData[$key]=$value;
}
printf("<div id='who'>");
printf("<fieldset class='rev1'>");
printf("<legend>Revising Record %s </legend>", $revId);
printf("<form name='revContactForm' id='revContactForm' method='POST' action=''>\n");
printf("<table class='revForm' border='3' cellpadding='5' bgcolor='#feede3' ><tr>\n");
printf("<td><input type='text' hidden='hidden' name='revFlg' id='revFlg' value='true'></input></td></tr>\n");
printf("<td><input type='text' hidden='hidden' name='revId' id='revId' value=%s></input></td></tr>\n",$revId);
foreach($rowsRead[0] as $key => $value) {
if($key=='Name_ID' | $key=='Vendor_ID') {
continue;
};
printf("<td><label for='%s'>%s</label></td>\n",strtolower($key), preg_replace("/_/"," ",$key));
if($key=="Display_Name") {
printf('<td><input type="text" name="%s" onfocus="showDisplayName();" id="%s" value="%s"></input></td></tr>\n',
strtolower($key), strtolower($key), $value);
continue;
};
if (contains($key, "Notes")) {
printf("<td><textarea name='%s' id='%s' rows=5 cols=81> '%s' </textarea></td></tr>\n",strtolower($key),
strtolower($key), $value);
continue;
};
printf("<td><input type='text' name='%s' id='%s' value='%s'></input></td></tr>\n", strtolower($key), strtolower($key), $value);
}; // for each
printf("<tr><td><input type='submit' class='hov' name='submit' value='Save Contact Data'></input></td></tr>\n");
printf("</table></form></fieldset></div>\n");
printf("<div id='inputForm'></div>\n"); // <!-- inputForm -->\n");
printf("<div id='controls'>\n");
//printf("<button type='button' class='hov' name='connect' onclick=window.location.href='ContactFrontEnd.php'>Go Back</button>\n");
//printf("<button type='button' class='hov' name='savContact' value='Save Contact Data' onclick=saveContact()>Save Contact</button>\n");
//printf("<input type='submit' class='hov' name='submit' id='submit' value='Save Contact Data'></input>\n");
printf("</div>\n");
printf("<div id='rbox'>\n</div>\n");
printf("<div id='rbox2'>\n</div>\n");