hello, i am using javascript inside
java, that is i have a swt browser and i just use browser.execute ("<javascript code>"); i have this problem though, i have this
string in java which i want to pass to my javascript string to be executed in browser.execute ("<javascript code>"), how do i do this? for example i have:
void main () {
Browser browser;
String x = "hello";
String commandToRun = "document.write ('hello');\r\n";
browser.execute (commandToRun);
}
what if i want my commandToRun be equal to "document.write (x)" but still, x would be a String holding the value "hello"? how do i insert my java String into my javascript? thanks!!!