calling a javascript function

Results 1 to 2 of 2

Thread: calling a javascript function

  1. #1
    Join Date
    Dec 1969

    Default calling a javascript function

    Is there any way to call a javascript function from within vbscript....without using any kind of onclick or onload event etc?<BR><BR>And can you pass a vbscript variable to the javascript?<BR><BR>I have the variable counter<BR><BR>&#060;%<BR>counter = 5<BR><BR>if flagvar = 1 then<BR> response.write "This element has been flagged"<BR> **I want to call the javascript here<BR> ValidateData(&#039;counter&#039;) <BR>(I dont know the call function syntax or how to pass the counter variable)<BR><BR>end if<BR><BR>%&#062;<BR><BR>Thanks for any help.<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: calling a javascript function

    If you are trying to call a client Javascript function from your asp code, it won&#039;t work, since the asp code is execute first and on the server, while the client javascript will be executed as the HTML is pass to the client.<BR><BR> Now, if you are trying to use client vbs then you are able to call a client js function and pass arguments to it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts