Store Javascript Variable In Java Variable

Store Javascript Variable In Java Variable

Page 1 of 1

3 Replies - 4200 Views - Last Post: 22 January 2009 - 10:40 PM

#1 luckylakshmi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 22-January 09

Store Javascript Variable In Java Variable

Posted 22 January 2009 - 10:32 AM

Hi,
Is it possible to assign java script value to a java variable.

Scenario: When I move from parent window to popup window I want to store the value entered in the parent page in a java variable. Please provide solution for this.

Thanks.

This post has been edited by luckylakshmi: 22 January 2009 - 10:39 AM

Is This A Good Question/Topic? 0
  • +

Replies To: Store Javascript Variable In Java Variable

#2 BetaWar  Icon User is offline

  • #include "soul.h"
  • member icon

Reputation: 1138
  • View blog
  • Posts: 7,111
  • Joined: 07-September 06

Re: Store Javascript Variable In Java Variable

Posted 22 January 2009 - 01:45 PM

Not sure, it would probably require a socket connection of a part of the Java API, but I don't know of one. If the socket connection is required then Flash or silverlight will need to get involved.

Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

Post your code like this: :code:

Thanks.
Was This Post Helpful? 0
  • +
  • -

#3 teampoop  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 17
  • View blog
  • Posts: 140
  • Joined: 19-June 08

Re: Store Javascript Variable In Java Variable

Posted 22 January 2009 - 09:32 PM

I guess my question is why? Why would you want to do this? Is the pop-up another page? Is it a java applet? Or is the back end using some kind of beans? Really need more information on this one please.
Was This Post Helpful? 0
  • +
  • -

#4 luckylakshmi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 22-January 09

Re: Store Javascript Variable In Java Variable

Posted 22 January 2009 - 10:40 PM

First of all thanks for looking to my post.
I do not have any sample code for sharing. Its part of my interview question.

Here is the situation...
1. Assume there are two pages. One is the parent and the other is popup.
1. On the parent screen there is a text box along with a button. And in the popup also there is a text box and a button.
2. On click of the button which is available in the parent window, a popup should be opened and the text enetered in the parent page should be shown in the popup. And the popup should automatically perform the search based on the text shown in the text box.

I was able to show the data entered in the parent page in the popup window using java script. Now, I want to copy the java script value into java variable to perform the search operation.

Hope this helps in understanding the scenarion.
Thanks.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1