hey,
Below is my script that updates my characters position in my database:
<script language="javascript" type="text/javascript">
function positionUpdate(){
var word = document.getElementById('test').value;
var queryString = "?word=" + word;
ajaxRequest.open("GET", "new_position.php" + queryString, true);
ajaxRequest.send(null);
alert(queryString);
}
</script>
Next is the script that tells the above script to run but I need to send two variables across to it so it knows what to update.
<a onClick="positionUpdate();"><img src="images/transparent.gif" border="0" /></a>
The link above is used multiple times so I need to send the values with that and not put the variables in the script at the top otherwise they would always be the same.
As a note I am using the php GET function to retrieve the variables in position_update.php
Thanks, tanni