Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Professional
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 13th, 2007, 06:56 AM
Friend of Wrox
Points: 686, Level: 9
Points: 686, Level: 9 Points: 686, Level: 9 Points: 686, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2005
Location: Kolkata, West Bengal, India.
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default Calling VBScript Function from javascript

Hi All,

I need to call a Vbscript function from a checkbox onClick event. The same needs to be done from a link <a href></a>


How can this be done. Normal function calling failed.
------------I had used---------------

<a href="javascript:void(0);" language=VBscript onclick="GenerateHTML(SomeParameter)">Generate</a>
-------------------------------------


Any help would do.
Reply With Quote
  #2 (permalink)  
Old July 13th, 2007, 08:32 AM
Imar's Avatar
Wrox Author
Points: 72,022, Level: 100
Points: 72,022, Level: 100 Points: 72,022, Level: 100 Points: 72,022, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,076
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

Are you sure it's an issue with the way you call your function? Your example should work. The following code results in four links that all say Hello:
Code:
<html>
  <head>
    <script type="text/vbscript">

      Function SayHello()
        MsgBox "Hello"
      End Function

    </script>
</head>
<body>

  <a href="#" onclick="SayHello()">Click Me</a><br />
  <a href="vbscript:SayHello()">Click Me</a><br />
  <a href="javascript:void(0);" onclick="SayHello()">Click Me</a>
  <a href="javascript:void(0);" language=VBscript onclick="SayHello()">Click Me</a>
</body>
</html>
Cheers,

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling javascript function from with in ASP kawal.singh Classic ASP Basics 1 July 4th, 2007 05:17 AM
Calling a javascript function from C# SebFr C# 0 November 3rd, 2006 12:05 PM
Calling vbscript function(passed value string) manish.sharma04 BOOK: Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter ISBN: 978-0-7645-8807-5 0 May 7th, 2006 11:50 PM
Calling a .NET function from javascript jainnid General .NET 6 June 8th, 2005 04:54 AM
On calling javascript function only one value pops shoakat Classic ASP Components 4 April 24th, 2005 06:07 PM



All times are GMT -4. The time now is 04:05 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.