Solved

rebind grid after an update, in seperate iframe?

Posted on 2004-08-07
3
766 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
  • 2
3 Comments
 
LVL 9

Accepted Solution

by:
crescendo earned 350 total points
Comment Utility
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
Comment Utility

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
Comment Utility
Just what the Dr. ordered... Thank you!

Cheers
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now