Link to home
Start Free TrialLog in
Avatar of sydneyguy
sydneyguyFlag for Australia

asked on

inserting a page into a php page and calling functions and test on partent php page

I have 2 pages the parent page and child page, lets cal them  parent.php  and child.php
Parent page has chaild page included in the get sincluded include("child.php"); on the child page I have check boxes that I woudl tick. when the box is ticked I wish to run a function that is on the parent.php and fill in the txt box that is on the parent page with information. Not quite  sure how what to place on the child page so that it sees the parent page function. so that when the check box is clicked the funtion on the parent is run and will thenh do some text insertion ect.
thats it thanks for yourhelp in advance
example  
***********************************
<?php
echo "this would be the parent page";
<script>
function testa(){
      alert("hi");
}
</script>
include("child.php");
?>
*****************************
<?php
echo "child page ";
<a onclick="testa()" href="javascript:function_name('Banksmeadow,')">Banksmeadow</a>
 ?>
****************************
ASKER CERTIFIED SOLUTION
Avatar of Richard Quadling
Richard Quadling
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The JS function is not "seen" by PHP. It is just some text to send to a browser.

In the browser, it receives all the text PHP has sent and deals with it as HTML/CSS/JS/XML/etc.

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial