Click here to Skip to main content
16,021,430 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello fellow programmers, Im a little confused right now on my coding so I am seeking your help. What I am trying to accomplish to execute my javascript on server side to close the modal dialog and refresh the mother page. It closes but the parent page doesnt refresh. any error on my code sir?
VB
Dim script As String = "window.location.reload(true);window.close();"
              System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, Me.[GetType](), "CloseWindow", script, True)
Posted
Comments
Sergey Alexandrovich Kryukov 12-Feb-12 21:10pm    
Do you really have ServerSide JavaScript?
Not if you are using RegisterClientScriptBlock. Otherwise, what do you mean by "execute my javascript on server side"?
--SA
drkterror1 12-Feb-12 21:55pm    
@SAK my bad what i mean is to close the modal dialog. my javasript is declared as string sorry my bad.
drkterror1 12-Feb-12 21:57pm    
I dont have a javascript on server side I just use registerclientscript to execute but it does not reload I think my error is on script

1 solution

I think your "reload" code executes on the so called dialog. Then the dialog is closed.

move the reload code to wherever you create the dialog box. And then make the reload code execute just after the dialog is closed.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900