Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / December 2007

Tip: Looking for answers? Try searching our database.

Refresh parent page

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John - 06 Dec 2007 22:14 GMT
Hi,

I used the following code to refresh the parent page, and it works very well
(Thanks to Peter Bromberg [C# MVP]").

Response.Write("<script language='javascript' type='text/javascript'> {
window.opener.location = 'Default.aspx?Reload=100'; }</script>");
Response.Write("<script language='javascript' type='text/javascript'> {
self.close(); }</script>");

Now I changed those two lines (Reload=100#CDRW') to the following to refresh
the page and move to a specific section of the page.

Response.Write("<script language='javascript' type='text/javascript'> {
window.opener.location = 'Default.aspx?Reload=100#CDRW'; }</script>");
Response.Write("<script language='javascript' type='text/javascript'> {
self.close(); }</script>");

It works only in the first time.

Please help. Thanks.
Alexey Smirnov - 06 Dec 2007 23:07 GMT
> Hi,
>
[quoted text clipped - 17 lines]
>
> Please help. Thanks.

What is '100' in the URL? Maybe you extract it in the code somewhere
and forgot that it becomes '100#...'?
bruce barker - 06 Dec 2007 23:23 GMT
the 'Default.aspx?Reload=100#CDRW mean navigate to the #CDRW position of the
page, and load it if not loaded. if the page is loaded, it just navigate to
the position. just tack a dummy guid arg  on:

Default.aspx?Reload=100&guid=e80bb06a-5516-4a88-963e-8262397abb05#CDRW

-- bruce (sqlwork.com)

> Hi,
>
[quoted text clipped - 17 lines]
>
> Please help. Thanks.
John - 06 Dec 2007 23:49 GMT
It seems that it doesn't work. The page navigate to the position, but didn't
refresh (it did refresh in the first time).

Why can 'Default.aspx?Reload=100' refresh the page again and again, but
'Default.aspx?Reload=100#CDRW' refreshes the page only once?

I have a long list in the parent page, the user can edit the list using an
editing page, after closing the editing page, I want to bring the changes to
the user instead of letting them browse the long list to find the spot.

Thank you very much. At least I had something different to try.

> the 'Default.aspx?Reload=100#CDRW mean navigate to the #CDRW position of the
> page, and load it if not loaded. if the page is loaded, it just navigate to
[quoted text clipped - 25 lines]
> >
> > Please help. Thanks.
bruce barker - 07 Dec 2007 03:09 GMT
as i stated, a navigate to an anchor will not refresh the page if its
loaded. thats by design. if you append a guid to the url it will be a
new url and will cause a refresh.

-- bruce (sqlwork.com)

> It seems that it doesn't work. The page navigate to the position, but didn't
> refresh (it did refresh in the first time).
[quoted text clipped - 37 lines]
>>>
>>> Please help. Thanks.
John - 07 Dec 2007 23:55 GMT
It works. Thanks.

> as i stated, a navigate to an anchor will not refresh the page if its
> loaded. thats by design. if you append a guid to the url it will be a
[quoted text clipped - 43 lines]
> >>>
> >>> Please help. Thanks.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.