AS3
------
function onMouseClickEvent(event:Event) {
trace("IN: "+glo.myURLvar.myURL);
var websiteURL:String = "Javascript:ajaxpage('" + glo.myURLvar.myURL + "','ajaxcontent');"
trace(websiteURL);
var request:URLRequest = new URLRequest(websiteURL);
navigateToURL(request, '');
}
-----------
JS Code
-----------
function ajaxpage(url, containerid){
var page_request = false
if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XMLHttpRequest()
else if (window.ActiveXObject){ // if IE
try {
page_request = new ActiveXObject("Msxml2.XMLHTTP")
}
catch (e){
try{
page_request = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e){}
}
}
else
return false
page_request.onreadystatechange=function(){
loadpage(page_request, containerid)
}
if (bustcachevar) //if bust caching of external page
bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()
page_request.open('GET', url+bustcacheparameter, true)
page_request.send(null)
}
|