Jump to content

how to write php function inside javascript function


Umar Akram

Recommended Posts

i want to call a php function inside a javascript.
how is that possible...??
In category tpl i used javascript.where i want to redirect the page in javasacript.

in javascript code i want to give the modules path. and this is possible only in case of php tags.

so how is that possible..??
my java script function is that.

 

# sign is that from where i want to redirect the page.
 

<script>
function fitness(){
var val=document.getElementById('level').value;

if(val==0){
    alert('Please select the current fitness level');
}else{
    location.href = ("#");
}
}
</script>

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...