I have a question in regards to passing values from one asp page to another. My problem is that I have set up a page that allows users to input multiple values into a muliple value list box. (for instance user types in 1234 presses add and value is placed in list2............) My problem is that I need to be able to pass the values in list2 to the second asp page... When I try to access the values in the second list, I don't receive any information, I can retrieve the information from list1....not list2.See the attached asp pages.
any help would be greatly appreciated!
......................................
PAGE 1
--------
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
function move(fbox,tbox) {
var i = 0;
if(fbox.value != "" {
var no = new Option();
no.value = fbox.value;
no.text = fbox.value;
tbox.options[tbox.options.length] = no;
fbox.value = "";
}
}
function remove(box) {
for(var i=0; i<box.options.length; i++) {
if(box.options.selected && box.options != "" {
box.options.value = "";
box.options.text = "";
}
}
BumpUp(box);
}
function BumpUp(abox) {
for(var i = 0; i < abox.options.length; i++) {
if(abox.options.value == "" {
for(var j = i; j < abox.options.length - 1; j++) {
abox.options[j].value = abox.options[j + 1].value;
abox.options[j].text = abox.options[j + 1].text;
}
var ln = i;
break;
}
}
if(ln < abox.options.length) {
abox.options.length -= 1;
BumpUp(abox);
}
}
function Moveup(dbox) {
for(var i = 0; i < dbox.options.length; i++) {
if (dbox.options.selected && dbox.options != "" && dbox.options != dbox.options[0]) {
var tmpval = dbox.options.value;
var tmpval2 = dbox.options.text;
dbox.options.value = dbox.options[i - 1].value;
dbox.options.text = dbox.options[i - 1].text
dbox.options[i-1].value = tmpval;
dbox.options[i-1].text = tmpval2;
}
}
}
function Movedown(ebox) {
for(var i = 0; i < ebox.options.length; i++) {
if (ebox.options.selected && ebox.options != "" && ebox.options[i+1] != ebox.options[ebox.options.length]) {
var tmpval = ebox.options.value;
var tmpval2 = ebox.options.text;
ebox.options.value = ebox.options[i+1].value;
ebox.options.text = ebox.options[i+1].text
ebox.options[i+1].value = tmpval;
ebox.options[i+1].text = tmpval2;
}
}
}
// End -->
</script>
</HEAD>
<BODY>
<form action="devx1.asp" method="POST" name="parmform">
<table>
<tr>
<td>
<input type="text" name="list1" value="">
</td>
<td>
<input type="button" value="Add" onclick="move(this.form.list1,this.form.P1)" name="B1"><br>
<input type="button" value="Delete" onclick="remove(this.form.P1)" name="B2"><br><br>
<input type="button" value="Up" onclick="Moveup(this.form.P1)" name="B3"><br>
<input type="button" value="Down" onclick="Movedown(this.form.P1)" name="B4">
</td>
<td>
<select multiple size=7 name="P1">
The Value Specified is
<%Request.Form ("P1"%>
</select>
</td>
</tr>
<td colspan="2">
<p align="center">
<input type="submit" name="B5" value="View Report">
</p>
</td>
</tr>
</table>
</form>
<p><center>
----------------------------------------------
Receiving Page
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
</HEAD>
<BODY>
<%=Request.Form%>
<BR>
<BR>
THE INFORMATION IS
<%=Request.Form("P1"%>
<P> </P>
</BODY>
</HTML>
any help would be greatly appreciated!
......................................
PAGE 1
--------
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
function move(fbox,tbox) {
var i = 0;
if(fbox.value != "" {
var no = new Option();
no.value = fbox.value;
no.text = fbox.value;
tbox.options[tbox.options.length] = no;
fbox.value = "";
}
}
function remove(box) {
for(var i=0; i<box.options.length; i++) {
if(box.options.selected && box.options != "" {
box.options.value = "";
box.options.text = "";
}
}
BumpUp(box);
}
function BumpUp(abox) {
for(var i = 0; i < abox.options.length; i++) {
if(abox.options.value == "" {
for(var j = i; j < abox.options.length - 1; j++) {
abox.options[j].value = abox.options[j + 1].value;
abox.options[j].text = abox.options[j + 1].text;
}
var ln = i;
break;
}
}
if(ln < abox.options.length) {
abox.options.length -= 1;
BumpUp(abox);
}
}
function Moveup(dbox) {
for(var i = 0; i < dbox.options.length; i++) {
if (dbox.options.selected && dbox.options != "" && dbox.options != dbox.options[0]) {
var tmpval = dbox.options.value;
var tmpval2 = dbox.options.text;
dbox.options.value = dbox.options[i - 1].value;
dbox.options.text = dbox.options[i - 1].text
dbox.options[i-1].value = tmpval;
dbox.options[i-1].text = tmpval2;
}
}
}
function Movedown(ebox) {
for(var i = 0; i < ebox.options.length; i++) {
if (ebox.options.selected && ebox.options != "" && ebox.options[i+1] != ebox.options[ebox.options.length]) {
var tmpval = ebox.options.value;
var tmpval2 = ebox.options.text;
ebox.options.value = ebox.options[i+1].value;
ebox.options.text = ebox.options[i+1].text
ebox.options[i+1].value = tmpval;
ebox.options[i+1].text = tmpval2;
}
}
}
// End -->
</script>
</HEAD>
<BODY>
<form action="devx1.asp" method="POST" name="parmform">
<table>
<tr>
<td>
<input type="text" name="list1" value="">
</td>
<td>
<input type="button" value="Add" onclick="move(this.form.list1,this.form.P1)" name="B1"><br>
<input type="button" value="Delete" onclick="remove(this.form.P1)" name="B2"><br><br>
<input type="button" value="Up" onclick="Moveup(this.form.P1)" name="B3"><br>
<input type="button" value="Down" onclick="Movedown(this.form.P1)" name="B4">
</td>
<td>
<select multiple size=7 name="P1">
The Value Specified is
<%Request.Form ("P1"%>
</select>
</td>
</tr>
<td colspan="2">
<p align="center">
<input type="submit" name="B5" value="View Report">
</p>
</td>
</tr>
</table>
</form>
<p><center>
----------------------------------------------
Receiving Page
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
</HEAD>
<BODY>
<%=Request.Form%>
<BR>
<BR>
THE INFORMATION IS
<%=Request.Form("P1"%>
<P> </P>
</BODY>
</HTML>