Refreshing field problem

P

point

Hello there....I have the following problem...

I have a form on a PARENT window with couple of text boxes and select
boxes..

One selection box is HOTELS and beside that is a link add_new_hotel which
openes in a popup window....

After entering the hotel nam in CHILD window and submiting theform i want to
see the entered hotel in PARENT window in a selection box....

Ok...I did that with the window.opener.location.reload()..

But i want only THAT one selection box to be reloaded(refreshed) not the
whole form because the all the other fields are then reseted as well....

any suggestions...

thanx and respect....

point
 
P

point

Hm.....thanx for the answer....

It seams that I didn't mention something important...

When the new HOTEL is added from a CHILD window it is entered(I'm a PHP
programmer) in mySQL database so actually select filed on PARENT window
should refresh the databse....

opener.document.forms['myForm'].elements['mySelectBox'].options.add(
new Option("Option Name","Option Value"));

Not just to add the <option> to parent form but also to stay in database....

any onther suggestions as I'm a bit new to Javascript on this level...

respect...

p.
Lasse Reichstein Nielsen said:
point said:
Ok...I did that with the window.opener.location.reload()..

But i want only THAT one selection box to be reloaded(refreshed) not the
whole form because the all the other fields are then reseted as well....

opener.document.forms['myForm'].elements['mySelectBox'].options.add(
new Option("Option Name","Option Value"));

The "add" function is newer, and doesn't work in NS4. If necessary,
it can be simulated.
/L
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top