Click here to Skip to main content
15,908,455 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi I want to run a php file script after the onclick event

Can someone help?

What I have tried:

<script>
	$(document).ready(function() {
		$('.date').click(function(){
			alert($(this).attr('id'));
		});
	});
</script>
Posted
Updated 28-Feb-18 5:50am

1 solution

Well - two common ways this can be done:

1) make this a <form> and point your submit event to a php file
2) create an AJAX call that targets a php function.

If you don't know how to do these things, go here [^] and learn appropriate protocol for the method you prefer. (form or AJAX).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900