I have a javascript function which acts as a submit for a ColdFusion program. The argument 'basetab' is a variable in the program.
<form
name = "pers3form"
method = 'post'
onsubmit = "person2('#basetab#')">
Here is the javascript. The Id's nexter, prever,xrepem are created from a radio list within the form. The target is a variable that exists in the form and the javascript is picking it up correctly.
function person2(target){
var a = document.getElementById('nexter').checked;
var b = document.getElementById('prever').checked;
var c = document.getElementById('xrepem').checked;
if(a == true || b == true){
document.pers3form.action ="persnextprev.cfm";}
else if (c == true) {
document.pers3form.action = 'xrepem.cfm';}
else {
document.pers3form.action = 'screen1.cfm?basetab=target';}
return true;
}
When the action is to screen1 the basetab is picked up as a url in screen1. But it picks up the name 'target' instead of the value of target, which is the real basetab.
Is there a way to pass the value of target instead of the string?