Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

passing a parameter back to my HTML page from my applet  RSS feed

 
Wally Schnok
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BIIIG PROBLEM (for me , at less ) :
I have a static HTML page and clicking a button here I'm opening an applet ....
When closing the applet I need to receive in a text field of my HTML page a value from this .....
But , when closing the applet it opens me a new version of my page ,
and it pass the parameter , but I need this parameter in my old one version of my HTML page ........ Hope I was quite clear and I really NEED help .....
Thank you .
 
Julia Reynolds
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can call public methods in your applet from javascript on your form. So, you can write a method in the applet that returns a string from the field into javascript, and you can write that value in javascript to a hidden html input and it will be available at the next page.
I mean if you have this method in your applet:
public String getFieldValue(){
return myFieldValue;
}
Then in the html page given this:
<input type=hidden name=appletField value="" />

You can make a javascript call to the applet like this:
document.formName.appletField.value = document.appletName.getFieldValue();
I hope this helps.
Julia
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!