![]() |
Showing focus
I have a problem with not seeing the current focus while in a particular
screen in a my app. The focus does not show for a type=text or textarea. I have tried to reproduce this problem in a test application, but have not been successful is doing that. The actual app has a screen which is displayed on a template and the contents are the return from an AJAX call. In that content there is a hidden block. Clicking on a button in the displayed area causes that hidden block to appear (with a gray background in a fixed location on the screen). It is in that area that I have both text fields and text areas. I also have dropdown lists and buttons. Only the text areas and text fields do not display focus when there, but I can type into them so I know that focus is there. For my test app I copied the CSS file that I had been using and placed my content within the same two named <div>s where the actual content appears on the template. With this test app there is no problem. The test app is at http://www.sheldonlg.com/multiplesel...multiples5.php. I don't even know where to start looking for the problem. I did a search in Google for "ht ml showfocus", but that wasn't much help. Any suggestions? (crossposted in comp.lang.javascript and alt.html) |
Re: Showing focus
sheldonlg wrote:
> http://www.sheldonlg.com/multiplesel...multiples5.php. 404 -- Take care, Jonathan ------------------- LITTLE WORKS STUDIO http://www.LittleWorksStudio.com |
Re: Showing focus
Jonathan N. Little wrote:
> sheldonlg wrote: > >> http://www.sheldonlg.com/multiplesel...multiples5.php. > > 404 > http://www.sheldonlg.com/multiplesel.../multiple5.php Sorry. |
Re: Showing focus
sheldonlg a écrit :
> I have a problem with not seeing the current focus while in a particular > screen in a my app. The focus does not show for a type=text or > textarea. I have tried to reproduce this problem in a test application, > but have not been successful is doing that. > > The actual app has a screen which is displayed on a template and the > contents are the return from an AJAX call. In that content there is a > hidden block. Clicking on a button in the displayed area causes that > hidden block to appear (with a gray background in a fixed location on > the screen). It is in that area that I have both text fields and text > areas. I also have dropdown lists and buttons. Only the text areas and > text fields do not display focus when there, but I can type into them so > I know that focus is there. CSS (for others than IE) : input { background: silver } input:focus { background: white } HTML : <input onfocus="if(IE) this.background='white';" onblur="if(IE) this.background='';" id="hiddenInput" name="Name"> JS : IE = false; /*@cc_on IE=true; @*/ is your div styled visibity: hidden; or display: none; ? is your div in same form that the form in rear when this div comes at front ? does that happens also with Firefox ? -- sm |
Re: Showing focus
SAM wrote:
> sheldonlg a écrit : >> I have a problem with not seeing the current focus while in a >> particular screen in a my app. The focus does not show for a >> type=text or textarea. I have tried to reproduce this problem in a >> test application, but have not been successful is doing that. >> >> The actual app has a screen which is displayed on a template and the >> contents are the return from an AJAX call. In that content there is a >> hidden block. Clicking on a button in the displayed area causes that >> hidden block to appear (with a gray background in a fixed location on >> the screen). It is in that area that I have both text fields and text >> areas. I also have dropdown lists and buttons. Only the text areas >> and text fields do not display focus when there, but I can type into >> them so I know that focus is there. > > CSS (for others than IE) : > > input { background: silver } > input:focus { background: white } > > HTML : > > <input onfocus="if(IE) this.background='white';" > onblur="if(IE) this.background='';" > id="hiddenInput" name="Name"> > > JS : > > IE = false; /*@cc_on IE=true; @*/ > I'll try this > > > is your div styled visibity: hidden; or display: none; ? It is initially styled visibity: hidden; When an action is clicked that needs to display it, that javascript changes the style to visibility:visible with editBlock.style.visibility = "visible"; > > is your div in same form that the form in rear when this div comes at > front ? No, a form was not needed for the complete screen since there is no submittal anywhere. It is all with AJAX. This, though, is in its own form in order to use the multiple selection stuff. > > does that happens also with Firefox ? I haven't even done IE. I do all my development first on Firefox because of its tremendous developer tools. |
Re: Showing focus
On Mar 18, 6:02 pm, sheldonlg <sheldonlg> wrote:
> > is your div styled visibity: hidden; or display: none; ? > > It is initially styled visibity: hidden; When an action is clicked > that needs to display it, that javascript changes the style to > visibility:visible with editBlock.style.visibility = "visible"; > > > is your div in same form that the form in rear when this div comes at > > front ? > > No, a form was not needed for the complete screen since there is no > submittal anywhere. It is all with AJAX. This, though, is in its own > form in order to use the multiple selection stuff. > > > does that happens also with Firefox ? > > I haven't even done IE. I do all my development first on Firefox > because of its tremendous developer tools. Can you give an exact example, what you type, what buttons you click and what should happen, what should appear where, etc. |
Re: Showing focus
sheldonlg a écrit :
>> > http://www.sheldonlg.com/multiplesel.../multiple5.php Apparently no problem with focus (Fx 2 Mac) -- sm |
Re: Showing focus
mynameisnobodyodyssea@googlemail.com wrote:
> On Mar 18, 6:02 pm, sheldonlg <sheldonlg> wrote: >>> is your div styled visibity: hidden; or display: none; ? >> It is initially styled visibity: hidden; When an action is clicked >> that needs to display it, that javascript changes the style to >> visibility:visible with editBlock.style.visibility = "visible"; >> >>> is your div in same form that the form in rear when this div comes at >>> front ? >> No, a form was not needed for the complete screen since there is no >> submittal anywhere. It is all with AJAX. This, though, is in its own >> form in order to use the multiple selection stuff. >> >>> does that happens also with Firefox ? >> I haven't even done IE. I do all my development first on Firefox >> because of its tremendous developer tools. > > Can you give an exact example, > what you type, what buttons you click > and what should happen, what should appear where, etc. > I cannot reproduce the problem on a simple app. I pointed to the simple app (that works) http://www.sheldonlg.com/multiplesel.../multiple5.php. In the actual app, something like this is initially hidden. Then when I click on a link, I have javascript that makes this appear by changing the visibility attribute to visible. At that point I can click into the text field and enter data, but I there is no cursor to show that I am focussed there. It should be the vertical I-beam. |
Re: Showing focus
mynameisnobodyodyssea@googlemail.com wrote:
> On Mar 18, 6:02 pm, sheldonlg <sheldonlg> wrote: >>> is your div styled visibity: hidden; or display: none; ? >> It is initially styled visibity: hidden; When an action is clicked >> that needs to display it, that javascript changes the style to >> visibility:visible with editBlock.style.visibility = "visible"; >> >>> is your div in same form that the form in rear when this div comes at >>> front ? >> No, a form was not needed for the complete screen since there is no >> submittal anywhere. It is all with AJAX. This, though, is in its own >> form in order to use the multiple selection stuff. >> >>> does that happens also with Firefox ? >> I haven't even done IE. I do all my development first on Firefox >> because of its tremendous developer tools. > > Can you give an exact example, > what you type, what buttons you click > and what should happen, what should appear where, etc. > I cannot reproduce the problem on a simple app. I pointed to the simple app (that works) http://www.sheldonlg.com/multiplesel.../multiple5.php. In the actual app, something like this is initially hidden. Then when I click on a link, I have javascript that makes this appear by changing the visibility attribute to visible. At that point I can click into the text field and enter data, but I there is no cursor to show that I am focussed there. It should be the vertical I-beam. |
Re: Showing focus
mynameisnobodyodyssea@googlemail.com wrote:
> On Mar 18, 6:02 pm, sheldonlg <sheldonlg> wrote: >>> is your div styled visibity: hidden; or display: none; ? >> It is initially styled visibity: hidden; When an action is clicked >> that needs to display it, that javascript changes the style to >> visibility:visible with editBlock.style.visibility = "visible"; >> >>> is your div in same form that the form in rear when this div comes at >>> front ? >> No, a form was not needed for the complete screen since there is no >> submittal anywhere. It is all with AJAX. This, though, is in its own >> form in order to use the multiple selection stuff. >> >>> does that happens also with Firefox ? >> I haven't even done IE. I do all my development first on Firefox >> because of its tremendous developer tools. > > Can you give an exact example, > what you type, what buttons you click > and what should happen, what should appear where, etc. > I cannot reproduce the problem on a simple app. I pointed to the simple app (that works) http://www.sheldonlg.com/multiplesel.../multiple5.php. In the actual app, something like this is initially hidden. Then when I click on a link, I have javascript that makes this appear by changing the visibility attribute to visible. At that point I can click into the text field and enter data, but I there is no cursor to show that I am focussed there. It should be the vertical I-beam. |
| All times are GMT. The time now is 10:39 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.