[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

call function from iframe to parent page

Posted on 2010-04-07
9
Medium Priority
?
267 Views
Last Modified: 2012-05-09
Hi,

on iframe, I did parent.myfunction();, it works when the iframe page is under the same domain.  When the page in iframe is from different domain, it does not work.  Is there a solution?  thx
0
Comment
Question by:mcrmg
  • 5
  • 4
9 Comments
 
LVL 83

Accepted Solution

by:
leakim971 earned 800 total points
ID: 30045930
Hello mcrmg,

No.

Regards.
0
 
LVL 83

Expert Comment

by:leakim971
ID: 30047610
Thanks for the points!
0
 

Author Comment

by:mcrmg
ID: 30063430
I am sorry the question is closed.  I will reopen it if needed.

Here is what I have:
on parent page, I have a DIV that controls show/hide of the iframe

on iframe page, (this is a page from different domain but inside the same network), I have a recordset, if rs has value, iI want to show DIV, if not, hidden DIV in parent page.  Is this doable?  thx
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
LVL 83

Expert Comment

by:leakim971
ID: 30063855
No, you have no link between both of what you see iframe and you page content.
You are only able to call parent function (same domain) but the function always run in the iframe as I know.
0
 

Author Comment

by:mcrmg
ID: 30065247
okay, thank you
0
 

Author Comment

by:mcrmg
ID: 30065379
last question, is that a way to move DIV to the domain same as iframe?  (I guess not right?)
0
 
LVL 83

Expert Comment

by:leakim971
ID: 30066886
I'm sorry I don't understand your question
0
 

Author Comment

by:mcrmg
ID: 30102194
sorry about that, I want to see if there is any way that I can show/hide the DIV based on the RS result from the iframe, so, since they can only talk when they are in the same domain, is that a way to move DIV to another domain?

Currently:
Domain1
DIV
   iframe  (a page in domain2)

if result from rs is empty, I want to hide DIV.  thx
0
 

Author Comment

by:mcrmg
ID: 30104379
Actually, I might have a workaround (in theory), but very stupid.

I could link to the page that in iframe, then I will know if rs is empty or not, then link back to the parent, based on the querystring, I can then display DIV, then I can deceide if I need to include iframe or not based on the querystring...
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

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

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
SQL Database Recovery Software repairs the MDF & NDF Files, corrupted due to hardware related issues or software related errors. Provides preview of recovered database objects and allows saving in either MSSQL, CSV, HTML or XLS format. Ensures recov…
Hi, this video explains a free download that you can incorporate into your Access databases, or use stand-alone for contact management. Contacts -- Names, Addresses, Phone Numbers, eMail Addresses, Websites, Lists, Projects, Notes, Attachments…
Suggested Courses

591 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