views:

122

answers:

2

hy i have a index.php with a form, after i submit the form with a iframe to a page.php, a loading process appears

in page.php when execute the first function i want javascript to execute a function in index.php, the page who is visualized!

when execute the second function i want javascript to execute another function in index.php

how to code this?

if () {
        //execute a function but meanwhile send a response to index.php like this:
        echo '<script language="javascript" type="text/javascript">window.top.window.function();</script>';
        function ();

        if () {
           //execute a function but meanwhile send a response to index.php like this:
           echo '<script language="javascript" type="text/javascript">window.top.window.function();</script>';
            function ();

        } else {
            echo $something;
        }

    } else {
       echo $something;
    }
A: 

in page.php use parent.functionname

Ex.

index.php has a function show() you can access from page.php as parent.show()

ntan
A: 

like this:

echo '<script language="javascript" type="text/javascript">parent.show();</script>';

??

robert
i try in all the ways, echo outputs all at once not one by one!<script language="javascript" type="text/javascript">window.top.window.function();</script><script language="javascript" type="text/javascript">window.top.window.function();</script><script language="javascript" type="text/javascript">window.top.window.function();</script>
robert