This is a migrated thread and some comments may be shown as answers.

onclick="openRadWindow" not working in RadPageView

2 Answers 79 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 2
Robert asked on 26 Mar 2012, 04:59 PM
Hi everybody!!!

i have a problem using radpagemultiview i have on each radpageview a grid, my problem is in the second radgrid when i use  javascript openRadWindow if i do double click the popup get the correct  path but if i click in the link button using javascript not get the correct path i dont understand why because i wrote correct path

<a href="#" onclick="openRadWindow2('<%#DataBinder.Eval(Container.DataItem,"cod_empleado")%>'); return false;">
                            Imprimir</a>

and my javascript:

<telerik:RadCodeBlock ID="RadCodeBlock4" runat="server">
            <script type="text/javascript">

                function refreshGrid(arg) {
                    if (!arg) {
                        $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
                    }
                    else {
                        $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindAndNavigate");
                    }
                }
                function RowDblClick(sender, eventArgs) {
                    window.radopen("Descuentoempleado?cod_empleado=" + eventArgs.getDataKeyValue("cod_empleado"), "UserListDialog");

                }
                function openRadWindow(cod_empleado_) {
                    var oWnd = radopen("Descuentoempleado.aspx?cod_empleado=" + cod_empleado_, "UserListDialog");
                    oWnd.center();
                }
                
            </script>
        </telerik:RadCodeBlock>
i hope anybody can help me thank u very much

2 Answers, 1 is accepted

Sort by
0
Accepted
Andrey
Telerik team
answered on 28 Mar 2012, 03:46 PM
Hello,

The first thing that I notice in your code is that you are attaching the openRadWindow2 function as a event handler of the onclick event of the anchor tag, but then you are implementing the openRadWindow function. These two functions are different. Notice the trailing "2' at the first.

Try making the declaration and the definition function equal and check whether the issue is resolved.

All the best,
Andrey
the Telerik team
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 their blog feed now.
0
Robert
Top achievements
Rank 2
answered on 28 Mar 2012, 05:54 PM
thanks u very much i had that error :$ its working
Tags
General Discussions
Asked by
Robert
Top achievements
Rank 2
Answers by
Andrey
Telerik team
Robert
Top achievements
Rank 2
Share this question
or