views:

30

answers:

1

I Have a asp:Menu item in my masterpage file and it is using a sitemap. In my sitemap file, i have some sitemapnodes:

<siteMapNode>
 <siteMapNode url="qq.aspx" title="qq" />
 <siteMapNode url="#"  title="Feedback"/>
</siteMap>

in the codebehind file of my masterpage, I add a javascript function to the feedback node:

protected void menu_OnItemDataBound(object sender, MenuEventArgs e)
{
  SiteMapNode node = (SiteMapNode)(e.Item.DataItem);
  if (node.Title.ToString() == "Feedback")
    e.Item.NavigateUrl = "javascript:popupFeedback();";
}

In my masterpage, I also have a hidden div:

<div id="feedback" class="page-feedback" style="display: none;">
<p>submit your feedback...</p>
</div>

I tried the following 2 code, none of them works. Please help:

1- Nothing happens with this one:

function popupFeedback() 
{
        $("#feedback").dialog( {modal:true} ); 

}

2- The div becomes visible, but no dialog window pops up:

function popupFeedback() 
{
        $("#feedback").css("display", "block").dialog("open");
        $("#feedback").dialog({
        title: 'Enter Feedback',
        width: 680,
        height: 500,
        bgiframe: true,
        modal: true
        });    
}
A: 

I was missing the ui file!

newcoder