By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,501 Members | 2,797 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,501 IT Pros & Developers. It's quick & easy.

Refresh parent page

P: n/a
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.

Dec 6 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
On Dec 6, 11:14 pm, John <J...@discussions.microsoft.comwrote:
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.
What is '100' in the URL? Maybe you extract it in the code somewhere
and forgot that it becomes '100#...'?
Dec 6 '07 #2

P: n/a
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)
"John" wrote:
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.
Dec 6 '07 #3

P: n/a
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.
"bruce barker" wrote:
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)
"John" wrote:
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.
Dec 6 '07 #4

P: n/a
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)

John wrote:
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.
"bruce barker" wrote:
>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)
"John" wrote:
>>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.
Dec 7 '07 #5

P: n/a
It works. Thanks.

"bruce barker" wrote:
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)

John wrote:
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.
"bruce barker" wrote:
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)
"John" wrote:

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.
Dec 8 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.