Calling PHP from a javascript event.
Posted: Sun Dec 18, 2005 11:38 am
I have a webpage that is created with a combination of HTML/CSS and Javascript.
What I want is to wait for a button to be clicked on the page and then call a php script to pull some content from a MySql database and echo is as a set of radar buttons into a specific position on my page. I have to call the PHP after the button is clicked because some user-input data will be passed from a javascript variable to the php script.
However I don't know how - or even if it is possible - to call a php script from a Javascript onmousedown event. I should add that the onmousedown event is already being checked to do something else in the javascript.
Any ideas? Please?
Martin.
What I want is to wait for a button to be clicked on the page and then call a php script to pull some content from a MySql database and echo is as a set of radar buttons into a specific position on my page. I have to call the PHP after the button is clicked because some user-input data will be passed from a javascript variable to the php script.
However I don't know how - or even if it is possible - to call a php script from a Javascript onmousedown event. I should add that the onmousedown event is already being checked to do something else in the javascript.
Any ideas? Please?
Martin.