Refresh main asp page

Page: 1

Author Post
Member
Registered: Nov 2008
Posts: 28
Sir:

On the main page I have a list of names. Beside each name is an edit button. Clicjing the edit button open a div in a floatbox. This div contains a form. The form action is to run an asp page (which saves changes to a database) and then redirects to the main page again.

Main Page --> floatbox with form --> asp page (rewrite database) --> main page


Everything seems to work OK. The database gets updates as it should. However the main page is displayed in the floatbox!!

If I set use parent.setTimeout('fb.end()', 100) in the submit button, the floatbox closes and the database is changed properly but the main page is not update. It's almost like the redirect is still going to the floatbox.

If I manually refesh the page I can see that the database has been correctly updated. It is just the the main page is not refreshed or re-opened onthe redirect.

I probably haven't been very clear but any suggestion would be welcomed.

Thanks
Administrator
Registered: Aug 2008
Posts: 3382
I think you've been quite clear. You want the page after the from submit to open in the top window, not in the floatbox window.

I'm currently at a cyber-cafe in Georgetown, Penang, so not in an ideal place to test solutions. But I can throw out a suggestion. One thing that comes to mind is to not return the page from the form submit, but use floatbox's loadPageOnClose capability. Set loadPageOnClose to 'self' somewhere, probably as a page-specific option. Then when the submit button is clicked and parent.fb.end(); fires, floatbox will exit and the original top window page will refresh.
Member
Registered: Nov 2008
Posts: 28
Sir:

Thank you for your prompt response.

Actually, loadPageOnClose:self worked great!! Exactly what I wanted to do ... thanky you very much.

Page: 1