Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Updating the value of Text box

 
Srinivasa Raghavan
Ranch Hand
Posts: 1228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Prathiba Kalirengan
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Marshal
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic