[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 195
  • Last Modified:

Open a Jquery dialog from an html menu?

Hi - I am using a simple, multi-level menu I found here (http://www.dynamicdrive.com/dynamicindex1/ddlevelsmenu/index.htm).  

Instead of opening the menu target (an html file) in the same or a blank browser window, I'd like it to open in a jquery dialog.

I'm able to get a jquery dialog to open the file from a button, but don't know how to make it from from the html menu.  

Can it be done?  Can someone give me an idea how to do it?  Thank you!
1 Solution
Alexandre SimõesManager / Technology SpecialistCommented:
If you know how to do it from a button then you just have to "hack" the <a> link.

<li><a href="#" onclick="openPopup();">My page</a></li>

Open in new window

function openPopup(){
  // put the code you have here
  return false;  // make sure you return false at the end to cancel the link behavior

Open in new window


Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now