Hey guys. I am a student and new to AJAX programming in general, so forgive me if my questions are simple or non-sensical.
I have a web service as follows (C# code-behind):
[WebMethod]
public string AddCardToDatabase(String playerName, String team, String year, String ownerID)
{ //body ommitted due to irrelevence }
And I have Javascript as follows:
function ()
{
var player = $get('txtPlayerName').value;
var team = $get('txtTeam').value;
var year = $get('txtYear').value;
var userID = $get(val).value;
//Clear the text boxes.
$get('txtPlayerName').value = "";
$get('txtTeam').value = "";
$get('txtYear').value = "";
CardService.AddCardToDatabase(player, team, year, userID, onComplete, onFailure);
}
function onComplete(arg)
{
$get('response').innerHTML = arg + "
Please add your next card.";
...
Go to the complete details ...