Code: Select all
function Actions(id, process)
{
document.getElementById("nextstepsdiv").className="lodinggif";
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
{
alert ("Your browser does not support AJAX!");
return;
}
xmlHttp.onreadystatechange=nextstepChanged;
xmlHttp.open("GET",'/user_actions.php?id='+id+'&process='+process,true);
xmlHttp.send(null);
}) is same as ("nextstepsdiv") in document.getElementById("nextstepsdiv").className="lodinggif";
.
i.e, I want the div element to be called dynamically depending on the value of process
For example,
if i call the function
Code: Select all
Actions(1, div1);,if i call the function
Code: Select all
Actions(1, div2);,i tried,
Code: Select all
function Actions(id, process)
{
document.getElementById(process).className="lodinggif";