Laurent,
Thanks for that fine lesson, but I don't personally need it.
The intent here was to clarify for the poster about "typical" uses of how
the ASP and the JS are interpreted differently, in the environment that HE
implied. To me, the issue was about being able to "reuse" their JS code in
VB6, not to elaborate on all the various language and platform technologies.
--
HTH,
DWilliams
"Laurent Bugnion, GalaSoft" <galasoft-LB@bluewin_NO_SPAM.ch> wrote in
message news:3f5704f4$1_3@news.bluewin.ch...[color=blue]
> Hi,
>
> DWilliams wrote:
>[color=green]
> > Behzad,
> >
> > I don't think so, straight VB does not (can't) interpret JS code.
> >
> > ASP uses VB syntax and constructs but it only integrates with JavaScript
> > because it is a server-side scripting language. In most situations, the[/color][/color]
Web[color=blue][color=green]
> > server interprets the ASP code and the client part (browser) interprets[/color][/color]
the[color=blue][color=green]
> > JS code.[/color]
>
> Wow, what a mix of concepts here.
>
> ASP doesn't use VB syntax at all.
>
> ASP is a platform, it exposes a set of libraries and objects allowing
> accessing OS functionalities. It happens to support two languages "out
> of the box", which are VBScript and JScript (the IE implementation of
> JavaScript). ASP as such doesn't has a syntax. You can use exactly the
> same objects in VBScript, with the VB syntax, and in JScript, with the
> JavaScript syntax.
>
> You are also wrong when you state that the client part interpretes the
> JavaScript code. The client interpretes the client-side code, and the
> server interpretes the server-side code. The server-side code can be
> pretty much anything, depending on the server type, the server OS, the
> webserver type, etc... it can be Perl, PHP, Java (JSP or servlets),
> JavaScript, JScript, VBScript C/C++, and so many others that's it silly
> to want to list them. On the client, the most widely used language is
> JavaScript, but some browsers (the IE line) can also interprete and run
> VBScript code.
>
> Don't confuse the platform and the language. A language doesn't say
> anythign about the platform it runs on, and will run exactly as well as
> long as it is supported.
>[color=green]
> > Assuming your JS code is not about HTML operations, your best option[/color][/color]
would[color=blue][color=green]
> > probably be to re-code the routine's functionality entirely in VB.[/color][/color]
People[color=blue][color=green]
> > do it all the time. ;-)
> >
> > --
> > HTH,
> > DWilliams[/color]
>
> I agree with others saying that it's probably more work than it's worth
> trying to simply reuse the function as-is.
>
> Note that if you make the step to .NET (a loooot better than old VB6),
> you have the possibility to use JScript.NET as a programming language
> (still another platform, and quite another language too), but it is not
> said that your function will run as-is on it. It also depends what
> objects from the API you're using, of course.
>
> HTH,
>
> Laurent
> --
> Laurent Bugnion, GalaSoft
> Webdesign, Java, javascript
:
http://www.galasoft-LB.ch
> Private/Malaysia:
http://mypage.bluewin.ch/lbugnion
> Support children in Calcutta:
http://www.calcutta-espoir.ch
>[/color]