I have this page in front of me.What I want to do is when I press the button next or previews to change the index there via AjAX.According to the image, when I press the Next image-button the text must change to 'andreas', if i press next again change to 'NEWW' then to 'apoel' and then to 'Name Surname' again.I have this code when pressing the ACTORS link:\[code\]/* FOR THE ACTORS TAB */litActors.Text = "";actorsCmd = "SELECT actor_name,a.id_actor FROM actor a JOIN project_actor pa on a.ID_ACTOR = pa.ID_ACTOR WHERE ID_PROJECT = " + Request.QueryString["id"];SqlCommand cmdActor = new SqlCommand(actorsCmd, con);SqlDataReader reader;try{ reader = cmdActor.ExecuteReader(); while (reader.Read()) { litActors.Text += "<li><a onclick=\"javascript:getSummary(" + reader.GetInt32(1).ToString() + ",'a');document.getElementById('projectNav').style.display = 'none';document.getElementById('left_right').style.display = 'inline-block';displayActor('" + reader.GetString(0) + "') \">" + reader.GetString(0) + "</a></li>"; }}catch (Exception err){ con.Close(); return;}\[/code\]Now my javascript functions are like this:\[code\]function getSummary(id,type) { if (id == "") { document.getElementById("data").innerHTML = ""; return; } var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { document.getElementById("data").innerHTML = xmlhttp.responseText; } } if (type == 'a') { xmlhttp.open("GET", "desciptionActorHelper.aspx?id=" + id, true); } else if ... xmlhttp.send();}function displayActor(nameActor) { var btnActor = document.getElementById('displayMe'); btnActor.style.display = 'inline'; btnActor.innerHTML = "<a>ACTOR:</a> " + nameActor;}\[/code\]and my next/prev buttons:\[code\]litDescField.Text = "<span id='left_right'>" + "<a><img src='http://stackoverflow.com/questions/images/left-arrow.png' /></a>    " + "<a><img src='http://stackoverflow.com/questions/images/right-arrow.png' /></a>" + "</span>";\[/code\]Does anyone has an idea of a good and easy way to do it?Because the my thoughts are very complicated and I am not even sure if they would work.I was thinking of making a table with the actors ID's(I must run a query to take both the number of actors and their ID too) and onClick of next or prev changing a cursor which says where you are now in the table.