Calling JavaScript from VBScript & the reverse!!!?

Results 1 to 3 of 3

Thread: Calling JavaScript from VBScript & the reverse!!!?

  1. #1
    Join Date
    Dec 1969

    Default Calling JavaScript from VBScript & the reverse!!!?

    Maybe I&#039m just to dumb, or I missed some details somewhere, but I just can&#039t seem to find mention of something like this anywhwere.<BR><BR>I&#039m very new to ASP, but have lots of experience in about 15 languages. This ones killing me! If I can use different types of Script languages in the same page, how can I make calls from one of them to Subs/Functions created in the other???. I just want to save the time needed to recode(translate) my JavaScript stuff to VB and VB stuf to JavaScript etc.

  2. #2
    Join Date
    Dec 1969

    Default RE: Calling JavaScript from VBScript & the reverse

    a couple of ways.<BR><BR>make components of your function in J++, C++ or VB<BR>make script components of your function.<BR><BR>I prefer the script components for simplicity&#039s sake<BR><BR>there&#039s an article on processing order for different script blocks on at the moment (script runat="server" language="jscript"&#062; runs first, then &#060;% %&#062; code, then vbscript block<BR><BR>j

  3. #3
    David from Germany Guest

    Default RE: Calling JavaScript from VBScript & the reverse

    I started to switch my asp to JScript RUNAT=Server. my Experience was that. First install MS IE5.0 on the IIS Machine because it replaces the JScript engine which makes it a lot more robust. Next: it is possible to call a JScript function from VBScript but not visa versa (maybe somebody proves me wrong or a new Version comes out which is capable to do that). The nice thing is you can create Objects in JScript, but you cannot intantiate them in VBScript if you defined it in JScript. But this works fine if you instantiate the Objekt first in JScript:<BR>Example:<BR>&#060;language=JScript runat=Server&#062;<BR>var myObj1 = new XMyObj(xx,yy)<BR>&#060;/Script&#062;<BR>&#060;%&#039This is vbscript<BR>Response.Write(myObj1.method1)<BR>%&#0 62;<BR>Hope it helps

Posting Permissions

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