Below is some javascript to check that email addresses match.
I have put some debug bits in to see what is going on.
The results I get are:
alert box "testing"
alert box "[object HTMLInputElement]
alert box "testing2"
What has happened to 'email1'? (It does have content BTW)
Mike
<input type="text" name="INVOICEEMAIL" id="email1" size="20" maxlength="255" value="<Actinic:Variable Name="InvoiceEmail"/>" />
<BR />
<BR />
<input type="text" name="DUMMY" id="email2" size="20" maxlength="255" value="<Actinic:Variable Name="InvoiceEmail"/>" />
<script language=JavaScript>
<!--
function checkemailaddress()
{
var x=document.getElementById('email1');
var y='testing2';
alert('testing');
alert (x);
alert (y);
if ( document.getElementById('email1').value != document.GetElementById('email2').value )
{
alert('The email Addresses do not match');
return false;
}
alert('The email addresses match');
return true;
}
// -->
</script>
</td>
<a href="" onclick="return checkemailaddress()">TEST</A>
I have put some debug bits in to see what is going on.
The results I get are:
alert box "testing"
alert box "[object HTMLInputElement]
alert box "testing2"
What has happened to 'email1'? (It does have content BTW)
Mike
<input type="text" name="INVOICEEMAIL" id="email1" size="20" maxlength="255" value="<Actinic:Variable Name="InvoiceEmail"/>" />
<BR />
<BR />
<input type="text" name="DUMMY" id="email2" size="20" maxlength="255" value="<Actinic:Variable Name="InvoiceEmail"/>" />
<script language=JavaScript>
<!--
function checkemailaddress()
{
var x=document.getElementById('email1');
var y='testing2';
alert('testing');
alert (x);
alert (y);
if ( document.getElementById('email1').value != document.GetElementById('email2').value )
{
alert('The email Addresses do not match');
return false;
}
alert('The email addresses match');
return true;
}
// -->
</script>
</td>
<a href="" onclick="return checkemailaddress()">TEST</A>
Comment