i want to call a php function header('Location:http://xx.yy.zz/somthing') inside a javascript function,Like given below.
<?php
<script>
function mUp(obj)
{
//here i want call the header function
}
</scipt>
//some code
?>
Pls help..
Hi the following link may help you
By now you probably have noticed that If you put a php header redirect in after already sending html/any text to the client's browser, you get an error; this is because the header() function tells the server to cancel the output from the current page and redirect to another page at the server-side. so either you should find a way to execute that header function before printing any html/js to the broswer, or you could do a javascript redirect:
<script type="text/JavaScript">
window.location.href="http://xx.yy.zz/somthing";
</script>
please comment if this isn't clear enough
header()function.