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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Substitution of variables.

Status
Not open for further replies.

cutiger93

Programmer
Jan 11, 2001
55
US
I want to substitute the the variables for new parameters when I call this function.
Do the varables have to be different in the main page?
I guess the basic question that I need answered it if I pass vsupport for vprior will vprior change in line 3 to vsupport.

Thanks for the help.

<%function split_selects(vprior,priority)

vprior=Request.Form(&quot;priority&quot;)
If vprior=Request.form(&quot;priority&quot;)<>&quot;&quot; then
vprior=Request.QueryString(&quot;priority&quot;)
else
end if
'Response.Write vprod

vprior=replace(vprior,&quot;'&quot;,&quot;&quot;)
arroption = Split(vprior,&quot;,&quot;)
vprior=&quot;&quot;
For X=0 to ubound(arroption)-1
vprior= &quot;'&quot;&trim(arroption(X))&&quot;'&quot;&&quot;,&quot;& trim(vprior)
'Response.Write vprod
Next

X=ubound(arroption)
'Response.Write x
vprior=trim(vprior)+ &quot;'&quot;+trim(arroption(X))+&quot;'&quot;

End function %>
 

cutiger93,

I'm trying to understand your question. What do you mean &quot;Do variables have to be different in the main page?&quot;
If you use method=&quot;post&quot; or method=&quot;get&quot;, you should not need to test for querystring or form unless you are using to different ASP pages to the same form. If so, why not just use &quot;post&quot; method.


Also, your code is redundant in the first section.

SHOULD BE:
If Request.Form(&quot;priority&quot;) <> &quot;&quot; then
vprior=Request.QueryString(&quot;priority&quot;)
Else
.....
End If


Cheers,
fengshui_1998




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top