Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Siw Ørnhaug 130 posts 109 karma points
    Apr 18, 2012 @ 14:39
    Siw Ørnhaug
    0

    Best way to trigger modal popup from top menu navigation?

    I have a web site with a normal top level menu, all items are internal pages to be shown. But now I need one menu item to be the target button of an Ajax Modal Popup Extender control.

    So the menu item is not a link to a new page but shall trigger the Show event of the mpe control. The menu and the mpe control are both in the master template.

    What is a good and elegant solution to this?

     

    Thanks in advance!

    Siw

  • bob baty-barr 1180 posts 1294 karma points MVP
    Apr 18, 2012 @ 15:21
    bob baty-barr
    0

    i use colorbox.js for these types of activities, but there are MANY jquery plugins for such activities. I hope you find this helpful.

    http://www.jacklmoore.com/colorbox

     

  • Siw Ørnhaug 130 posts 109 karma points
    Apr 18, 2012 @ 15:57
    Siw Ørnhaug
    0

    Well Bob, colorbox seems like something I should look into, but I have used the Ajax Toolbox kit on this occation since it's an old favourite of mine. The solution is almost in place. All I lack is the markup for the menu item that should trigger the modal popup. My dummybutton works but should be converted to a menu item that is. I was hoping for a light and easy way of doing it.

  • Siw Ørnhaug 130 posts 109 karma points
    Apr 23, 2012 @ 09:50
    Siw Ørnhaug
    0

    I'll try to clarify my needs:

    Main menu is xslt unordered list. One of the links there need to be the target control of my modal popup but what markup for this will work in xslt?

    I've tried a simple HTML input control but it doesn't trigger the modal popup extension when posting.

    I think that creating an xslt extension is a bit overkill but at the moment it's the only solution I can think of... It could be link that calls the MPE control's Show event.

    Any better ideas? 

  • Siw Ørnhaug 130 posts 109 karma points
    May 09, 2012 @ 09:46
    Siw Ørnhaug
    0

    Hi guys,

    My problem here was to trigger the MPE overlay from a normal menu as unordered list xslt.

    I knew it wasn't really hard just couldn't get my head wrapped around it. I ended up doing this:

       <li>
          <a href="#" onclick="document.getElementById('ctl00_ctl00_ctl00_ContentPlaceHolderDefault_btnOverlay').click();">DESTINASJONER</a>
          &nbsp;<xsl:text> / </xsl:text>&nbsp;
       </li>

    So the tiny trick I needed was a javascript that clicked the correctly named asp button defined as target control in my mpe implementation.

     

     

Please Sign in or register to post replies

Write your reply to:

Draft