MOON
Server: Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4
System: Linux vps.panamaemb.org.sg 3.10.0-1160.80.1.vz7.191.4 #1 SMP Thu Dec 15 20:31:06 MSK 2022 x86_64
User: panama (500)
PHP: 5.2.17
Disabled: NONE
Upload Files
File: /home/panama/public_html_old/managesite/js/addHTMLControls.js
// JavaScript Document
var arrInput = new Array(0);
  var arrInputValue = new Array(0);

function addInput() {
  arrInput.push(arrInput.length);
  arrInputValue.push("");
  display();
}

function display() {
  document.getElementById('parah').innerHTML="";
  for (intI=0;intI<arrInput.length;intI++) {
    document.getElementById('parah').innerHTML+=createInput(arrInput[intI], arrInputValue[intI]);
  }
}

function saveValue(intId,strValue) {
  arrInputValue[intId]=strValue;
}  

function createInput(id,value) {
 // return "<input type='text' id='test "+ id +"' onChange='javascript:saveValue("+ id +",this.value)' value='"+ value +"'><br>";
  return '<table cellpadding="0" cellspacing="0" border="0" width="100%">
							<tr>
							  <td align="right" class="textbold" valign="top">PDF Title-1 &nbsp;</td>
							  <td colspan="2"><input name="pdftitle1" id="pdftitle1'+ id +'" type="text" class="required" value="'+value+'" size="40" /><br /><span class="error">&nbsp;<?php echo $err_title1;?></span></td>
                  		  </tr>
						  <tr>
							  <td align="right" class="textbold" valign="top">PDF-1 &nbsp;</td>
							  <td colspan="2"><input name="firstpdf" id="firstpdf'+ id +'" type="file" class="filebrowse" size="40" /> <br /><span class="error">&nbsp;<?php echo $err_pdf1;?></span></td>
							</tr>';
}

function deleteInput() {
  if (arrInput.length > 0) { 
     arrInput.pop(); 
     arrInputValue.pop();
  }
  display(); 
}