473,382 Members | 1,750 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Use JavaScript in VB Application

Hi All.

I have a function with javascript is used in my ASP web Page.Now i
want to write an application with VB6 same as my asp page and i need
to use that javascript function.Can i insert this function in my VB6
app.?

Thnaks.

Behzad
Jul 20 '05 #1
9 10405
In article <ae**************************@posting.google.com >, Bsedigh_79
@yahoo.com enlightened us with...
I have a function with javascript is used in my ASP web Page.Now i
want to write an application with VB6 same as my asp page and i need
to use that javascript function.Can i insert this function in my VB6
app.?

Thnaks.


Not as far as I know.
-------------------------------------------------
~kaeli~
Press any key to continue or any other key to quit.
Who is General Failure and why is he reading
my hard disk?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
-------------------------------------------------
Jul 20 '05 #2
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 Web
server interprets the ASP code and the client part (browser) interprets the
JS code.

Assuming your JS code is not about HTML operations, your best option would
probably be to re-code the routine's functionality entirely in VB. People
do it all the time. ;-)

--
HTH,
DWilliams
"Behzad" <Bs********@yahoo.com> wrote in message
news:ae**************************@posting.google.c om...
Hi All.

I have a function with javascript is used in my ASP web Page.Now i
want to write an application with VB6 same as my asp page and i need
to use that javascript function.Can i insert this function in my VB6
app.?

Thnaks.

Behzad

Jul 20 '05 #3
On Wed, 3 Sep 2003 08:15:38 -0500, kaeli
<in********************@NOSPAMatt.net> wrote:
In article <ae**************************@posting.google.com >, Bsedigh_79
@yahoo.com enlightened us with...
I have a function with javascript is used in my ASP web Page.Now i
want to write an application with VB6 same as my asp page and i need
to use that javascript function.Can i insert this function in my VB6
app.?

Thnaks.


Not as far as I know.


I suspect it would be more work than it would be worth, but you could
try hosting the windows script engine. Look on MSDN for details.
http://msdn.microsoft.com/library/en...ml/engines.asp

Regards,
Steve
Jul 20 '05 #4
Hi,

DWilliams wrote:
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 Web
server interprets the ASP code and the client part (browser) interprets the
JS code.
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.
Assuming your JS code is not about HTML operations, your best option would
probably be to re-code the routine's functionality entirely in VB. People
do it all the time. ;-)

--
HTH,
DWilliams


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

Jul 20 '05 #5
"Laurent Bugnion, GalaSoft" <galasoft-LB@bluewin_NO_SPAM.ch> wrote in
news:3f**********@news.bluewin.ch:
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.


If you really want to strip it down to its essentials I suppose you could
say ASP is just a multithreaded runtime environment for WSH.
Jul 20 '05 #6
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:3f**********@news.bluewin.ch...
Hi,

DWilliams wrote:
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 Web server interprets the ASP code and the client part (browser) interprets the JS code.


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.
Assuming your JS code is not about HTML operations, your best option would probably be to re-code the routine's functionality entirely in VB. People do it all the time. ;-)

--
HTH,
DWilliams


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


Jul 20 '05 #7
Hi,

DWilliams wrote:
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.


I understand your intent, but it's wrong to state that ASP uses VB
syntax. I stand by that ;-)

Sorry if I sounded like I was lecturing you. There are all kind of
audience in this newsgroup, it's sometimes hard to know who you talk to
and what their level of knowledge.

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

Jul 20 '05 #8
Laurent,
I understand your intent, but it's wrong to state that ASP uses VB syntax. I stand by that ;-)<<

Perhaps that is technically wrong, but not wholly inaccurate in the
context of the poster's message and what he, in my opinion, would have
best understood. He obviously saw a correlation between ASP and VB6 or
he would not have been thinking about converting the application.

Which primary language, syntactically or otherwise, would you have
guessed that their ASP application was "oriented" on? I think it would
not be JScript.
Sorry if I sounded like I was lecturing you. There are all kind of
audience in this newsgroup, it's sometimes hard to know who you talk to
and what their level of knowledge<<

No harm done, this is the nature of the newsgroups. If you participate,
you must be prepared to take some lumps. ;-)

And I totally agree with you on the difficulty in understanding
someone's technical knowledge. This is why I try to make references in
the simplest terms possible if it is a subject/issue I am familiar with.

HTH,
DWilliams
Laurent Bugnion, GalaSoft wrote: Hi,

DWilliams wrote:
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.


I understand your intent, but it's wrong to state that ASP uses VB
syntax. I stand by that ;-)

Sorry if I sounded like I was lecturing you. There are all kind of
audience in this newsgroup, it's sometimes hard to know who you talk to
and what their level of knowledge.

Laurent


Jul 20 '05 #9
On Thu, 04 Sep 2003 15:46:53 GMT, DWilliams
<dw**@nojunk.earthlink.net> wrote:
Which primary language, syntactically or otherwise, would you have
guessed that their ASP application was "oriented" on? I think it would
not be JScript.


Previously, some time ago now, the Microsoft Script manager at the
time, suggested around 40% of ASP work was in JScript. With the
arrival of ASP.NET I think we can conclude even less is now in VB
syntax.

Jim.
--
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: bin_P19 P | last post by:
the code i have got is as follows and now im stuck <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Shopping...
7
by: Trvl Orm | last post by:
I am working with 2 frames, Left and Right and the main code is in the left frame, which has been attached. Can someone please help me with this code. I am new to JavaScript and can't figure it...
2
by: GIMME | last post by:
Background ... I've created a web application that allows a user to create an HTML application from IE. The application itself creates an XML representation of a XHTML form. The XHTML...
6
by: Nou Dadoun | last post by:
I'm currently developing an application in C++/MFC (Visual Studio 6, if that makes a difference) and I'd like to avoid the Windows style UI widgets and dialogs if at all possible. In fact, what...
6
by: nate | last post by:
Hello, Does anyone know where I can find an ASP server side script written in JavaScript to parse text fields from a form method='POST' using enctype='multipart/form-data'? I'd also like it to...
3
by: phal | last post by:
Hi all; I code Perl for CGI, I using regular expression to check the validation of user input, because the form is small and it run only from my own computer, anyways if many people using my...
3
by: pantagruel | last post by:
Hi, My work is putting in a large application that is basically split up between 30 or so Javascript files. I have some security concerns about this application. Basic security concerns is: ...
9
by: Erwin Moller | last post by:
Hi, Can anybody comment on this? In comp.lang.php I advised somebody to skip using: <script language="javascript"> and use: <script type="text/javascript"> And mr. Dunlop gave this response:
22
by: Dan Rumney | last post by:
Hi all, I've been writing Javascript for quite a while now and have, of late, been writing quite a lot of AJAX and AJAX-related code. In the main, my dynamically generated pages are created...
6
by: moongeegee | last post by:
I have compile my java program as myjava.class. And I can run as "java myjava" without any program. As now, I need to execute myjava.class in javascript. Please shed a light how to execut "java...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.