Hi,
I have a following problem. First code:
I have a following problem. First code:
<
telerik:RadPanelBar
runat
=
"server"
ID
=
"RadPanelBar2"
ExpandMode
=
"SingleExpandedItem"
Width
=
"100%"
>
<
Items
>
<
telerik:RadPanelItem
ImageUrl
=
"~/Images/Att.png"
Text
=
"MojAtak"
runat
=
"server"
Expanded
=
"True"
>
<
Items
>
<
telerik:RadPanelItem
runat
=
"server"
>
<
ItemTemplate
>
<
asp:TextBox
ID
=
"ReportBox"
class
=
"text"
runat
=
"server"
Style
=
"height: 99%; width: 98%; font-size: 9px; border-style: none;"
TextMode
=
"MultiLine"
onkeyup
=
"javascript: czytaj();"
></
asp:TextBox
>
<
asp:TextBox
ID
=
"txtKto"
runat
=
"server"
class
=
"text"
Height
=
"14px"
Style
=
"width: 140px;"
Font-Size
=
"Small"
BackColor
=
"#CCFFFF"
Font-Italic
=
"True"
></
asp:TextBox
>
</
ItemTemplate
>
</
telerik:RadPanelItem
>
</
Items
>
</
telerik:RadPanelItem
>
<
telerik:RadPanelItem
ImageUrl
=
"~/Images/Cone.png"
Text
=
"Outbox"
runat
=
"server"
>
<
Items
>
<
telerik:RadPanelItem
runat
=
"server"
>
<
ItemTemplate
>
<
asp:TextBox
ID
=
"txtKogoS"
runat
=
"server"
class
=
"text"
Height
=
"14px"
Style
=
"width: 140px;"
Font-Size
=
"Small"
ReadOnly
=
"True"
BackColor
=
"#CCFFFF"
Font-Italic
=
"True"
></
asp:TextBox
>
<
asp:TextBox
ID
=
"txtDataS"
runat
=
"server"
class
=
"text"
Height
=
"14px"
Style
=
"width: 140px;"
Font-Size
=
"Small"
ReadOnly
=
"True"
BackColor
=
"#CCFFFF"
Font-Italic
=
"True"
></
asp:TextBox
>
</
ItemTemplate
>
</
telerik:RadPanelItem
>
</
Items
>
</
telerik:RadPanelItem
>
</
Items
>
</
telerik:RadPanelBar
>
<
telerik:RadScriptBlock
ID
=
"RadScriptBlock1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
var ReportBox = '<%=((TextBox)RadPanelBar2.Items[0].Items[0].FindControl("ReportBox")).ClientID%>';
var KtoBox = '<%=((TextBox)RadPanelBar2.Items[0].Items[0].FindControl("txtKto")).ClientID%>';
function czytaj() {
alert($get(ReportBox).value);
var raport = $get(ReportBox).value;
if (raport.search("ygrał") > 0 || raport.search("z walki:") > 0 || raport.search("Remis") >= 0) {
alert("Kto");
//kto
var k1 = raport.indexOf("w.", 0);
var wynikS = raport.substring(k1 + 3);
var k2 = wynikS.indexOf("otrzyma", 0);
var kto = wynikS.substring(0, k2 - 1);
alert(kto);
alert(KtoBox);
} else {
alert("!!!!");
}
}
</
script
>
</
telerik:RadScriptBlock
>
onkeyup - I can access whatever user entered in the ‘ReportBox’ but I can’t update ‘txtKto’.
If anyone have any suggestion please go ahead. Oh and please keep in mind I'm a rookie.
Thank you