havey
07-08-2003, 09:36 AM
I have a form that has two sets of radios running independently,
1st set is called wor and the second set is called wok, I run a function that adds wor+wok to produce a value for the variable "tot". My situation is that I don't want to send wor and wok into the url, I have a few more forms to pass the url string and parse it from, but they automatically get strung along, I don't need tose value pairs....and I believe they are causeing the NaNs:
Language.htm?age=10&edu=20&occ=4&gua=NaN& reg=NaN& tot=16&wor=16&wok=2
the previous forms url is fine:
Experience.htm?age=10&edu=20&occ=14&gua=10 & reg=5
Is there a way to have a radio button form using the get method to another form not have the radio buttons value pairs pass in the url? Or a way to deal with the NaNs
Thank You forum and supporters!
more page code below:
<!-- Begin
var tot = "";
function Process(){
var firstRG = document.f6.wor;
var secRG = document.f6.wok;
var t1 = 0,t2 = 0,tot = 0;
for(var n=0;n<firstRG.length;n++){
if(firstRG[n].checked){
t1 = parseInt(firstRG[n].value);
break;
}
}
for(var x=0;x<secRG.length;x++){
if(secRG[x].checked){
t2 = parseInt(secRG[x].value);
break;
}
}
tot = t1+t2;
if(tot>16){
tot = 16;
}
document.f6.tot.value = tot;
}
window.onload = updateRunningScore;
function updateRunningScore(){
var sStr = document.location.search;
val = parseInt(sStr.substring(sStr.indexOf("=")+1,sStr.length));
va2 = parseInt(sStr.substring(sStr.indexOf("edu=")+4,sStr.length));
va3 = parseInt(sStr.substring(sStr.indexOf("occ=")+5,sStr.length));
va4 = parseInt(sStr.substring(sStr.indexOf("gua=")+6,sStr.length));
va5 = parseInt(sStr.substring(sStr.indexOf("reg=")+7,sStr.length));
document.f6.age.value = val;
document.f6.edu.value = va2;
document.f6.occ.value = va3;
document.f6.gua.value = va4;
document.f6.reg.value = va5;
}
// End -->
</script>
<body>
<form name="f6" method="GET" action="Language.htm">
<input type="hidden" name="age" value="">
<input type="hidden" name="edu" value="">
<input type="hidden" name="occ" value="">
<input type="hidden" name="gua" value="">
<input type="hidden" name="reg" value="">
<input type="hidden" name="tot" value="">
1st set is called wor and the second set is called wok, I run a function that adds wor+wok to produce a value for the variable "tot". My situation is that I don't want to send wor and wok into the url, I have a few more forms to pass the url string and parse it from, but they automatically get strung along, I don't need tose value pairs....and I believe they are causeing the NaNs:
Language.htm?age=10&edu=20&occ=4&gua=NaN& reg=NaN& tot=16&wor=16&wok=2
the previous forms url is fine:
Experience.htm?age=10&edu=20&occ=14&gua=10 & reg=5
Is there a way to have a radio button form using the get method to another form not have the radio buttons value pairs pass in the url? Or a way to deal with the NaNs
Thank You forum and supporters!
more page code below:
<!-- Begin
var tot = "";
function Process(){
var firstRG = document.f6.wor;
var secRG = document.f6.wok;
var t1 = 0,t2 = 0,tot = 0;
for(var n=0;n<firstRG.length;n++){
if(firstRG[n].checked){
t1 = parseInt(firstRG[n].value);
break;
}
}
for(var x=0;x<secRG.length;x++){
if(secRG[x].checked){
t2 = parseInt(secRG[x].value);
break;
}
}
tot = t1+t2;
if(tot>16){
tot = 16;
}
document.f6.tot.value = tot;
}
window.onload = updateRunningScore;
function updateRunningScore(){
var sStr = document.location.search;
val = parseInt(sStr.substring(sStr.indexOf("=")+1,sStr.length));
va2 = parseInt(sStr.substring(sStr.indexOf("edu=")+4,sStr.length));
va3 = parseInt(sStr.substring(sStr.indexOf("occ=")+5,sStr.length));
va4 = parseInt(sStr.substring(sStr.indexOf("gua=")+6,sStr.length));
va5 = parseInt(sStr.substring(sStr.indexOf("reg=")+7,sStr.length));
document.f6.age.value = val;
document.f6.edu.value = va2;
document.f6.occ.value = va3;
document.f6.gua.value = va4;
document.f6.reg.value = va5;
}
// End -->
</script>
<body>
<form name="f6" method="GET" action="Language.htm">
<input type="hidden" name="age" value="">
<input type="hidden" name="edu" value="">
<input type="hidden" name="occ" value="">
<input type="hidden" name="gua" value="">
<input type="hidden" name="reg" value="">
<input type="hidden" name="tot" value="">