PDA

View Full Version : using c++ library in jf file



wala
06-16-2010, 04:45 AM
hello ..
can I use som function from c++ library in my java script file ?


thanks ..

Philip M
06-16-2010, 08:34 AM
Nope.

Quizmaster: How many centimeters are there is a metre?
Contestant: Two and a half.

wala
06-16-2010, 11:43 AM
what can I do when I want use something in c++ in my website ?

Philip M
06-16-2010, 11:52 AM
what can I do when I want use something in c++ in my website ?

Try using something which is possible. You cannot somehow use c++ functions in a Javascript file. Rewrite your function in Javascript syntax.

wala
06-16-2010, 11:54 AM
ok , thank you

Old Pedant
06-16-2010, 08:41 PM
Try using something which is possible. You cannot somehow use c++ functions in a Javascript file.

Well, that's not *strictly* true.

*IF* you are willing to restrict yourself to MSIE browsers, you could create an ActiveX plugin, written in C++, and then script that plugin from JavaScript code.

It's ugly as pig snot, but I have known some corporate situations where this has been the solution to invoking the company's proprietary software from browser-based code.

It's cleary not something you would use for the inTERnet, but it's a possible solution in some inTRAnet situations, so long as the corporation is willing to insist that all employees use MSIE browsers.