开发者

Telerik RadWindows / How Open Telerik RadWindows With A DocMenu

I Have A DocMenu That is working with jquery...

one of it's item is like this :

        <a class="dock-item" href="#">
            <img src="JQueryDocMenu/Images/1.png" alt="Test" /><span>Test</span></a>

i am using Telerik Rad Windiws For pop up Windows...

when i am using a button or something like that , so every thing is ok for pop up the window...

but when i am using href of that menu it seems there is a problem.

the href in that item is like this :

            <a class="dock-item" href="javascript:OpenWindow();" title="Test">
                <img src="JQueryDocMenu/Images/1.png" alt="Test" /><span></span></a>

the RadWindowManager and It's Window is Like This :

<telerik:RadWindowManager ID="RadWindowManager1" runat="server" ReloadOnShow="True"
        ShowContentDuringLoad="False" VisibleStatusbar="False" Behavior="D开发者_开发技巧efault" InitialBehavior="None"
        EnableEmbeddedSkins="False" EnableEmbeddedBaseStylesheet="False" Skin="SunsetByMe"
        Font-Names="Tahoma" Style="z-index: 8000;" DestroyOnClose="True">
    <Windows>
        <telerik:RadWindow ID="window1" runat="server"
            Behavior="Close" NavigateUrl="~/a/window1.aspx"
            OnClientClose="OnClientClose"
            DestroyOnClose="True" Modal="True">
        </telerik:RadWindow>
    </Windows>
</telerik:RadWindowManager>

and javascript code is like this :

<script type="text/javascript">

  function OpenWindow() {
      Sys.Application.add_load(ow);
  }

  function ow() {
      var oWnd = radopen(null, 'window1');
      Sys.Application.remove_load(ow);
  }

  function OnClientClose(oWnd, args) {

  }
</script>

the onclick event of a button that popup RadWindow (it 's ok) is like this :

protected void Button1_Click1(object sender, EventArgs e)
{
    Page.RegisterStartupScript("callWin", "<script type='text/javascript'>OpenWindow();</script>");
}

how can i fix the problem ?

thanks in future advance


Do you need to open RadWindow from the server? If not, you could simply use:

<a class="dock-item" href="javascript:void(0)" onclick="openWin(); return false">yourlink</a>
......
<script type="text/javascript">

function openWin()
{
   radopen(null, "window1")
}

</script>

If you want to open the window from the server, all you need to do is set VisibleOnPageLoad=true.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜