File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Updating the value of Text box 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 "Updating the value of Text box" Watch "Updating the value of Text box" New topic

Updating the value of Text box

Srinivasa Raghavan
Ranch Hand

Joined: Sep 28, 2004
Posts: 1228
I'm showing a popup from a jsp page, when I select any value ( a date ) in the pop up, a text box ( lets name it as dateX ) in the parent window that showed the pop up gets updated with the value selected in the popup.

Now the problem few other text boxes should get updated automatically when ever the value in this textbox ( datex ) gets updated. Can any one throw light on this ?
[ September 29, 2005: Message edited by: Srinivasa Raghavan ]

Thanks & regards, Srini
MCP, SCJP-1.4, NCFM (Financial Markets), Oracle 9i - SQL ( 1Z0-007 ), ITIL Certified
Prathiba Kalirengan

Joined: Aug 30, 2004
Posts: 12
In the pop up window code write

window.opener.document.form1.text1.value = urvalue

This will automatically populate the parent window's text box

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63862

If you have multiple tasks that need to be performed in the parent when a selection is made in the popup, rather than have the popup perform them directly create a function in the parent that handles the tasks. Then have the popup call that function with the changed values. This way your popup is decoupled from having to know how the parent is structured.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Updating the value of Text box
It's not a secret anymore!