aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes how to implement  this in DHTML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "how to implement  this in DHTML" Watch "how to implement  this in DHTML" New topic
Author

how to implement this in DHTML

sarah Marsh
Ranch Hand

Joined: Mar 06, 2001
Posts: 282
Hello:

There's two pages. On first page there's text field and a button,
when click on the button, it goes to the second page. On second page it shows the data retrived from the database, besides each data there's a radio button, when double clike on any radio button,it goes back to the first page and get the text field populated by that checked value on second page.

Any example for this? which parts do I need to read in DHTML? Any websites?

Thanks a lot!
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You should not need DHTML/JavaScript to do this, you should do this all of the server side sice all you are dealing with is form submissions and yanking information from a databse which JavaScript can not do.

Eric
sarah Marsh
Ranch Hand

Joined: Mar 06, 2001
Posts: 282
The second page already access the database. So the first page just get the data from the second page. It's required to use DHTML, please help!
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Unless the second window is a pop up window, you are not able to pass the data to the first window.
sarah Marsh
Ranch Hand

Joined: Mar 06, 2001
Posts: 282
Yes, the second page is a pop up window. Any example for this?

Thanks!
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
From the pop up window
window.opener.document.FormName.ElementName.value = "blah";


That is how you would pass a value back to a parent window form element
sarah Marsh
Ranch Hand

Joined: Mar 06, 2001
Posts: 282
Thank you,Eric.

How does the text field of the first page get the value from second page?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
by executing the statement from above that I posted.
sarah Marsh
Ranch Hand

Joined: Mar 06, 2001
Posts: 282
The statement you posted should be in the second.jsp file.

What should be in the first.jsp file for the text field? Thanks!
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You do not need anything in the first jsp file except the text field that the pop up window fills.

Eric
sarah Marsh
Ranch Hand

Joined: Mar 06, 2001
Posts: 282
Thank you very much, I got it worked.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: how to implement this in DHTML