DdYrSstr
01-04-2007, 04:30 PM
I am using a javascript given to be by a helpful member (vwphillips). The code works great, but I am not getting the data tranferred into my forms. So from the users standpoint everything works great but on my side when I receive the completed form I don't get the data they selected. I am using FrontPage and the rest of the form is working fine. The page with an example of this problem is www.affordyourbills.com/example.htm (http://www.affordyourbills.com/example.htm)
When the user selects their "home value" the other options are generated. But once I get the completed form the only values that are missing are options generated by the code. If the user chooses not the select the other options, then the "Select One" is transmitted to me.
Here is the code that I originally began with... the code with options is too large to post, but is on the previously mentioned link.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<script language="JavaScript" type="text/javascript">
<!--
var Ary1=[];
Ary1[1]=['Topic 1','Topic 2'];
Ary1[2]=['Topic 3','Topic 4'];
function Populate(obj,ary,sela,selb){
var args=Populate.arguments;
var index=args[0].selectedIndex;
if (index<1){ return; }
for (var zxc0=2;zxc0<args.length;zxc0++){
var sel=document.getElementById(args[zxc0]);
sel.options.length=0;
sel.options[0]=new Option('Select','',true,true);
for (var zxc1=0;zxc1<ary[index].length;zxc1++){
sel.options[zxc1+1]=new Option(ary[index][zxc1],'',true,true);
}
sel.selectedIndex=0;
}
}
//-->
</script>
</head>
<body>
<select onclick="Populate(this,Ary1,'Sel2','Sel3');" >
<option >Select</option>
<option >List 1</option>
<option >List 2</option>
</select>
<select id="Sel2">
<option >EMPTY</option>
</select>
<select id="Sel3">
<option >EMPTY</option>
</select>
</body>
</html>
Thank you for any help!!!
Jeremy
When the user selects their "home value" the other options are generated. But once I get the completed form the only values that are missing are options generated by the code. If the user chooses not the select the other options, then the "Select One" is transmitted to me.
Here is the code that I originally began with... the code with options is too large to post, but is on the previously mentioned link.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<script language="JavaScript" type="text/javascript">
<!--
var Ary1=[];
Ary1[1]=['Topic 1','Topic 2'];
Ary1[2]=['Topic 3','Topic 4'];
function Populate(obj,ary,sela,selb){
var args=Populate.arguments;
var index=args[0].selectedIndex;
if (index<1){ return; }
for (var zxc0=2;zxc0<args.length;zxc0++){
var sel=document.getElementById(args[zxc0]);
sel.options.length=0;
sel.options[0]=new Option('Select','',true,true);
for (var zxc1=0;zxc1<ary[index].length;zxc1++){
sel.options[zxc1+1]=new Option(ary[index][zxc1],'',true,true);
}
sel.selectedIndex=0;
}
}
//-->
</script>
</head>
<body>
<select onclick="Populate(this,Ary1,'Sel2','Sel3');" >
<option >Select</option>
<option >List 1</option>
<option >List 2</option>
</select>
<select id="Sel2">
<option >EMPTY</option>
</select>
<select id="Sel3">
<option >EMPTY</option>
</select>
</body>
</html>
Thank you for any help!!!
Jeremy