Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Embed JavaScript in C++ app

Posted on 1997-06-27
4
Medium Priority
?
404 Views
Last Modified: 2008-03-04
I need an embedded script language in a large VC++/MFC
application, so users can control the app by writing
in script.  How do I set up the linkage for C++ to pass
parameters to JavaScript and for Javascript to pass
parameters to the C++ routines it calls?
0
Comment
Question by:ssullivan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 5

Expert Comment

by:icd
ID: 1267832
Is javascript the language of choice? It may be a good choice if the application you are writing is a browser since Javascript functions are highly specific to this environment but I have doubts that it is useful as a general purpose language.

Java might be a better language (although it is not really a script language).

My personal choice would be perl which now has a number of options including being compiled, having links to C++ and being able to call it from perl.

0
 
LVL 6

Expert Comment

by:jpk041897
ID: 1267833
Although I agree with icd, as a possible answer to your question you could use a combination of applets using JNI and the Live Connect type communication between JS and applets. (This type of communication is available in both MSIE and Netscape, and I belive under Hot Java as well).

Would you be intrested in a more detailed explanation?
0
 
LVL 11

Expert Comment

by:alexcohn
ID: 1267834
For an application dependent on VC++/MFC, the language of chice would be some version of Visual Basic; alternatively look at IBM's REXX.
0
 
LVL 3

Accepted Solution

by:
garik earned 200 total points
ID: 1267835
If you're not allergic to Microsoft, there is a smooth commercial solution called ActiveX Scripting; check out
http://www.microsoft.com/JScript/us/techinfo/hosting.htm
- there is all info on licensing and usage.

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question