Hi All!<BR><BR>We had a client requirement to cache the data for the dynamically populated drop-downs (from the database) on to the client machine to avoid round trips to the server when the user changes selection in the drop-down based on which some of the related info on the page is to refresh.<BR>The approach identified to cache data on the client-side was to use xml data islands (xml objects).<BR><BR>Now, in order to implement this, for every asp page (e.g. paramter.asp) we&#039;ve created an intermediate asp page (parameteroperation.asp). The former makes an HTTP post to the later.<BR><BR>Below is the code snippet from both the pages used to populate a drop-down and cache the xml on the client-side.<BR>Now, the below code works fine. But, the concern is that the client has asked us not to use separate page for each asp page.<BR>They want us to use a single intermediate .asp page to which all the asp pages would make a post.<BR><BR>Now, my concern is how do we change the below code to use a single common .asp page instead of the separate operations.asp for each page.<BR><BR>---------code in parameter.asp---------<BR>function page_Onload()<BR>{ <BR> var CountryXmlHttp = new ActiveXObject("Microsoft.XMLHTTP");<BR> CountryXmlHttp.Open("POST","ParameterOperations.as p", false);<BR> <BR> var CountryXmlDom = new ActiveXObject("Microsoft.XMLDOM")<BR> var retStructure = &#039;&#060;ROOT USER="" MODE=""&#062;&#060;/ROOT&#062;&#039;<BR> CountryXmlDom.loadXML(retStructure)<BR> CountryXmlDom.childNodes.item(0).attributes.getNam edItem("USER").text=&#039;&#060;%=UserCode%&#062;& #039;<BR> CountryXmlDom.childNodes.item(0).attributes.getNam edItem("MODE").text=""<BR> <BR> <BR> <BR> CountryXmlHttp.Send(CountryXmlDom.xml);<BR> var CountryResp = CountryXmlHttp.responseText<BR> CountryXmlDom.loadXML(CountryResp)<BR> <BR> if(CountryXmlDom.xml!="" &#124&#124 CountryXmlDom.xml!=null)<BR> {<BR> var root = CountryXmlDom.getElementsByTagName("ROOT").item(0) <BR> <BR> if(CountryXmlDom.childNodes.item(0).attributes.get NamedItem("ERROR").text=="NOREC")<BR> {<BR> alert("No records found");<BR> } <BR> <BR> ClearCombo()<BR> if(CountryXmlDom.documentElement.childNodes.length &#062;0)<BR> {<BR> for(var i=0;i&#060;CountryXmlDom.documentElement.childNode s.length-1;i=i+2)<BR> {<BR> var opt = new Option<BR> opt.value = CountryXmlDom.documentElement.childNodes(i).text<B R> opt.text = CountryXmlDom.documentElement.childNodes(i+1).text <BR> frmParameter.cboFormCountry.add(opt)<BR> }<BR> }<BR> }<BR> <BR>}<BR><BR>--------- code in paramteroperations.asp--------------<BR>&#060;%@ LANGUAGE="JSCRIPT" %&#062;<BR>&#060;!-- #include file="../Includes/global.inc" --&#062;<BR>&#060;%<BR><BR>Response.Buffer = true<BR>Response.Expires=-1000<BR>var Doc = new ActiveXObject("Microsoft.XMLDOM");<BR>//instantiating a vb COM dll to retrieve data from the database<BR>var objCountryXmlDom = new ActiveXObject("MSXML2.DOMDocument");<BR>Doc.load(R equest)<BR><BR><BR>objCountryXmlDom.loadXML(getCou ntry("21"));<BR>var Error= objCountryXmlDom.childNodes(0).attributes.getNamed Item("ERROR").text<BR><BR>if(Error!="")<BR>{<BR> if(Error=="NOREC")<BR> {<BR> Response.Write(objDebtMgrCommon.getValueForNoticeN ode("E","NoCountries"))<BR> }<BR> else<BR> {<BR> Response.Write(Error)<BR> }<BR>}<BR>else<BR>{<BR> Response.Write(objCountryXmlDom.xml)<BR>} <BR>%&#062;<BR>