File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

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
Greenhorn

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


SCJP 1.4<br />SCJA BETA
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60780
    
  65

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] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Updating the value of Text box
 
Similar Threads
Having trouble with javascript ...
Window.opener problem
Building an Intellisensse editor(PLEASE HELP)
Select the text value from a Disabled JCombobox
ListOfValues Dialog