|
-
Aug 11th, 2008, 12:54 AM
#1
Thread Starter
Just Married
[RESOLVED] Collect Second page data in coldfusion
Hi friends
I am working in cold fusion
I have two forum, I want to read second forum data on first forum page load please suggest me best method
Thanks
-
Aug 13th, 2008, 01:39 AM
#2
Thread Starter
Just Married
Re: Collect Second page data in coldfusion
Hi friends I got solution of this problem and the solution is as follow.
Code:
<script type="text/javascript">
function DisplayData()
{
var url ="8-August2.cfm";
var XMLHttp = GetXmlHttpObject();
if (XMLHttp==null)
{
alert ("Your browser does not support AJAX!");
return;
}
XMLHttp.open("POST",url,true);
XMLHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
//XMLHttp.setRequestHeader("Content-length", params.length+10);
XMLHttp.onreadystatechange = function processResponse()
{
if (XMLHttp.readyState == 4)
{
if (XMLHttp.status == 200)
{
var txt = XMLHttp.responseText;
document.getElementById("show").innerHTML = txt;
}
}
};
XMLHttp.send(null);
}
function processResponse()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") document.getElementById("show").innerHTML=xmlHttp.responseText
if (xmlHttp.readyState==1 || xmlHttp.readyState=="loading") document.getElementById("show").innerHTML="<div align=center>Loading...</div>"
}
function GetXmlHttpObject()
{
var xmlHttp=null;
try
{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
//Internet Explorer
try
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlHttp;
}
</script>
any problem then ask me or PM me
cheers
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|