472,780 Members | 4,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,780 software developers and data experts.

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)
Mar 18 '08 #1
11 1747
sheldonlg wrote:
http://www.sheldonlg.com/multiplesel...multiples5.php.
404

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Mar 18 '08 #2
SAM
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
Mar 18 '08 #4
SAM
sheldonlg a écrit :
>>
http://www.sheldonlg.com/multiplesel.../multiple5.php
Apparently no problem with focus (Fx 2 Mac)

--
sm
Mar 18 '08 #5
SAM wrote:
sheldonlg a écrit :
>>>
http://www.sheldonlg.com/multiplesel.../multiple5.php

Apparently no problem with focus (Fx 2 Mac)
Correct! This is the sample app and it works. I cannot reproduce the
problem in a simple app, and I cannot point you to the actual app since
that is behind firewalls and accessible only via VPN (it is an intranet
app). If I could reproduce the problem in a simple app, I would be 3/4
of the way to a solution.
Mar 18 '08 #6
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; @*/

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 ?

I tried the CSS stuff. That does what it says, but it doesn't solve my
problem. Let me more precise.

When that form comes up, the cursor everywhere is that left-up pointing
arrow. When the mouse is over a text field or a text area element, the
cursor changes to a vertical I-beam. However, the blinking vertical
line does not appear in the text field or the text area if I click on
them to set focus there. However, focus is set there as I can type in
information. I want to have that blinking vertical bar on as visual
feedback as to where the focus is.
Mar 18 '08 #7
On Mar 18, 7:14 pm, sheldonlg <sheldonlgwrote:
When that form comes up, the cursor everywhere is that left-up
pointing
arrow. When the mouse is over a text field or a text area element, the
cursor changes to a vertical I-beam. However, the blinking vertical
line does not appear in the text field or the text area if I click on
them to set focus there. However, focus is set there as I can type in
information. I want to have that blinking vertical bar on as visual
feedback as to where the focus is.
It is difficult to see what the problem is without an
exact-ish example.
Did you try, instead of changing visibility from hidden to visible,
to change with JavaScript the value of inner.HTML
Mar 18 '08 #8
my*******************@googlemail.com wrote:
On Mar 18, 7:14 pm, sheldonlg <sheldonlgwrote:
When that form comes up, the cursor everywhere is that left-up
pointing
>arrow. When the mouse is over a text field or a text area element, the
cursor changes to a vertical I-beam. However, the blinking vertical
line does not appear in the text field or the text area if I click on
them to set focus there. However, focus is set there as I can type in
information. I want to have that blinking vertical bar on as visual
feedback as to where the focus is.

It is difficult to see what the problem is without an
exact-ish example.
I know. I wish I could reproduce it here.
Did you try, instead of changing visibility from hidden to visible,
to change with JavaScript the value of inner.HTML
No, there is much to much to generate to then use an innerHTML setting.
Mar 18 '08 #9
On Mar 18, 7:57 pm, sheldonlg <sheldonlgwrote:
>
It is difficult to see what the problem is without an
exact-ish example.

I know. I wish I could reproduce it here.
Did you try, instead of changing visibility from hidden to visible,
to change with JavaScript the value of inner.HTML

No, there is much to much to generate to then use an innerHTML setting.
Just to state the obvious:
check for error messages in the Firefox error console,
check valid HTML, CSS etc.
I see that you use in your example tables in the form.
Maybe try the form without tables, just in case,
sometimes tables in forms can create problems.
Mar 18 '08 #10
SAM
sheldonlg a écrit :
>
No, there is much to much to generate to then use an innerHTML setting.
With your last test : Oll Korrect with Fx (mouse's pointer over fields)

Next test with a form in rear ?

--
sm
Mar 19 '08 #11
SAM
sheldonlg a écrit :
>
I tried the CSS stuff. That does what it says, but it doesn't solve my
problem. Let me more precise.

When that form comes up, the cursor everywhere is that left-up pointing
arrow. When the mouse is over a text field or a text area element, the
cursor changes to a vertical I-beam.
input:hover, textarea:hover { cursor: text }

#dimensions input:hover[type=text] { cursor: text }
#dimensions input:focus[type=text] { cursor: wait }

<http://www.w3.org/TR/CSS21/ui.html#propdef-cursor>
However, the blinking vertical
line does not appear in the text field or the text area if I click on
them to set focus there.
I have no solution for that.
Overall I can't get this not blinking cursor

--
sm
Mar 19 '08 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Martin | last post by:
I have the following function in the onchange event of several text boxes. If the user enters an invalid number the alert displays. I would like to return the user to that same field after he...
2
by: Krzysztof Karnicki | last post by:
I would like develop Form on my Windows Application, that is going to notify the user, just like Microsoft Office 2003 shows that there are new mail coming. When I use System.Windows.Forms.Form and...
6
by: sandy_pt_in | last post by:
Hi, I have modal form which I am showing with some fading effect... (it is like balloon that comes when you receive a mail in the outlook.) But when I show this form, Owner form looses focus. I...
7
by: Brian Henry | last post by:
I have a list box bound to a data set, of course the datasource,datamember, and valuemember are set, i tell it selecteditem = -1 to make nothing selected, select mode is set to only one item at a...
1
by: melanieab | last post by:
Hi, From reading something months ago, I've been under the impression that saying button1.Focus() is enough to focus on the button and highlight it (the dotted box). If this is true, I don't know...
1
by: Grimm | last post by:
I am developing an internalk inteface that integrates alot of seperate tools into one interface. The current version uses one Iframe inside a div layer for positioning. Currently the seperate web...
1
by: Luke R | last post by:
How do i do this? I have this at the top of the class for my form, but it doesnt work. Protected Overrides ReadOnly Property ShowWithoutActivation() As Boolean Get Return True End Get End...
10
daoxx
by: daoxx | last post by:
Hello I've searched, posted and solved this (Thanks for helping!), but now it came back to bite me in the *ss. I have a Yes/No field that is represented by a check box in my form1. I want to...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.