This is just driving me nuts. I am trying jqModal work with jquery.ad-gallery. This is what I have so far:
<link rel="stylesheet" type="text/css" href="css/jqModal.css">
<link rel="stylesheet" type="text/css" href="css/jquery.ad-gallery.css">
<script type="text/javascript" src="javascript/jquery-1.4.js"></script>
<script type="text/javascript" src="javascript/jquery.ad-gallery.js" ></script>
<script type="text/javascript" src="javascript/jqModal.js" ></script>
<script>
$().ready(function() {
$('#jqmPix').jqm({modal:true});
showPix = function(bhiid,projNum) {
$.ajax({
type: "get",
url: "<cfoutput>#actURL#</cfoutput>",
cache: false,
success: function(result) {
$('#jqmPixTitle').html('Photos for : '+projNum);
$('#jqmPixText').html(result);
$('#jqmPix').jqmShow().css('left',getTopLeftPt('#jqmPix')).css('top',getTop('#jqmPix'));
},
error: function(xmlHttpRequest, status, err) {
confirm('Error!' + err );
}
});
}
getTopLeftPt = function(a){
var leftPt = parseInt($(window).width()/2)-parseInt($(a).width()/2);
//alert(leftPt);
return leftPt;
}
getTop = function(a){
var topPt = parseInt($(window).height()/4-50);
//alert(topPt);
return topPt;
}
});
</script>
<input type="button" name="clicky" id="clicky" value="clicky" onclick="showPix(40852,'RE5540T09608B')"/>
<div id="jqmPix" class="jqmWindow" style="width:690px; display:none;">
<div class="jqmHeader" >
<div id="jqmPixTitle"></div>
<div id="jqmHeaderClose" >
<img src="images/vista-close.gif" class="jqmClose" alt="close" />
</div>
<div style="clear:both;"></div>
</div>
<div class="jqmBody">
<div id="jqmPixText" align="center">
</div>
<div style="clear:both;"></div>
</div>
<div class="jqmFooter jqmFooterButtons" id="jqmFooterText">
</div>
I see the modal window, the navigation underneath the image container but the main image is missing. IT just doesn't display.
The funny thing is if I go to the ajax url directly, everything works perfectly fine. One trick is that i have to pass a url variable and check for its existence when i hit the ajax url directly. If it exists, then i include . Otherwise, firebug throws an error on jqmShow() on the calling page.
can anybody help me?
thanks in advance.