Solved

CALL JAVASCRIPT FUNCTION IN VBSCRIPT IN AN ASP PAGE

Posted on 2000-03-22
2
439 Views
Last Modified: 2010-07-27
Is it possible to call a Javascript function in VBscript in an ASP Page? If so how can I do it. And I want to pass 2 parameters to that function while going through a loop in a recordset.
0
Comment
Question by:froggy77
2 Comments
 

Accepted Solution

by:
Lobsang earned 50 total points
ID: 2646777
You can put on your events...
<input type="text" name="test" onclick="return 'javafunction(x,y)'">  
use: <%=x%>,<%=y%> is this variables are in vbscript.
You can use all events...onclick...onchange...onfocus...onblur...
0
 
LVL 4

Expert Comment

by:jkunal
ID: 2647909
First you have to define what your scripts are i mean are they client side or server side script.

If you have vbscript as server side script and java as client then you can do something like what Lodsang suggested.

But if both vbs and java are client side then you have to store values from a function in hidden fields and acess it from the other function(script).

makeing it more clear

<%%>anything inside this will run on the server and outside this will not.

<script language="vbscript">
</script>
<script language="javascript">
</script>
these are client side script and you can have both in your asp page.

So now you have to decide which function are you calling from where....

;->
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Edureka is one of the fastest growing and most effective online learning sites.  We are here to help you succeed.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now