PDA

View Full Version : How to execute a small piece of javascript code ?



cornucopia
8th August 2009, 19:58
I have a piece, very simple, embedded in a html page.
<script language="JavaScript">
var x='abc’;
var y= 'xyz';
function encoded() {
var encoded = x.substr(0,1) + y.substr(0,1) + '012';
return encoded;
}

Now I want the result of encoded();

What Toolkit should I use, QScript ? QWebkit ? I don't know much about Qt Classes, but do know C++ for years. Any help would be appreciated.

franz
9th August 2009, 11:03
Read about QScript and QWebkit.