Hi,
I have a zen photo install on one site. Now I would like to keep it there but display it on another site.
The site where I want to display it on is a posterous.com blog so that is why I cant just install zenphoto over there. This i not possible as its a hosted service.
I wonder though if there is a way to embed a zen photo gallery somehow into a post while the zen photo gallery lies on another site.
Instead of an iframe:
put this in the head section of the page you want to display content on:
var rootdomain="http://"+window.location.hostname
function ajaxinclude(url) {
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.open('GET', url, false) //get page synchronously
page_request.send(null)
writecontent(page_request)
}
function writecontent(page_request){
if (window.location.href.indexOf("http")==-1 || page_request.status==200)
document.write(page_request.responseText)
}
then in the body section of the same page
ajaxinclude("mypage.htm")
Its a damn sight nicer than an iframe and you get the bonus of being able to style the incoming content...
Hope that helps.
Stu