Darkejo1
asked on
How to add variable to an HREF in ASP using vbscript
I'm trying to do the following:
So the page would read "This Variable works" as a hyperlink and would direct the user to page.asp.
<% TestStatement = "This Variable works" %>
<a href="Page.asp">TestStatement</a>
So the page would read "This Variable works" as a hyperlink and would direct the user to page.asp.
ASKER
I'm not familiar with JavaScript as I'm using VBScript. When I add suggestion, I receive Expected end of statement:
At the letter "T" in Test.
Script=JAVASCRIP TestStatement = "This Variable works"
At the letter "T" in Test.
ASKER
I was able to get rid of that error message. This is what I have so far.
The Result is "TestStatment" as a hyperlink. Instead, it should say "This Variabel Works" as they hyperlink.
<%Language=JAVASCRIPT%>
<%Teststatement="This Variable Works"%>
<a href="Page.asp">TestStatement</a><div id="masthead">
The Result is "TestStatment" as a hyperlink. Instead, it should say "This Variabel Works" as they hyperlink.
I realised after my post I was in error ... and am currently making silly mistakes in extremis.
I will try to clear the fog from my mind or see someone else help you before I succeed.
Chris
I will try to clear the fog from my mind or see someone else help you before I succeed.
Chris
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Worked like a charm! Thanks!!
And i'm sorry for not understanding earlier what was required ... but glad you have a solution.
Chris
Chris
<%SCRIPT=JAVASCRIPT TestStatement = "This Variable works" %>
<a href="Page.asp">TestStatem
in an html page forwards as required.
Chris