Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
| Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 31st, 2005, 08:50 AM
Registered User
 
Join Date: Aug 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Passing Parameter between Javascript and VBScript

Hi
Can anyone help me pls.
New to javascript. I'm trying to call a VBSCript function which accepts parameters as arguments. The VBSCript function is then called from Javascript where the values are passed back.

I can't get it to work for some reason
a) syntax is wrong
b) no values are passed back i.e the parameters are empty when
   i try to display the values passed in or returned
example:
---------

VBSCript
Function GetID(ID)
   Dim ReturnVal

  'do something.........
 response.write ID
 ReturnVal = 123

  ' return a value back
  GetID = ReturnVal

End Function


Javascript
function SwapCheckBox()
{
   var x;
   var ID = document.ll.hdnID.value;

  // call vbscipt function
   x = <%=GetID(ID)%>;

  // display returned value
   alert(x);

}

Your help will be much appreciated.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing parameter from javascript to xslt !! suersh79 XSLT 3 November 17th, 2006 03:08 AM
passing parameter sarah lee ASP.NET 1.0 and 1.1 Basics 3 September 5th, 2006 04:29 PM
Passing parameters from ASP (VBScript) to XSLT rj_mayer Classic ASP XML 5 January 25th, 2005 04:20 PM
passing parameter.. suzila VB.NET 2002/2003 Basics 7 May 17th, 2004 08:28 PM
Parameter passing psambor Beginning PHP 0 September 17th, 2003 01:47 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.