Solved

rebind grid after an update, in seperate iframe?

Posted on 2004-08-07
3
812 Views
Last Modified: 2008-03-10
Is this possible?  If so could someone show an example?

I have a single page (A) which has two iframes (X) and (Y).  Each of these iframe pages have there own datagrid.  When I make an update to the iframe(Y) grid, how do I rebind the iframe(X) grid.

Notes:
1) All pages(A),(X) and (Y) use codebehind.
2) The IFrame(Y) page does a 30 second meta refresh.
3) I do not want to meta refresh the IFrame(X) page... only interact when needed.

Thank you for your time...  Keith
0
Comment
Question by:westbergk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 9

Accepted Solution

by:
crescendo earned 350 total points
ID: 11746808
OK.... are you familiar with communicating between IFRAMEs in Javascript? If not, see here:

http://www.mike-levin.com/iframes/netscape-communication-between-iframes.html

The basic trick will be to create some Javascript code that grabs a reference to the (X) IFRAME and uses window.location.reload to cause the page to refresh.

In the (Y) IFRAME's code that handles the grid's update, you put this code into a string and add the following:

    RegisterStartupScript("reload", sScript)

This causes the script (in sScript) to be output at the bottom of the (Y) IFRAME. As the frame redisplays, it executes the code and causes (X) to refresh, updating the grid.

Make sure you put

    RegisterStartupScript("reload", "")

in Y's page load, so that by default there's no reload.
0
 
LVL 9

Expert Comment

by:crescendo
ID: 11746867

Your Javascript code might be as simple as

    parent.frames['X'].location.reload

where 'X' is the name you gave to the frame.
0
 
LVL 1

Author Comment

by:westbergk
ID: 11746995
Just what the Dr. ordered... Thank you!

Cheers
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question