473,382 Members | 1,353 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Refresh parent page

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
5 3722
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Scott | last post by:
I have a clickable graph that resides on page 1. If user clicks a data point on the graph, the page runs again yeilding a 2nd graph that shows a more detailed graph. Problem is, I have a...
4
by: Andrew Alger | last post by:
ok i have two forms. Customer.aspx and Parent_Searh.aspx. There is a button on Customer.aspx that when executed runs javascript code to open up parent_search as a popup. After the user searches...
2
by: Bill S. | last post by:
Hey, I am trying to figure this out. The hyperlinks on my page open up a small popup window. I have no reason to refresh the parent page or what have you. I was living in a very happy world,...
3
by: nicver | last post by:
I am working on updating a Web site with a frameset. A page opens a pop-up window in which the user uploads pictures. Once the upload is done, I would like to refresh the content of the frame which...
2
by: Raj | last post by:
Hi All, I have a problem with trying to refresh the parent window from child window in order to update data in the parent window. The sequence of events are 1) I click a button in the parent...
2
by: Jeronimo Bertran | last post by:
Hi, I have a page with a very data intensive grid which needs to be automatically refreshed constantly if a change is detected. In order to not refresh the complete page so often, I created an...
5
by: Peter | last post by:
1) I have a C# web application and what I am trying to do is create a popup window from a link on the parent window 2) the popup window will have a button and when a user clicks on the button the...
7
by: Ben Schumacher | last post by:
How can I refresh the parent page from a popup window that was created using window.showmodaldialog? I would like to accomplish this using vbscript if possible.
3
by: Opa | last post by:
Hi , I have a form with javasript which launches a popup via the showModalDialog() method. I get the dialog to open, now I am trying to first get a reference to the calling form from the popup...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.