|
-
Oct 25th, 2003, 06:14 AM
#1
Thread Starter
Addicted Member
call another function from javascript
How can I call a Subroutine written in vb script from a Javascript Function.
EG,
<script language=javascript>
function ShowID(id)
{
alert ("ID is \n " + unescape(id));
runME(id);
}
</script>
Sub runME(sValue As String)
Response.Write(sValue)
End Sub
The above example does not work ?
-
Oct 26th, 2003, 06:04 AM
#2
The Javascript is client-side, the VBScript is server-side. The two scripts are executed at completly different times and cannot interact.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Oct 27th, 2003, 07:39 AM
#3
Thread Starter
Addicted Member
I basically need to pick up a variable which is generated from a javascript function and use it in a vb sub. Is there any way I can do this ?
-
Oct 27th, 2003, 08:00 AM
#4
Send a new request to the server.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Oct 27th, 2003, 04:24 PM
#5
Thread Starter
Addicted Member
can you please show me an example of this ?
-
Oct 27th, 2003, 04:38 PM
#6
location.href="receiver.asp?var=value";
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Oct 28th, 2003, 07:11 AM
#7
Thread Starter
Addicted Member
Thanks.
When the page is reloaded, how do I pick up this variable in my vb sub ?
-
Oct 28th, 2003, 10:57 AM
#8
Like you do it in ASP. I have no idea, I don't do ASP.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Oct 28th, 2003, 11:21 AM
#9
Frenzied Member
Hmm
Just use Request
TheValue = Request("var")
"Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
- Zack de la Rocha
Hear me roar.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|