Quote:
|
so rather than going to a url i need it to run a javascript function
|
You didn't specify what javascript function you wanted to run or what the function is supposed to do.
Getting your script to run a function instead of the command location.href='url' is rather easy.
But I see that you are originally loading the location.href from a PHP function.
So I am a little confused as to what it is you are trying to accomplish.
But no matter, here is how you run a javascript function instead of a command.
Example: