planeboy747
Technical User
My function "doConfirm" is not displaying the results of field id "agency" into field id "confirmation1". I'm using a onClick function to populate, but it's not working, below is all my code, any ideas?
I'm thinking, do I need to call a document.write or something??
Thanks
-----Script-----
function reviewConfirm()
{
var elem = document.getElementById("reviewConfirm");
elem.style.display = "block";
document.getElementById('second').style.display = 'none';
}
function doConfirm() {
var f = document.forms['request'];
f.elements['confirmation1'].value = f.elements['agency'].value;
}
-----onClick button-----
<a href="#confirm"><img src="images/continue.gif" value="click" alt="Continue" width="83" height="17" border="0" onclick="reviewConfirm();doConfirm();">
-----Results Displayed in HTML------
<table width="550" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="26" colspan="2" valign="top"><a name="confirm"></a>Confirm
Your Request</td>
</tr>
<tr>
<td colspan="2">Before you submit your request, please confirm your
entries below for accuracy. You can change any information by using
the back button below.</td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td height="25" colspan="2" valign="top" >Agency
Information</td>
</tr>
<tr>
<td width="148" height="20">Agency name:</td>
<td width="402" height="20" id="confirmation1"> </td>
</tr>
</table>
I'm thinking, do I need to call a document.write or something??
Thanks
-----Script-----
function reviewConfirm()
{
var elem = document.getElementById("reviewConfirm");
elem.style.display = "block";
document.getElementById('second').style.display = 'none';
}
function doConfirm() {
var f = document.forms['request'];
f.elements['confirmation1'].value = f.elements['agency'].value;
}
-----onClick button-----
<a href="#confirm"><img src="images/continue.gif" value="click" alt="Continue" width="83" height="17" border="0" onclick="reviewConfirm();doConfirm();">
-----Results Displayed in HTML------
<table width="550" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="26" colspan="2" valign="top"><a name="confirm"></a>Confirm
Your Request</td>
</tr>
<tr>
<td colspan="2">Before you submit your request, please confirm your
entries below for accuracy. You can change any information by using
the back button below.</td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td height="25" colspan="2" valign="top" >Agency
Information</td>
</tr>
<tr>
<td width="148" height="20">Agency name:</td>
<td width="402" height="20" id="confirmation1"> </td>
</tr>
</table>