After days of searching for a solution, I am still unable to resolve my issue. My website features a simple web-form with text-boxes that are supposed to appear when the user selects the "custom search" option. While testing locally, everything works fine. However, once I publish it to our web server, the text-boxes stop functioning properly. The hover cursor on the web-server changes unexpectedly from the "text" cursor to the "pointer" cursor. If the cursor is positioned at the edge of the text-box, it displays the "text" cursor allowing me to click and type. But as soon as the cursor moves inside the text-box without touching the edges, it switches to the pointer cursor and typing becomes impossible no matter how hard I try to activate the text-box. Interestingly, if I first make a selection in the drop-down list and then click tab, focus shifts to the text-box.
Below is the mark-up code for the text-boxes:
<asp:Label ID="lbl_Fname" Text="First Name" CssClass="FN-lbl" runat="server" />
<asp:DropDownList ID="ddl_Fname" CssClass="FN-drop" Width="12%" runat="server">
<asp:ListItem Value="0">-- Select One --</asp:ListItem>
<asp:ListItem Value="=">equals</asp:ListItem>
<asp:ListItem Value="<>">does not equal</asp:ListItem>
<asp:ListItem Value=">">greater than</asp:ListItem>
<asp:ListItem Value=">=">greater than or equal to</asp:ListItem>
<asp:ListItem Value="<">less than</asp:ListItem>
<asp:ListItem Value="<=">less than or equal to</asp:ListItem>
<asp:ListItem Value="like">contains</asp:ListItem>
<asp:ListItem Value="not like">doesn't contain</asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="txt_Fname" CssClass="FN-txt" Width="16%" runat="server"></asp:TextBox>
The following CSS entry was used (please note that the comment is only included in this post, not in actual CSS):
.FN-txt
{
position: absolute;
left: 320px;
top: 120px;
width: 100px;
height: 20px;
cursor: text; /*an attempt to get the cursor to behave, it didn't help*/
}
I have exhaustively researched all related posts on stack-overflow, code project, and spent numerous hours refining my search terms on Google (or blackle.com). Unfortunately, due to being a new member, I am unable to upload an image of the GUI.
----------------- Follow up notes ------------------------ The following code was added to the markup:
OnSelectedIndexChanged="ddl_Email_SelectedIndexChanged" AutoPostBack="true"
Below is the code behind:
protected void ddl_Fname_SelectedIndexChanged(object sender, EventArgs e)
{
if (ddl_Fname.SelectedValue != "0")
{
txt_Fname.Focus();
}
}
While attempting mtzaldo's solution, adding it solely to Fname seemed to partially fix the issue. Upon further testing, a combination of my changes and his suggestion appeared to solve the problem. I removed his z-index from the CSS and retested, confirming that it was still working.