• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 502
  • Last Modified:

Remove [object XMLDocument]

For reasons I can't go into here I'm using the PrettyPhoto's Ajax option to call an HTML file into a lightbox. The problem is that my HTML file  does not appear in the lightbox -- just [object XMLDocument]. I know absolutely nothing about Ajax and was wondering if there was a simple way around this.
0
tekgrl
Asked:
tekgrl
1 Solution
 
leakim971PluritechnicianCommented:
please provide a link to your page

0
 
RobOwner (Aidellio)Commented:
[object XMLDocument] is a container object that will contain your html file in the form of a property such as responseXML.  You will need to assign this to your PrettyPhoto

Can you post your ajax script to give you an example of how to do this.

It may be something like this:
function loadpage(page_request, containerid){
if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1)){
document.getElementById(containerid).innerHTML=page_request.responseText;
$(".gallery:first a[rel^='prettyPhoto']").prettyPhoto({animationSpeed:'slow',theme:'dark_rounded',slideshow:4000, autoplay_slideshow: false});
}
}

Open in new window

0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now