RadOpen Doesn't Fire

4 posts, 0 answers
  1. Mohmed
    Mohmed avatar
    3 posts
    Member since:
    Dec 2013

    Posted 26 Dec 2013 Link to this post

    I have to call a popup window using radopen. i did it a lot in the same project and it works fine also i did it in the same page and it works fine too but when i using radtoolbar something happens and the radopen doesn't fire and put # at the end of URL .
    here's my code :

    <telerik:RadToolBar ID="GridToolBar" OnClientButtonClicking="clickHandler" dir="<%$ Resources: Main,Dir %>"
                   OnButtonClick="GridToolBar_OnClick" runat="server" Width="100%">
                   <Items>
                       <telerik:RadToolBarButton ToolTip="<%$ Resources: Main,ExportToExcel  %>"
                           runat="server" Value="Excel" ImageUrl="<%$ Resources:Image, Excel%>">
                       </telerik:RadToolBarButton>
                       <telerik:RadToolBarButton ToolTip="<%$ Resources: Main,ExportToExcelML  %>"
                           runat="server" Value="ExcelML" ImageUrl="<%$ Resources:Image, ExcelML%>">
                       </telerik:RadToolBarButton>
                       <telerik:RadToolBarButton ToolTip="<%$ Resources: Main,ExportToWord %>"
                           runat="server" Value="Word" ImageUrl="<%$ Resources:Image, Word%>">
                       </telerik:RadToolBarButton>
                       <telerik:RadToolBarButton ToolTip="<%$ Resources: Main,ExportToCSV  %>"
                           runat="server" Value="CSV" ImageUrl="<%$ Resources:Image, CSV%>">
                       </telerik:RadToolBarButton>
                       <telerik:RadToolBarButton ToolTip="<%$ Resources: Main,ExportToPDF %>"
                           runat="server" Value="PDF" ImageUrl="<%$ Resources:Image, PDF%>">
                       </telerik:RadToolBarButton>
                       <telerik:RadToolBarButton ToolTip="<%$ Resources: Main,AddExistingUser %>" CssClass="<%$ Resources: Main,ToolbarButtonAlignment %>"
                           runat="server" Value="AddUser" ImageUrl="<%$ Resources:Image, RegisterUser%>" >
                       </telerik:RadToolBarButton>
                   </Items>
               </telerik:RadToolBar>

      
    the last button should show a popup window using radopen. i used the javascript function calld clickhandler and here's the function :

    function clickHandler(sender, eventArgs) {
                if (eventArgs.get_item().get_value() == "AddUser") {
    alert("Welcome");
                    radopen("Page_Popup.aspx", "RW");
                    return false;
                }
            }

    and RadWindow Manager is :

    <telerik:RadWindowManager ID="RWM" runat="server">
                    <Windows>
                        <telerik:RadWindow ID="RW" runat="server" Width="600px" Height="330px" Behaviors="Close, Move, Minimize, Pin, Reload"
                            ShowContentDuringLoad="false">
                        </telerik:RadWindow>
                    </Windows>
                </telerik:RadWindowManager>


    be informed that the alert message welcome is appeared to me.
    and when i replace radopen with window.open it opens a new window.

    thanks in advance
     
  2. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 27 Dec 2013 Link to this post

    Hello Mohmed,

    I tried to reproduce the problem on my end, but to no avail. The radopen() method worked as expected.

    Please review this screencast and let me know if I am missing something important that could lead to the problematic behavior. This is the setup I used for the test process, you can further examine if there are important deference:
    <telerik:RadWindowManager ID="RWM" runat="server">
        <Windows>
            <telerik:RadWindow ID="RW" runat="server" Width="600px"
                Height="330px" Behaviors="Close, Move, Minimize, Pin, Reload"
                ShowContentDuringLoad="false">
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>
     
    <telerik:RadToolBar ID="GridToolBar" OnClientButtonClicking="clickHandler" runat="server">
        <Items>
            <telerik:RadToolBarButton runat="server" Value="Excel" Text="Excel">
            </telerik:RadToolBarButton>
            <telerik:RadToolBarButton runat="server" Value="ExcelML" Text="ExcelML">
            </telerik:RadToolBarButton>
            <telerik:RadToolBarButton runat="server" Value="Word" Text="Word">
            </telerik:RadToolBarButton>
            <telerik:RadToolBarButton runat="server" Value="CSV" Text="CSV">
            </telerik:RadToolBarButton>
            <telerik:RadToolBarButton runat="server" Value="PDF" Text="PDF">
            </telerik:RadToolBarButton>
            <telerik:RadToolBarButton runat="server" Value="AddUser" Text="AddUser">
            </telerik:RadToolBarButton>
        </Items>
    </telerik:RadToolBar>
     
    <script type="text/javascript">
     
        function clickHandler(sender, eventArgs) {
            if (eventArgs.get_item().get_value() == "AddUser") {
                alert("Welcome");
                radopen("Page_Popup.aspx", "RW");
                return false;
            }
        }
     
    </script>

    If you still have difficulties wit this issue, please get back to me with the following information:
    • Are there any JS errors in the console, when the problem appears?
    • Can you verify that the used RadControls version is 2013.3.1114?
    • Are there any further customization done, that could affect the RadWindow's or RadToolbar's behavior?

    Regards,
    Ianko
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Mohmed
    Mohmed avatar
    3 posts
    Member since:
    Dec 2013

    Posted 27 Dec 2013 Link to this post

    Dear lanko,

    Thanks a lot for you interest.

    yes i got this error in JS :

    Uncaught TypeError: Cannot call method 'open' of undefined Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScri…:19042
    window.radopen Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScri…:19042
    clickHandler AccessManagement.aspx:89
    (anonymous function) Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScri…:6
    Telerik.Web.UI.RadWebControl.raiseEvent Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScri…:846
    b.RadToolBar._raiseCancelEvent Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScri…:5517
    Telerik.Web.UI.RadToolBarButton._doClick Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScri…:6327
    Telerik.Web.UI.RadToolBarButton._onClick Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScri…:6335
    b.RadToolBar._onItemEvent Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScri…:5471
    b.RadToolBar._onItemClick Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScri…:5456
    Telerik.Web.UI.EventMap._onDomEvent Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScri…:3519
    (anonymous function) Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScri…:6
    b Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScri…:445
     
  5. Mohmed
    Mohmed avatar
    3 posts
    Member since:
    Dec 2013

    Posted 30 Dec 2013 Link to this post

    thanks a lot.

    it is solved now . there was another java script error in the page makes conflict.
Back to Top