Welcome to WebmasterWorld Guest from 54.145.104.199

Forum Moderators: open

Message Too Old, No Replies

Transfer variables

     
2:25 pm on May 10, 2008 (gmt 0)

10+ Year Member



Hello,

I need help :-)

How can I transfer/send "ItemPageNo" + "ItemStartPaging"-variables to ItemSearch() in stateChanged_ItemOpen() ?

function ItemOpen(ItemGuid, ItemPageNo, ItemStartPaging)
{
xmlHttp = GetXmlHttpObject();
if (xmlHttp == null)
{
alert ("Your browser does not support AJAX!");
return;
}

var url = "/Ajax/ItemOpen.phtml";
url = url + "?ItemGuid=" + ItemGuid;
xmlHttp.onreadystatechange=stateChanged_ItemOpen;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function stateChanged_ItemOpen()
{
if (xmlHttp.readyState == 4)
{
document.getElementById("ItemOpen").innerHTML = xmlHttp.responseText;
ItemSearch(ItemPage, ItemStartPaging);
}
}

Jacob

5:23 am on May 11, 2008 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



The easy and somewhat ugly way is to pass the values by global variables. The alternative is to use a closure [jibbering.com...] see callLater example.
3:55 pm on May 13, 2008 (gmt 0)

10+ Year Member



Oh yes - ofcourse :-)

Thanks for help.

Jacob

 

Featured Threads

Hot Threads This Week

Hot Threads This Month