Link to home
Start Free TrialLog in
Avatar of CCOIA
CCOIA

asked on

Assigning a variable for the web application's path

How can I declare a path statement whereas  in my HTML I can just call the variable name instead of the path?  I have seen code like <a href = <%userpath%> & "whatever.htm"...... but don't know how to use it. I want to use it in multiple pages mainly so I do not have to keep changing my hardcoded paths in all my pages whenever I move something.
I am using Javascript in my pages too.
Avatar of KenAdney
KenAdney

Well, I think you've got most of it, the part about  referring to the previously defined variable.  I think all you have to do is define what "userpath" is, for instance:

<%userpath = "../file_directory/" %>

put somewhere in the head of the ASP page.
Avatar of CCOIA

ASKER

That is my problem (should have elaborated more).  It is not an ASP page.  It is on a page that will be on an AS400 server running Webshere.  Can I still use the above syntax in a non-ASP page?
ASKER CERTIFIED SOLUTION
Avatar of COBOLdinosaur
COBOLdinosaur
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CCOIA

ASKER

Thanks, just what I was looking for.
Glad we could help.  Thanks for the A. :^)

Cd&