K
kurt sune
I am having trouble with SetFocus.
I have a textbox with AJAX extenders:
<asp:TextBox ID="txtOrg" runat="server" CssClass="inputstyle"
MaxLength="10"></asp:TextBox>
<cc1:TextBoxWatermarkExtender ID="txtOrg_TextBoxWatermarkExtender"
runat="server" Enabled="True" TargetControlID="txtOrg"
WatermarkCssClass="watermarked" WatermarkText="write an orgnumber">
</cc1:TextBoxWatermarkExtender>
<cc1:FilteredTextBoxExtender ID="txtOrg_FilteredTextBoxExtender"
runat="server"
Enabled="True" TargetControlID="txtOrg" ValidChars="0123456789">
</cc1:FilteredTextBoxExtender>
In page load I do: SetFocus(txtOrg)
The result: The textbox does not get focus, instead the caret is placed in
the textbox after the watermark text.
If I in the page html in body onload do
document.getElementById('txtOrg').focus();
the the focus is properly set in the textbox.
Ideas anyone?
/k
I have a textbox with AJAX extenders:
<asp:TextBox ID="txtOrg" runat="server" CssClass="inputstyle"
MaxLength="10"></asp:TextBox>
<cc1:TextBoxWatermarkExtender ID="txtOrg_TextBoxWatermarkExtender"
runat="server" Enabled="True" TargetControlID="txtOrg"
WatermarkCssClass="watermarked" WatermarkText="write an orgnumber">
</cc1:TextBoxWatermarkExtender>
<cc1:FilteredTextBoxExtender ID="txtOrg_FilteredTextBoxExtender"
runat="server"
Enabled="True" TargetControlID="txtOrg" ValidChars="0123456789">
</cc1:FilteredTextBoxExtender>
In page load I do: SetFocus(txtOrg)
The result: The textbox does not get focus, instead the caret is placed in
the textbox after the watermark text.
If I in the page html in body onload do
document.getElementById('txtOrg').focus();
the the focus is properly set in the textbox.
Ideas anyone?
/k