Click to See Complete Forum and Search --> : Using popup windows NEED HELP!!


Lhaines
01-06-2003, 02:30 PM
i'm creating a scheduling system for my client. there is a main form with all of the appointments information to be viewd by the user with two buttons at the bottom. 1(UpDate) 2(Cancel) when the user pushes the cancel button a pop up screen appears with a drop down list containing cancel reasons for the user to choose. on the pop up screen there is a button marked "cancel" when the user hits the button to finalize the cancellation the pop up window closes and sends the reason to a text box on the main form. now i need the main form to reload so it will update the information into the database. here is my code.
on the main form this finction is declared...

function cancelwindow(file,window) {
msgwindow=open(file,window,'resizable=no, width=625, height=325');
if (msgwindow.opener == null) msgwindow.opener = self;
}
and called at this point...

<input type="Button" value="Cancel Job Request" ONCLICK="cancelwindow('popcancelreason.asp','window2')">

on the popup window i'm using this function...

function setform () {
opener.document.outputform.outputfield.value = document.inputform.inputfield.value;

self.close();
return false;
}

and it is called at this point...

<form name="inputform" onSubmit="return setform();">

everything works fine at this point but i can not get the main form to reload after the reason has been added to the host page. I'm using ASP with Javascript i do not know if that will help. Any help is greatly appreciated. thanks in advance.

Lucas Haines:confused:

khalidali63
01-06-2003, 03:31 PM
2 Logical options.

Either updtade the field in the main form from child window and then post the form to your database from child window be4 it closes
or
update the text field in the main form ,but in here you must have some algorithm to continously look for a change in a particular text field and as soon as there is value then post the form

Hope this points to right direction

:-)

Khalid

Lhaines
01-06-2003, 04:17 PM
Thank you very much but i'm new to Java script i'm used to PHP and ASP. can i use something like. "Onchange" for the text box?