Squall Leonhart
11-19-2003, 12:44 PM
Hi, guys again:)
Please take a look at this code
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript1.2" SRC="HM_Loader.js" TYPE='text/javascript'></SCRIPT>
<script language="JavaScript" type="text/javascript">
function edit(){
if(document.frmEdit.selectEdit.options.selectedIndex<0){ alert("Items are not selected");
} else {
location.href='Request_edit.asp?state=update&ID=<%=Request.Form("selectEdit").value%>';
}
}
</script>
<title>IT Request Edit</title>
<link rel="stylesheet" href="http://myteam.multiactive.com/css/global.css" type="text/css">
</HEAD>
<BODY LEFTMARGIN=0 MARGINWIDTH="0" MARGINHEIGHT="0">
<form name="frmEdit" method="post" action="request_edit.asp?state=update&ID=<%=Request.Form("frmEdit")%>" onSubmit="return dateDiff(this);">
<table ALIGN=CENTER border="0" cellpadding="3" cellspacing="1" width="100%">
<tr>
<th colspan="6" height="25"><b>Choose the item you want to edit</b></th>
</tr>
<tr>
<td width=1%> </td>
<td align=center><span class="gen"><b>Description</b></span></td>
<td width=2%> </td>
</tr>
<tr>
<td width=1%></td>
<td align=center><select name="selectEdit" style="width:300px;" size="6">
<% Do while not rsEdit.eof %>
<option value="<%=rsEdit.fields("ID")%>"><%=rsEdit.fields("description")%></option>
<% rsEdit.Movenext
Loop
%>
</select></td>
<td width=2%></td>
</tr>
<tr><td><br></td></tr>
</form>
<tr>
<th colspan="6" ><input type="submit" name="Edit" value="Edit" style="width:60px;" onclick="edit()">  <button onClick="history.go(-1)" style="width:60px;">Go back</button></th>
</tr>
</table>
</BODY>
</HTML>
I just would like to send selected value of listbox to the other page.
It seems like something wrong on this part.
} else {
location.href='Request_edit.asp?state=update&ID=<%=Request.Form("selectEdit").value%>';
}
}
</script>
Not passing values as querystring.... Any solution guys?:(
Thanks
Please take a look at this code
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript1.2" SRC="HM_Loader.js" TYPE='text/javascript'></SCRIPT>
<script language="JavaScript" type="text/javascript">
function edit(){
if(document.frmEdit.selectEdit.options.selectedIndex<0){ alert("Items are not selected");
} else {
location.href='Request_edit.asp?state=update&ID=<%=Request.Form("selectEdit").value%>';
}
}
</script>
<title>IT Request Edit</title>
<link rel="stylesheet" href="http://myteam.multiactive.com/css/global.css" type="text/css">
</HEAD>
<BODY LEFTMARGIN=0 MARGINWIDTH="0" MARGINHEIGHT="0">
<form name="frmEdit" method="post" action="request_edit.asp?state=update&ID=<%=Request.Form("frmEdit")%>" onSubmit="return dateDiff(this);">
<table ALIGN=CENTER border="0" cellpadding="3" cellspacing="1" width="100%">
<tr>
<th colspan="6" height="25"><b>Choose the item you want to edit</b></th>
</tr>
<tr>
<td width=1%> </td>
<td align=center><span class="gen"><b>Description</b></span></td>
<td width=2%> </td>
</tr>
<tr>
<td width=1%></td>
<td align=center><select name="selectEdit" style="width:300px;" size="6">
<% Do while not rsEdit.eof %>
<option value="<%=rsEdit.fields("ID")%>"><%=rsEdit.fields("description")%></option>
<% rsEdit.Movenext
Loop
%>
</select></td>
<td width=2%></td>
</tr>
<tr><td><br></td></tr>
</form>
<tr>
<th colspan="6" ><input type="submit" name="Edit" value="Edit" style="width:60px;" onclick="edit()">  <button onClick="history.go(-1)" style="width:60px;">Go back</button></th>
</tr>
</table>
</BODY>
</HTML>
I just would like to send selected value of listbox to the other page.
It seems like something wrong on this part.
} else {
location.href='Request_edit.asp?state=update&ID=<%=Request.Form("selectEdit").value%>';
}
}
</script>
Not passing values as querystring.... Any solution guys?:(
Thanks