olcentum
09-13-2008, 09:00 PM
Can any one help me in figuring out how to change onclick="zxcAddInput('tst')
The head is
function zxcAddInput(zxcid,zxccbid)
the html that I want to replace the ('tst') with is
<table style="text-align: left; width: 100px;" border="2"
cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td
style="vertical-align: middle; white-space: nowrap; text-align: center;">
<br>
</td>
</tr>
<tr>
<td align="center" nowrap="nowrap"
valign="middle">
<table style="text-align: left; width: 100px;"
border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td align="center" nowrap="nowrap"
valign="middle"><input maxlength="30"
name="test1" value="test1"></td>
</tr>
<tr>
<td align="center" nowrap="nowrap"
valign="middle"><input maxlength="30"
name="test2" value="test2"></td>
</tr>
<tr>
<td align="center" nowrap="nowrap"
valign="middle"><input maxlength="30"
name="test3" value="test3"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
</tr>
</tbody>
</table>
</body>
</html>
-----------------------------
The whole form script is
<html>
<head>
<script language="JavaScript" type="text/javascript">
<!--
function zxcAddInput(zxcid,zxccbid){
var zxcp=document.getElementById(zxcid);
var zxce=zxcES('P',{},zxcp)
var zxcip=zxcES('INPUT',{});
zxcip.type='text';
zxcip.name='MyName';
zxcES(zxcip,{},zxce);
}
function zxcED(zxccb,zxcnme){
var zxcels=zxccb.form.elements;
for (var zxc0=0;zxc0<zxcels.length;zxc0++){
if (zxcels[zxc0].name&&zxcels[zxc0].name=='MyName'){
}
}
}
function zxcES(zxcele,zxcstyle,zxcp,zxctxt){
if (typeof(zxcele)=='string'){ zxcele=document.createElement(zxcele); }
for (key in zxcstyle){ zxcele.style[key]=zxcstyle[key]; }
if (zxcp){ zxcp.appendChild(zxcele); }
if (zxctxt){ zxcele.appendChild(document.createTextNode(zxctxt)); }
return zxcele;
}
//-->
</script>
<title></title>
</head>
<body>
<form>
<div id="tst"><input name="Add" value="Add"
onclick="zxcAddInput('tst');zxcAddInput('tst');zxcAddInput('tst');"
type="button"></div>
</form>
I need the 3 lines of text in the form but would rather have them in a table like above.
-ol
The head is
function zxcAddInput(zxcid,zxccbid)
the html that I want to replace the ('tst') with is
<table style="text-align: left; width: 100px;" border="2"
cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td
style="vertical-align: middle; white-space: nowrap; text-align: center;">
<br>
</td>
</tr>
<tr>
<td align="center" nowrap="nowrap"
valign="middle">
<table style="text-align: left; width: 100px;"
border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td align="center" nowrap="nowrap"
valign="middle"><input maxlength="30"
name="test1" value="test1"></td>
</tr>
<tr>
<td align="center" nowrap="nowrap"
valign="middle"><input maxlength="30"
name="test2" value="test2"></td>
</tr>
<tr>
<td align="center" nowrap="nowrap"
valign="middle"><input maxlength="30"
name="test3" value="test3"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
</tr>
</tbody>
</table>
</body>
</html>
-----------------------------
The whole form script is
<html>
<head>
<script language="JavaScript" type="text/javascript">
<!--
function zxcAddInput(zxcid,zxccbid){
var zxcp=document.getElementById(zxcid);
var zxce=zxcES('P',{},zxcp)
var zxcip=zxcES('INPUT',{});
zxcip.type='text';
zxcip.name='MyName';
zxcES(zxcip,{},zxce);
}
function zxcED(zxccb,zxcnme){
var zxcels=zxccb.form.elements;
for (var zxc0=0;zxc0<zxcels.length;zxc0++){
if (zxcels[zxc0].name&&zxcels[zxc0].name=='MyName'){
}
}
}
function zxcES(zxcele,zxcstyle,zxcp,zxctxt){
if (typeof(zxcele)=='string'){ zxcele=document.createElement(zxcele); }
for (key in zxcstyle){ zxcele.style[key]=zxcstyle[key]; }
if (zxcp){ zxcp.appendChild(zxcele); }
if (zxctxt){ zxcele.appendChild(document.createTextNode(zxctxt)); }
return zxcele;
}
//-->
</script>
<title></title>
</head>
<body>
<form>
<div id="tst"><input name="Add" value="Add"
onclick="zxcAddInput('tst');zxcAddInput('tst');zxcAddInput('tst');"
type="button"></div>
</form>
I need the 3 lines of text in the form but would rather have them in a table like above.
-ol