Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question on javascript events

Status
Not open for further replies.

fisa

Programmer
Nov 28, 2003
19
0
0
GB
I have an HTML page that has a readonly text box input field( say, system name). I have a button on the page , which on click opens up a new page from where the user can select a name which then appears in the text box.

What I want to do is to populate the other text boxes in the page automatically according to the system name selected. I tried implementing this by calling a java script function onChange of the text box for system name. But onChange event occurs only when there a manual change made to the input field and not when the field is populated by selecting a name from a window. How do I do this? All I want to do is to invoke a javascript function onChange of the text box field value, provided the textbox is readonly.

Please shed some light on this?
 
Assuming you populate the textbox with something like:

Code:
opener.document.forms[0].textBox.value = myValue;

...you could follow this statement with:

Code:
opener.javaScriptFunctionIWantToTrigger();

...or something to that affect.

Good luck.

--Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top