mickeymouse 0 Report post Posted Sunday at 05:05 PM How do I pass a parameter (myparam) to the page I'm calling via a function. function ancesterF(myparam) {location.href=\"FT_Search2.php\";return false; window.open(location.href); return false;} Tks Quote Share this post Link to post Share on other sites
dsonesuk 874 Report post Posted Sunday at 07:44 PM Querystring such as FT_Search2.php?param=myparam Or in a php session. Quote Share this post Link to post Share on other sites
mickeymouse 0 Report post Posted Monday at 05:05 AM (edited) Thank you dsonesuk. I should also have asked you how do I capture the param in my called page. Edited Monday at 05:28 AM by mickeymouse Quote Share this post Link to post Share on other sites
dsonesuk 874 Report post Posted Monday at 07:27 AM $getmyparam=$_GET['param']; Quote Share this post Link to post Share on other sites
mickeymouse 0 Report post Posted Monday at 08:08 AM I tried that but I end up with the value of my $getmyparam being equal to "myparam" instead of the value passed which in my test case is "10006" In my calling function, I confirm the value of "myparam" and it is "10006". CALLING CODE: function ancesterF(myparam) {alert(myparam); <----------------------------------------------------------------------------------This confirms the value "10006" location.href='FT_Search2.php?param=myparam';return false; window.open(location.href); return false;} RECIEVING CODE: $getmyparam =$_GET['param']; print("getmyparam"); <------------------------------- Result = "myparam" not "10006" Quote Share this post Link to post Share on other sites