Hello,
i have a calendar showing the full year. on click of the button this needs to update mysql and display info using ajax and php. it impractical to have a unique id for each date how can this be done. the code is only currently display the first date???
var dateClicked = document.getElementById('dateClicked').value;
var queryString = "?dateClicked=" + dateClicked;
ajaxRequest.open("GET", "ajaxScript.php" + queryString, true);
ajaxRequest.send(null);
<form >
<button type="button" name="dateButton" id='dateClicked' value='2010-04-05' onclick='ajaxFunction()'>date</button>
<button type="button" name="dateButton" id='dateClicked' value='2010-05-10' onclick='ajaxFunction()'>date 2</button>
<button type="button" name="dateButton" id='dateClicked' value='2010-06-16' onclick='ajaxFunction()'>date 3</button>
</form>
<div id='ajaxDiv'></div>
thanks Gareth