Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7800085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:31:10+00:00 2026-06-02T00:31:10+00:00

Consider this code: function callme() { alert(‘call’); } $(function(){ var iframe = $(‘<iframe />’).attr(‘src’,

  • 0

Consider this code:

function callme() {
    alert('call');
}

$(function(){ 
    var iframe = $('<iframe />').attr('src', 'b.php').appendTo('body'); 
    //call 'callme' function from parent
});

I don’t want to edit b.php.
Is there any way I can call the parent ‘callme’ function using just javascript in the parent file?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T00:31:12+00:00Added an answer on June 2, 2026 at 12:31 am

    Not sure about the part “I don’t want to edit b.php“. Your question is asking about how to call the parent function from an iframe and b.php is in the iframe. How can you make it call the parent callme() without modifying b.php?

    From b.php you can call

    parent.callme();
    

    Or is your question, how can I call callme() after b.php finishes loading?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider this javascript code: var bar = function () { alert(A); } var foo
Consider this code snippet: $('#selectone').change(function(){ var amount; $.get('search.php', {search:'units'}, function(result){ //this will return only
Please, consider this code: <script> $(function(){ $('#clickme').click(function(){ $('#note_pag').html('<div id=note_pag><ul><li><b>1</b></li><li><a href=2>2</a></li></ul></div>'); }); $('#note_pag a').click(function(){ alert($(this).attr('href'));
Consider this code: var img = new Image(); img.onload = function() { console.log(this.width); };
Consider this code... $(function() { for (var i = 0; i < 10; i++)
Consider this code: function Foo() { } Foo.prototype.alert = function() { alert(this); } (new
Consider this piece of code var crazy = function() { console.log(this); console.log(this.isCrazy); // wrong.
Consider this code example: var source = null; $.ajax({ [...], success:function(data) { source =
Please consider this code snippet: var ul = $(.list_b).find(li).remove().end(); $.each(Sites, function (index, value) {
Consider this code... var org = {}; org.Organization = function() { var app =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.