#00AF33
14306
0
1
Sept 8, 2023 8:54:17 GMT -8
Jordan
What is truth?
11,838
October 2003
jab2
|
Post by Jordan on Nov 11, 2011 15:28:04 GMT -8
Something like this
// Start AffData var data = { firstField: "ie", secondField: "work with me", newField: "data here" }; // Stop AffData
var loadData = function() { document.getElementById("firstField").value = data.firstField; document.getElementById("secondField").value = data.secondField; document.getElementById("newField").value = data.newField; }
var field1Value = document.getElementById("firstField").value; var field2Value = document.getElementById("secondField").value; var field3Value = document.getElementById("newField").value; // String which will replace what is currently in the main header var str = "var data = {\n\t\tfirstField: \"" + field1Value + "\",\n\t\tsecondField: \"" + field2Value + "\",\n\t\tnewField: \"" + field3Value + "\"\n\t};";
<div id="affiliate_admin" style="display: none;"> <table width="92%" cellspacing="0" cellpadding="0" align="center"> <tr> <td valign="top" width="100%"> Affiliate Page<br /> <input type="text" id="firstField" value="" /><br /> <input type="text" id="secondField" value="" /><br /> <input type="text" id="newField" value="" /><br /> <input type="button" id="saveButton" value="Save" onclick="NightsAffiliates.save()" /> </td> </tr> </table> </div>
|
|