| Author |
returning values from javascript function to java
|
sarah cruz
Greenhorn
Joined: Sep 21, 2005
Posts: 10
|
|
hello, i have a function in javascript which returns a string. how do i access this string outside of my script, for example in java? thanks. here is an example: void main () { String code = "x.onklick = function () { display () }" browser.execute (code); } function display () { return ("hello"); } the question is how do i access the string returned by display after browser.execute? i.e., outside the script itself. thanks.
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
Java and JavaScript work on two different levels. By the time the JavaScript is executed, the Java has been completed. You would have to submit a form or use Ajax to send the data back to the server. Eric [ May 31, 2006: Message edited by: Eric Pascarello ]
|
 |
 |
|
|
subject: returning values from javascript function to java
|
|
|