Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change a variable based on form submission

Status
Not open for further replies.

Bamarama

Programmer
Dec 29, 2006
49
US
Hello gang, here I am with another, difficult to explain question.

I have a page called vars.asp this contains a ling list of variables that are used on various pages through the site. What I want to do is to be able to change the value of a variable on that page by a form submission on another.
example,...
if on the vars.asp page var1 = "Hello World"
on another page i have a form that Based on the textbox, needs to change that var1 value to "Goodbye World"

I understand that write permissions need to be in place.

I have searched for an answer to this, but I am not sure what to actually search for. Would this use FileSystem, JS, VB, or what?

Any help would be appreciated.
 
I should mention that I am using ASP classic.
 
Hi
Have you found the answer yet?

I presume you are going to call vars.asp from a number of places, say from1, from2, from3. If the variable name in each calling asp is the same, say sVar, then simply say var1=request.form("sVar")

Hope thathelps and I am not weeks too late. :-D
 
The variable var1 defined in vars.asp is a local variable to vars.asp.

If you are trying to change var1 in vars.asp so that it can then be used by other pages, this is not possible.

If this is indeed what you you are trying to do then you need to store your variable in a way that every page can modilfy and access them which could be as cookies, session variables, physical files or in a database.

BDC.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top