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

ASP JScript to JavaScript 1

Status
Not open for further replies.

sumon2

Programmer
Sep 5, 2002
5
GB
I want to access returned String from JavaScript in JScript
eg:
This will be javaScript part,this method gets the input from other javasript methods
function showerrors()
{
return "some error message;
}
in JScript
i wish to access like this
<%=showerrors()%>
Is i possible?
when i access this way the error generated is object expected.
Does any one know how to do it?
thank in advance
su

 
javascript is processed client side. ASP scripting languages are processed server side. The only way for them to communicate is through requests and responses. You're going to have to send the results of the error function in a form post in order to do anything with them in your ASP code.

Cheyney
 
You can reference server side from client side Javascript
eg.

<script>
myVar = '<%=(Recordset.Fields.Item(&quot;ServerVar&quot;).Value)%>';
alert(myVar);
</script>

but I don't know any way it can be done the other way around.[sad]
Blood, Sweat But No Tears!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top