473,671 Members | 2,257 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 10420
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********@yah oo.com> wrote in message
news:ae******** *************** ***@posting.goo gle.com...
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************ ********@NOSPAM att.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_S PAM.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_S PAM.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.ea rthlink.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.javas cript 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
6083
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 Cart</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link rel="StyleSheet" href="css/style.css" type="text/css">
7
1975
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 out. What needs to happen is this: On the left frame you should have a series of buttons, which when pushed makes things happen on the right frame.
2
1444
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 representation can be saved as a string and recreated. (The application also has a crude workflow aspect - so XMHTML forms can be created and assigned a workflow. Forget I said anything about
6
2305
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 I'd really like to do is use HTML/web pages as the user interface and invoke my application in the background to do the heavy lifting. I'm fairly well experienced with web pages and I've written a fair amount of JavaScript at one time or another...
6
6081
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 parse the filename. <form name='form1' method='POST' enctype='multipart/form-data' action='sub.asp'> <input type='text' name='title1' value='value1'> <input type='file' name='file1'>
3
2456
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 form, do you think it will be slow due to Perl is run under server. How about using JavaSCript to check validation for user input? Do you think it a bit faster?
3
1272
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: 1. Possible SQL injection and other forms of injection attacks on URLS of various server side components javascript accesses.
9
8409
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
2894
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 using Perl on the backend, with Javascript providing limited frontend functionality. As an example, an expanding tree would be fully populated on the server-side and then presented to the browser, with Javascript and CSS being used to vary the...
6
6847
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 myjava" in my javascript. Thanks a million.
0
8472
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8819
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8667
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7428
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6222
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5690
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4221
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4399
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2806
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.