Hi, I have problem...my php function is not working in the onclick function...why is it not working.can you help me please on this.
var myphpfunc = '<?php echo myfunction();?>';
<a title="Save" onclick="myonclickbutton()" href="#" id="mybtn"><
Thank you in advance
But you should be more specific about what you're trying to accomplish here.
Hi,...I want that when i submit the form my php function will be executed in my onclick().
The only way to do that is to send the message to the server, where the PHP function is.
You need either another page load, or to use AJAX. Either way an HTTP request is needed.
Ok Thank you...i have some question when i am trying to alert "hello" in my onclick.
var mytest = "<?php echo 'hello';?>";
it will alert to this
<?php echo 'hello';?>
,it should be hello only without the php tags..
OK, so it's all about JS?
var mytest = "hello";
This topic is now closed. New replies are no longer allowed.