Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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 Display Modes
  #1 (permalink)  
Old September 10th, 2004, 03:15 AM
Friend of Wrox
 
Join Date: Sep 2003
Location: Whitstable, , United Kingdom.
Posts: 121
Thanks: 0
Thanked 0 Times in 0 Posts
Default Mixing JavaScript and VBScript in ASP

Hi,

  is it possible to use both JavaScript functions and VBScript functions inside the same webpage?

Can I call VBScript functions/subs from JavaScript functions?

If so - how? Do I have specified the languages at the <Script> tag
level but am unable to get the 2 types of functions to work
together.

Any help appreciated.
Cheers.
Chas.


Reply With Quote
  #2 (permalink)  
Old September 10th, 2004, 04:19 AM
Friend of Wrox
Points: 1,288, Level: 14
Points: 1,288, Level: 14 Points: 1,288, Level: 14 Points: 1,288, Level: 14
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2004
Location: Stockholm, Sweden
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to qazi_nomi
Default

Yes it is possible to use both JavaScript functions and VBScript functions inside the same webpage . And you can call vbscript from javascript
Like this example

<SCRIPT language="JavaScript1.2">
<!--
    if (top.location != document.location) top.location = document.location ;

function ak_help()
    {
        top.window.open("a.htm","")
        //clos()
    }



    </script>
    <script language="VBScript">

    alert("Hi")
    ak_help()

    </script>


Numan
--------------------------------------------------
Love is the most precious thing of this world. So find it and grab it!
Reply With Quote
  #3 (permalink)  
Old September 10th, 2004, 09:34 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,413
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I know that for some cross language client scripting functionality, one language has to preceed the other. If you have global variables, they need to be define in one language first, then you can use in the second. But if you reverse the language order (and more the declaration to the other language) it will fail. Unfortunately I don't remember which language needs to go first but something deep in my cranial recesses tells me it's VBScript first.
Reply With Quote
Reply


Thread Tools
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
Mixing PHP and Javascript nmjnmj Pro PHP 4 December 9th, 2006 12:31 AM
JavaScript to VBScript Thomas82 Classic ASP Basics 1 July 29th, 2006 07:03 PM
vbscript and javascript together erin VBScript 1 October 21st, 2003 02:48 PM
Using VBScript and JavaScript together jwalborn Classic ASP Professional 2 October 13th, 2003 10:06 AM



All times are GMT -4. The time now is 06:18 PM.


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