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 开发者_如何学Pythona 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;
}
in page.php use parent.functionname
Ex.
index.php has a function show() you can access from page.php as parent.show()
like this:
echo '<script language="javascript" type="text/javascript">parent.show();</script>';
??
精彩评论