Hi All,
I have a simple page that uses an anchor link to to call a function to take values from one field and drop it into another in the same form. Of course the code works in Firefox but not in IE6. IE bombs when it loads and wants to debug the calling line. Here is the function:
function sa{
if (n==1){
document.forms[0].sa.value = document.forms[0].pmaddr.value
document.forms[0].sc.value = document.forms[0].pmcity.value
document.forms[0].ss.value = document.forms[0].pmst.value
document.forms[0].sz.value = document.forms[0].pmzip.value
}
else{
document.forms[0].on1.value = document.forms[0].pmname.value
document.forms[0].oa1.value = document.forms[0].pmaddr.value
document.forms[0].oc.value = document.forms[0].pmcity.value
document.forms[0].os.value = document.forms[0].pmst.value
document.forms[0].oz.value = document.forms[0].pmzip.value
}
}
and here is the code that calls it:
<span class=sameas><a href="" onclick="sa(1);return false;">Same as Your Info</a></span>
Why does this not work?
Thanks in advance,
Jack
I have a simple page that uses an anchor link to to call a function to take values from one field and drop it into another in the same form. Of course the code works in Firefox but not in IE6. IE bombs when it loads and wants to debug the calling line. Here is the function:
function sa{
if (n==1){
document.forms[0].sa.value = document.forms[0].pmaddr.value
document.forms[0].sc.value = document.forms[0].pmcity.value
document.forms[0].ss.value = document.forms[0].pmst.value
document.forms[0].sz.value = document.forms[0].pmzip.value
}
else{
document.forms[0].on1.value = document.forms[0].pmname.value
document.forms[0].oa1.value = document.forms[0].pmaddr.value
document.forms[0].oc.value = document.forms[0].pmcity.value
document.forms[0].os.value = document.forms[0].pmst.value
document.forms[0].oz.value = document.forms[0].pmzip.value
}
}
and here is the code that calls it:
<span class=sameas><a href="" onclick="sa(1);return false;">Same as Your Info</a></span>
Why does this not work?
Thanks in advance,
Jack