alexealden
asked on
JQuery UI Ajax Dialog Box, Is it posisble for new content to load within the dialog box ?
What I mean by this is : once the dialog box has opened and a link is clicked within box it will bring the content into the full page rather than been contained within the dialog box.
You can see a working example here.. if you click "giftwrap this item" the dialog box pops up. If you then click add to cart within the dialog the whole page refreshes.
http://pa.creatico1.co.uk/pp/Capri/Nubuck_Olive_240.html
The code I am using is below is it possible for it to refresh within the dialog?
<a class="ajax" href="http://pa.creatico1.co.uk/products1.asp?category=GiftWrap&product={partno}"> gift wrap this album?</a>
<script type="text/javascript">
$(function (){
$('a.ajax').click(function () {
var url = this.href;
var dialog = $('<div style="display:hidden"></d iv>').appe ndTo('body ');
// load remote content
dialog.load(
url,
{},
function (responseText, textStatus, XMLHttpRequest) {
dialog.dialog({width:950, height:800});
}
);
//prevent the browser to follow the link
return false;
});
});
</script>
You can see a working example here.. if you click "giftwrap this item" the dialog box pops up. If you then click add to cart within the dialog the whole page refreshes.
http://pa.creatico1.co.uk/pp/Capri/Nubuck_Olive_240.html
The code I am using is below is it possible for it to refresh within the dialog?
<a class="ajax" href="http://pa.creatico1.co.uk/products1.asp?category=GiftWrap&product={partno}"> gift wrap this album?</a>
<script type="text/javascript">
$(function (){
$('a.ajax').click(function
var url = this.href;
var dialog = $('<div style="display:hidden"></d
// load remote content
dialog.load(
url,
{},
function (responseText, textStatus, XMLHttpRequest) {
dialog.dialog({width:950, height:800});
}
);
//prevent the browser to follow the link
return false;
});
});
</script>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Glad to help. Thanks for the points.
ASKER