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
Solved

rebind grid after an update, in seperate iframe?

Posted on 2004-08-07
3
800 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
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

808 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