use jquery dialog to handle asp.net onclick -


my asp.net sqldatareader:(admin.aspx.cs)

   while(dr.read()){    l += "<a onclick='hello(";                 l += dr["cid"].tostring();                 l += ");'>";                 l += "</a>";    } 

javascript function:(admin.aspx)

    <script language="javascript" type="text/javascript">     function hello(id)     {         window.open("webform1.aspx?id=" + id, "", "height=50,width=100,scrollbars=no,resizable=no,toolbars=no,status=no,menubar=no,location=no");     } </script> 

webform1.aspx

    <asp:button id="btn_ok" runat="server" onclick="btn_ok_click" text="ok" /> 

i want use jquery dialog in admin.aspx handle button onclick function of webform1.aspx instead of using the javascript window

    $(function () {     $("#del-dialog").dialog({     autoopen: false,     width: 300,     height: 100,     modal: true,     close: function (event, ui) {         location.reload(false);     },      buttons: {         'delete': function () {             $(this).dialog('close');               // delete function goes here         },         'cancel': function () {             $(this).dialog('close');         }     }, });  $(".icon-del").click(function (event) {     event.preventdefault();     $("#del-dialog").dialog("open"); });     }); 


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -