• Post Reply Bookmark Topic Watch Topic
  • New Topic

send data to swing from javascript  RSS feed

 
johny sill
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,

First of all i calling javascript function callJS() from swing

Here is my swing code


Here is my index.jsp



myapplet in above code is my applet name

Here is my Ajax.jsp



I am getting data from this jsp to javascript is work fine,But i want to send this data to to my swing,

But unable send the data using above code,

Help me,

Thanks in advace
 
kalpana kp
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi joney

can you please tell me inadvace how to call java script from swing class.Th e code you provided was not understand by me.in which place i have to insert that code and where i have to place jsp
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But unable send the data using above code

What does this mean? Does the output of ajax.jsp properly get into "LookUp.responseText"? Does the "data" array get filled with the correct data? Then what happens when you call the create method of the applet - any JS error messages, any Java error messages or exceptions?
 
kalpana kp
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
Thanks for reply i am using swing only ,not an applet. which place i have to insert that code? i inserted in main method giving error illegal start of type expression near public void create() method
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kalvana, please note that my reply was to the original post -which I am quoting- not to your reply.

If you have a question that is different from the original one, feel free to start a new thread. The original question was specifically about applets, so I think your situation is quite different, because an application does not use JavaScript or the XmlHttpRequest object.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!