473,320 Members | 1,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

ASP VBScript sub response.redirect

cokeonice
I have a form with a reset button. I am using session variables with my form and want to be able to clear them if the user presses reset. I have tried creating a sub (vbscript in HEAD) with a line like this:

Session("thisvar")=""

The sub gets executed when I click on the reset button but errors on the session variable.

So, then I thought I would clear the session variables in a separate ASP page and do a response.redirect from that sub. Now I get an error that says:

Error: Object required: 'response'

Error image

Help?
Apr 6 '07 #1
2 3844
jhardman
3,406 Expert 2GB
Use some hidden input, set its value to "reset" with javascript when the reset is clicked, then reset the session variables when the form is submitted if the hidden input = "reset"

does that make sense?

Jared
Apr 10 '07 #2
iam_clint
1,208 Expert 1GB
thats because you can't call a asp sub from a webpage

ASP is serverside works like this...


Browser connects to your site, your site does all of its work (asp) then sends this to the browser after the work is complete. at no time the user never sees or has the ability to call functions or subs in asp. because it disconnects from the server after everything is loaded.



now

you can use javascript and do window.location = "blah.asp";
Apr 10 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

29
by: Christopher Brandsdal | last post by:
If I have a .ASP page that runs JScript code - is it possible to include an ..ASP page that runs VBscript???
16
by: Mike Schinkel | last post by:
Does anyone know if there are bugs in VBScript's GetRef()? I'm using VBScript Version 5.6.8515 on Win2003Server w/ASP. Sometimes it returns an object that VarType() says is a vbObject. Other...
4
by: Lam | last post by:
I try to use qs = Server.URLEncode(Request.Querystring) session("fromURL") = request.ServerVariables("HTTP_REFERER")& Server.HTMLEncode(qs) on the login page then on the next page I use...
1
by: JNariss | last post by:
Hello, I have created a connection to my Access database with Dreamweaver and made a simple form with 4 fields. The code behind this form was/is: <%@LANGUAGE="VBCRIPT" CODEPAGE="1252"%>...
2
by: JNariss | last post by:
I keep getting the following error message when trying to preview my page: Microsoft VBScript compilation error '800a0400' Expected statement /TESTESC.asp, line 33
7
by: skeddy | last post by:
In a nutshell, I'm trying to dynamically create a select box with ResultSet code in vbscript and then need to be able to access the value of that select box later with a Save button. I've got...
12
by: Jim Rodgers | last post by:
I have a big asp file that has an error under certain conditions -- totally repeatable. However, it only fails when I set response.buffer = True at the top. WHen I set it False in order to debug...
5
by: =?Utf-8?B?R1ROMTcwNzc3?= | last post by:
Hi Guys, It's been a while, I've got a small problem that I could do with your expertise on. As you know (I Think) I build websites for recruitment agencies, part of the website includes a job...
3
by: nitewriter | last post by:
Hi, Can someone help me with this scripts, it works on a different server but gives me error now, This is the error I now get Microsoft VBScript runtime error '800a01f4' Variable is...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.