So I understand this is a strange question, but is there a way to use content displayed in a SharePoint modal, in a jQuery modal instead. I like the styling jQuery offers, but the SharePoint modal comes from a CQWP link. I basically just modified the CQWP template to include

<a href="{$SafeLinkUrl}" title="{@LinkToolTip}" class="ModalDialog">

and then simply added the following jQuery to the page via CEWP

    var itemLink = "";
        itemLink = $(this).attr('href'); 

function openModalDialog(itemLink) {
    var options = {
        url: itemLink,
        width: 800,
        height: 600,

I am curious as to whether or not I can extract specifics via the ItemStyle, or even here and through it into a jQuery modal instead. I have learned the modal pieces in a very simple format with using divs and such, so I understand that I could write queries in order to get the data, load the divs, create my own links, etc but I would really like to get there through this modified CQWP if that is possible/feasible...

End goal is to get rid of the ribbon, handle my own events with buttons and show only the content I wish to show in the modal, but still use the CQWP on the page and links to open the modal display.

Does this make sense? Appreciate any help or advice as always guys! Thanks

1 Answer 1


You could attempt to add your own JavaScript to each page that overrides the "SP.UI.ModalDialog.showModalDialog" function. Something like:

SP.UI.ModalDialog.showModalDialog = function (options) {


Don't know how reliable it would be, but it is an option.

  • interesting John. this seems to be working. though to get one complete example, it ends up being more work on the ouput, but less on the data roll up. kinda the opposite of qrying building page layout, then loading that with links that use .dialog. perhaps it was silly to begin with as this is a very round about way, but I was really just curious. its actually working though, thanks!
    – Justin
    Aug 13, 2012 at 11:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.