calling php function within javascript
Posted: Wed Nov 01, 2006 6:12 am
is this possible?
would like to call a function from a .php file and return the string from the function to the javascript
e.g.
.php file:
would like to do something in php to the string before the javascript parses it.
would like to call a function from a .php file and return the string from the function to the javascript
e.g.
Code: Select all
<script language="javascript" type="text/javascript">
<!--
function functionName() {
string = PHPfunction(document.formname.fieldname.value);
//do stuff
}
// -->
</script>Code: Select all
function PHPfunction($string){
//do stuff
return $string;
}