I am using Highslide and it is working well, except when I try to reopen a highslide popup with new content. I actually don’t need it to reopen, but since its the same contentId, it does. The content is not being updated though. Here is the code:
function doSomething() {
//Changes to fileExistList (removed for simplicity)
var newHTML = $('fileExistList').clone(true); //Cloning div as Highslide removes it
$(newHTML).id = 'fileExistList2'; //Change cloned divs id
$('fileExistList').insert({ //add cloned div to page
before: newHTML
});
hs.htmlExpand(null, { contentId: 'fileExistList2', align:'center' });
}
The first time it is called, it displays correctly, but all the times after that until refresh displays the initial popup content and not the updated content. I am using iframes for the Highslide popups.
Anyone have any ideas how to modify this to open with the updated content?
Thanks.
Highslide has a few configuration options and one is preserveContent, which you need set to false for HTML content. This wasn’t the only thing that I had to do to make it work. I had to check the hs.clones object and remove the id of the HTML content I was copying. This forces highslide to get the updated id content.