Hello,
I have following scenario.
On the Form I have RadButton with code:
where openTabelka is javascript function located in body Form:
next, I have script for key pressed on the Form:
and in body tag: <body onkeypress="javascript:klik()">
when I click (with mouse button) on my RadButton, function openTabelka is running and new page in Web Browser is opened.
but when I press Enter key, function klik() is fired, RadButton (RadButton_tab_Click) is fired (I see this in debugger),
line with
but script openTabelka is not running.
where I make a mistake ?
regards, Dominik
I have following scenario.
On the Form I have RadButton with code:
protected void RadButton_tab_Click(object sender, EventArgs e) { sesja="abcdef";
ScriptManager.RegisterStartupScript(Page, typeof(Page), "runTabelka", "openTabelka('"+sesja+"')", true); }<telerik:RadScriptBlock ID="RadScriptBlock2" runat="server"> <script type="text/javascript"> function openTabelka(args) { var adres = "http://127.0.0.1/Tabela.aspx?" + args; window.open(adres, "_blank"); } </script></telerik:RadScriptBlock>function klik() { var k = event.keyCode; if (k == 13) { var button = $telerik.findButton("<%= RadButton_tab.ClientID %>"); button.click(); }; }when I click (with mouse button) on my RadButton, function openTabelka is running and new page in Web Browser is opened.
but when I press Enter key, function klik() is fired, RadButton (RadButton_tab_Click) is fired (I see this in debugger),
line with
ScriptManager.RegisterStartupScript(Page, typeof(Page), "runTabelka", "openTabelka('"+sesja+"')", true); is executed,but script openTabelka is not running.
where I make a mistake ?
regards, Dominik