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

Get the input box value from applet & transfer it to javaScript

 
Darren Alexandria
Ranch Hand
Posts: 185
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good day!

I have an applet which is currently embedded in a JSP page.
What I am trying to do is to access or get the value in the
input box using javaScript.

Here is my applet tag


Here's what I used in javaScript:


But all I get is an undefined value.

[ UD: added linebreaks to preserve formatting ]
[ March 13, 2008: Message edited by: Ulf Dittmer ]
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The applet tag -which is what getElementById returns- does not have a "value" attribute. If you want to access data in the applet, write a public method that returns it, and call it like document.getElementById('appletbarcode').getValue().
 
Darren Alexandria
Ranch Hand
Posts: 185
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm sorry if I cross-posted.. I think I have done it twice today..

This is the code that I have written which simply shows an input box:


When I input a value in this applet, I wish to get it in javaScript.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As I said elsewhere, that's what LiveConnect does.
 
Darren Alexandria
Ranch Hand
Posts: 185
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.
I am starting to read in now, and hope that I'll be
able to understand and implement it.



BTW,
Can Live Connect be used in IE?
[ March 13, 2008: Message edited by: Darren Alexandria ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic