CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Master / Detail Page with Popup windows

Print topic Send  topic

Author Message
AndreasB

Posts: 9
Posted: 11/11/2004, 3:21 PM

Hi,

i'm trying to convert my existing detail pages to popup windows.
Getting the popup to work was quite easy, but i'd like to refresh the opener page as soon as the form is submitted in any way and then close the popup window (i.e. javascript: opener.location.reload();window.close()).

I have tried to add similar code to the Client on submit action of the regarding detail form. The effect was quite strange. Sometimes it works as expected, sometimes the database records do not get modified at all...

Many Thanks in Advance.....

Andreas.
View profile  Send private message
DonB
Posted: 11/11/2004, 6:26 PM

It's a timing thing. You are trying to do a submit AND tell the other page
to fetch the data you are submitting. Sometimes they execute A then B,
other times the order is B then A.

--
DonB

http://www.gotodon.com/ccbth


"AndreasB" <AndreasB@forum.codecharge> wrote in message
news:24193f3fa00b96@news.codecharge.com...
> Hi,
>
> i'm trying to convert my existing detail pages to popup windows.
> Getting the popup to work was quite easy, but i'd like to refresh the
opener
> page as soon as the form is submitted in any way and then close the popup
> window (i.e. javascript: opener.location.reload();window.close()).
>
> I have tried to add similar code to the Client on submit action of the
> regarding detail form. The effect was quite strange. Sometimes it works as
> expected, sometimes the database records do not get modified at all...
>
> Many Thanks in Advance.....
>
> Andreas.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

AndreasB

Posts: 9
Posted: 11/12/2004, 12:23 AM

Quote DonB:
It's a timing thing. You are trying to do a submit AND tell the other page
to fetch the data you are submitting. Sometimes they execute A then B,
other times the order is B then A.

Thanks for your answer, DonB.

Is there a solution for this problem? When would be the right timing for such an event??

Thanks,

Andreas.
View profile  Send private message
peterr


Posts: 5971
Posted: 11/12/2004, 3:49 PM

Maybe wait a bit until you close the window: setTimeout(window.close(),200);
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Tuong Do
Posted: 11/14/2004, 3:50 PM

The solution to this is

Create a dummy page call "closeandrefresh" and the page refresh its parent
page then close itseft after that
To do that
in the client onload of the page

window.opener.focus();
window.opener.location.reload();
window.close();

Redirect your details page to this closeandrefresh page

"AndreasB" <AndreasB@forum.codecharge> wrote in message
news:24193f3fa00b96@news.codecharge.com...
> Hi,
>
> i'm trying to convert my existing detail pages to popup windows.
> Getting the popup to work was quite easy, but i'd like to refresh the
> opener
> page as soon as the form is submitted in any way and then close the popup
> window (i.e. javascript: opener.location.reload();window.close()).
>
> I have tried to add similar code to the Client on submit action of the
> regarding detail form. The effect was quite strange. Sometimes it works as
> expected, sometimes the database records do not get modified at all...
>
> Many Thanks in Advance.....
>
> Andreas.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

AndreasB

Posts: 9
Posted: 11/16/2004, 3:29 AM

peterr:
i'm afraid this solution was not quite sufficent as it was hard to estimate how long the DB update would take, since the database resides on a different Server than the site. but thanks anyway.

Tuong Do:
Thanks alot... this works just fine. I can only recomend this solution.

Thanks,

Andreas
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.