/    Sign up×
Community /Pin to ProfileBookmark

Using popup windows NEED HELP!!

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?

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@khalidali63Jan 06.2003 — 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
Copy linkTweet thisAlerts:
@LhainesauthorJan 06.2003 — 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?
×

Success!

Help @Lhaines spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...