CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2008
    Posts
    49

    JavaScript front end for C++ application?

    I don't know if this is the best section of the forum to post in, but since I am building in C++ and not MS VC++, I figured it was the only viable place.

    I wish to have my functions in my C++ application be accessed from JavaScript... is there a way for me to have a HTML file, with java script open in my application, and have the various events (such as a button click) access a function in my C++ code?

  2. #2
    Join Date
    Apr 1999
    Posts
    27,449

    Re: JavaScript front end for C++ application?

    Quote Originally Posted by Slippy View Post
    I don't know if this is the best section of the forum to post in, but since I am building in C++ and not MS VC++, I figured it was the only viable place.
    Your question is a JavaScript issue, not a C++ issue.

    How to interface "x" to C++ is all the responsibility of "x", whatever "x" is. So try in the Java forum.

    Regards,

    Paul McKenzie

  3. #3
    Join Date
    May 2009
    Posts
    2,413

    Re: JavaScript front end for C++ application?

    Quote Originally Posted by Paul McKenzie View Post
    So try in the Java forum.
    I wouldn't do that for Javascript hasn't more to do with Java than it has with C++.

  4. #4
    Join Date
    Jun 2009
    Location
    France
    Posts
    2,513

    Re: JavaScript front end for C++ application?

    Isn't javascript interpreted and run on the client machine? Wouldn't that basically make it un-interfaceable with c++, by design, anyways?
    Is your question related to IO?
    Read this C++ FAQ article at parashift by Marshall Cline. In particular points 1-6.
    It will explain how to correctly deal with IO, how to validate input, and why you shouldn't count on "while(!in.eof())". And it always makes for excellent reading.

  5. #5
    Join Date
    May 2009
    Posts
    2,413

    Re: JavaScript front end for C++ application?

    Quote Originally Posted by Slippy View Post
    I wish to have my functions in my C++ application be accessed from JavaScript... is there a way for me to have a HTML file, with java script open in my application, and have the various events (such as a button click) access a function in my C++ code?
    It looks like time is working in your favour (at least on Windows),

    http://channel9.msdn.com/posts/Raman...and-JavaScript

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured