David Emerson
newsgrps at dalyn.co.nz
Fri Jun 2 00:21:37 CDT 2006
Jim, I am new to HTML and .Net, haven't ever used Java, and don't quite follow your suggestion. 1. document.forms[0].textbox1.focus() - I would include one of these functions for each text box - Correct? 2. <div onClick="text_focus()"> <textarea cols="25" rows=3 name="textbox1" wrap> Enter text here... </textarea> </div> I am using Text Boxes to get the information. An example is: <asp:TextBox ID="txtExpAmt" runat="server" BorderColor="Black" BorderWidth="1px" Font-Names="Arial" Font-Size="10pt" Style="z-index: 119; left: 601px; position: absolute; top: 257px" TabIndex="10" Width="77px">200</asp:TextBox> I am not sure how to translate this into the example you gave. David At 31/05/2006, you wrote: >Hi David: > >The following is air code but some similar code should work... have a real >example but can not remember where it is at the moment: > ><!-- 1. Add this function --> >SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"> ><!-- >Function text_focus1() { > document.forms[0].textbox1.focus() >} >//--> ></SCRIPT> >... > ><!-- 2. Use DIV tag to encapsulate html text area tag --> ><div onClick="text_focus()"> > <textarea cols="25" rows=3 name="textbox1" wrap> > Enter text here... > </textarea> ></div> > >This is not specifically done through .Net but this would be the direct >approach. This is by no means completed code but it should be a start. > >HTH >Jim > >-----Original Message----- >From: accessd-bounces at databaseadvisors.com >[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of David Emerson >Sent: Tuesday, May 30, 2006 2:13 PM >To: accessd at databaseadvisors.com >Subject: [AccessD] Dot Net 2.0 - Clicking into Text Boxes > >I have a text box on my web page. When using a mouse, users can only >go into the box when they click on text already entered. If they >click in part of the box that doesn't have any text then the cursor >doesn't move to the box. > >Also, if they delete everything in the box then the only way they can >get back to the box is to click on the associated label (which also >works if some text is in the field) > >This is confusing for the users. Is it possible to make a change so >that clicking anywhere in a text box will move the cursor into the box? > >Regards > >David Emerson >Dalyn Software Ltd >New Zealand