JavaScript vs VB Script in Microsoft Scripting engines

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

rossenbg_at_hotmail.com
Date: 11/01/04


Date: Mon, 01 Nov 2004 06:43:51 +0200


Hi all,

I have had recently strange behaviour using JavaScript and VBScript
engines, provided with Micorsoft Windows. It appears that when JS
scripting engine is used, working with objects, inside JS functions, does
not work. For example parsing code like:

function some()
{
    var cnt = someobject.count;
    ...
}
some();

will give me an error, because inside the function the result returned by
"someobject.count" is invalid ( VT_EMPTY ). I've debug the application and
"propget" for "count" is never called. But if I parse only this:

var cnt = someobject.count;

then everything is just fine. In VisualBasic all the cases are OK. Do any
of you had such behaviour using MS JavaScript and how this was solved?

Cheers

-- 
Rossen Tzonev
Sofia, Bulgaria


Relevant Pages

  • Re: JavaScript vs VB Script in Microsoft Scripting engines
    ... actually "arguments" which is a object in the Standart JavaScript ... And thus running code outside function used my object, ... > I have had recently strange behaviour using JavaScript and VBScript ... > scripting engine is used, working with objects, inside JS functions, ...
    (microsoft.public.vc.atl)
  • Re: Explorer crashes without any errors/diagnostics
    ... It may also be a JavaScript problem, there seems to be a lot of them related ... You can try updating your scripting engine. ... Replies are posted only to the newsgroup for the benefit or other readers. ... How to make a good newsgroup post: ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: failure of browser on certain sites
    ... It may also be a JavaScript problem, try the following and see if it helps: ... You can try updating your scripting engine. ... Replies are posted only to the newsgroup for the benefit or other readers. ... How to make a good newsgroup post: ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: error 501
    ... It may also be a JavaScript problem, try the following and see if it helps: ... You can try updating your scripting engine. ... Replies are posted only to the newsgroup for the benefit or other readers. ... How to make a good newsgroup post: ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: JavaScript Not Working on any Web Site with XP SP2
    ... Hi Swoodall - You might try re-installing the scripting engine. ... JavaScript are two different things. ... If we revert back and turn Add-Ons ...
    (microsoft.public.windows.inetexplorer.ie6.browser)