|
-
Apr 6th, 2001, 01:19 PM
#1
Thread Starter
Lively Member
I'm brand new to asp so bear with me.
I have an asp page with a text box, a pulldown list and a 'submit' button.
I'd like to set session values using the submit button without going to another file.
For example,
...
<HEAD><SCRIPT LANGUAGE="JavaScript"><!-- Begin
function SubmitInfo() {
var msg
<%
Session("Name")=request("Name")
Session("UseDb")= request("useDB")
msg = session("UseDb")
%>
window.alert("Database selected: " + msg);
}
// End --></SCRIPT></HEAD>
...
<form name="EnterInfo">
<B>Name:  </B><input type="text" name="name" size=8><BR>
<SELECT NAME="UseDb" STYLE="Height: 24px; Width: 75px">
<OPTION VALUE="SwitchDbCops2">Cops 2
<OPTION VALUE="SwitchDbCops1">Cops 1
</SELECT>
<input type="submit" value="Save Info" onClick="SubmitInfo();">
</form>
...
The above does not work (I assume because it can't request itself).
Does anyone know how I could modify this so it could work.
Either Javascript or VBscript is fine with me.
Thanks in advance,
rlb_wpg
-
Apr 6th, 2001, 01:43 PM
#2
Hyperactive Member
try this
<form action = thisform.asp method=post>
etc
should do it
VB6.0 SP4
Windows 2000
I'm thinking of a number between
-
Apr 6th, 2001, 01:45 PM
#3
also give you submit button a name then you can do this
If request.form("Submitbuttonsname") = "Save Info" then
'blah blah blah
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|