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

  • SEARCH
  • Home
  • 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 8488249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:28:48+00:00 2026-06-10T21:28:48+00:00

I have a parent page where I am submiting a form and calling two

  • 0

I have a parent page where I am submiting a form and calling two funcions on_click of the submit button. One function from the same page and another from child page.

I am wondering how to call a Javascript funcion on the parent page from the child page to post on a Facebook wall. This is my application.

My parent.php:

<form action="child.php" method="post">
   <input type="text" value="$result" name="codebox">
   <input type="submit" onclick="funcion codeload();function postToFeed();"/>
</form>

My child.php:

 <body> 
  <?PHP
          $son=$_REQUEST['codebox'];
          session_start();
          $_SESSION['sony'] =$son;
          $ashutosh=$_SESSION['sony'] ;
          $tinyurl = file_get_contents("http://tinyurl.com/api-create.php?                 
                url=http://www.ebhasin.com/approval/files/main.php?a=$ashutosh");
          $desc='Place here description what you want';
  ?>
<div id='fb-root'></div> 
<script src='http://connect.facebook.net/en_US/all.js'></script>

<p id='msg'></p>    

<script>

  FB.init({appId: "313877282043416", status: true, cookie: true});

  function postToFeed() {

    // calling the API ...
    var obj = {
      method: 'feed',
       link: '<?PHP echo $tinyurl?>',
            picture: 'http://www.dogoscanarios.com/en/themes/dogotheme/images/icon_dot_cat.gif',
      name: 'Drum Precussion',
    caption: ' I just created a new Drum Loop using Drum Beats Pro! Come listen to it!',
      description: '.'
    };

    function callback(response) {
      document.getElementById('msg').innerHTML = "Post ID: " + response['post_id'];
    }

    FB.ui(obj, callback);
  }

</script>
  • 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-10T21:28:49+00:00Added an answer on June 10, 2026 at 9:28 pm

    Well if lets say the parent window opens a child popup window, then do as following

    EDIT :

    Your parent page, parent.php

     <script>
    var Popup;
    function popUp()
    {
        Popup = window.open("child.php", "bpPopup", 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=420,height=300,left = 490,top = 262');
        Popup.focus();
    }
    </script>
    <a href="javascript:void(0)" onclick="popUp();">Open child window</a><br />
    <a href="javascript:void(0)" onclick="Popup.postToFeed();">Call child window function</a>
    

    First link opens popup window, second link calls the function postToFeed() in popup window from parent.

    Your child popup window, child.php

    <script>
    function postToFeed(){
        alert("Popup function called by parent window");
    }
    </script>
    

    This function in popup window is called after you click the link in parent window.

    Hope This helps!

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

Sidebar

Related Questions

I have problem calling a JavaScript function in an iframe from the parent page.
I have a in an iframe, that calls a function from the parent page.
I have a parent page containing two iframes. One holds navigation links and the
I have one parent page with a parentManagedBean (attached to Session Scope). On click
How to get the parent page values from the usercontrol. I have a usercontrol
I have an ASP.Net MVC Page with a very simple form on it: One
I have a website that consists of one parent page. Using the lightbox-style jQuery
I have a parent page with two data controls. I want to be able
I have a page (parent) that when a button (with .click funciton) is clicked
First the two page in under the same domain In the parent page.htm I

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.