Good day All,
I am trying, with no success obviously, to return the value in $myPhpVar to a javascript function. I've tried the following and many other combinations using echo and printf.
I'm using a hidden iframe to post form data after javascript validates it. This saves calls to my server, and keeps the feel of the page smooth because there is no refresh after submit. I would like to return the stats of the serverside processing to the javascript function that closes the iframe. Right now I save the results then call my server using a xmlhttp request object to retrieve them. Not very efficient to say the least. Your help is greatly appreciated!
Thanks,
CpVermont
I am trying, with no success obviously, to return the value in $myPhpVar to a javascript function. I've tried the following and many other combinations using echo and printf.
Code:
print"<script type='text/javascript'>parent.myFunction.call(".$myPhpVar.");</script>";
print"<script type='text/javascript'>parent.myFunction.call($myPhpVar);</script>";
Thanks,
CpVermont
Comment