473,804 Members | 3,649 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Javascript onBlur results in "hidden" cursor in text field

4 New Member
Hello,

I'm running into an interesting issue and I wanted to verify it was a bug with Internet Explorer 7.

I have a field that has an javascript onBlur event. When you set focus to the text field, it launches a custom event handler to process the existing value in that text field. Well after the onBlur function has completed, the cursor looks like it's not there, almost as if it didn't set focus to the text field you were currently on. But in fact, if you use the directional arrows on your keyboard, you'll see the focus has indeed been set to the text box, the cursor was just hidden! Has anyone else encountered this? I've been debugging this issue for a couple of days now before I rule out it's a bug in IE 7.

Thanks in advance.
Jan 14 '08 #1
12 11464
r035198x
13,262 MVP
Hello,

I'm running into an interesting issue and I wanted to verify it was a bug with Internet Explorer 7.

I have a field that has an javascript onBlur event. When you set focus to the text field, it launches a custom event handler to process the existing value in that text field. Well after the onBlur function has completed, the cursor looks like it's not there, almost as if it didn't set focus to the text field you were currently on. But in fact, if you use the directional arrows on your keyboard, you'll see the focus has indeed been set to the text box, the cursor was just hidden! Has anyone else encountered this? I've been debugging this issue for a couple of days now before I rule out it's a bug in IE 7.



Thanks in advance.
I've seen this happen a few times.Are you sure this only happens in IE because I'm sure I've seen this in Firefox as well.
It isn't a big problem is it?
Jan 14 '08 #2
Sculder
4 New Member
In this particular case it's a big deal. If a user is completing a large form that has look-up pop-ups, each time the look-up window closes I'm setting focus back to the last field they were on via an onBlur. If the cursor isn't visible, the user doesn't know where they left off/which field the focus is set. This also occurs when they are tabbing through fields. When it gets to particular fields utilizing the onBlur event, it doesn't show the cursor. I can then tab to the next field and the cursor shows up fine. Very strange.
Jan 14 '08 #3
r035198x
13,262 MVP
In this particular case it's a big deal. If a user is completing a large form that has look-up pop-ups, each time the look-up window closes I'm setting focus back to the last field they were on via an onBlur. If the cursor isn't visible, the user doesn't know where they left off/which field the focus is set. This also occurs when they are tabbing through fields. When it gets to particular fields utilizing the onBlur event, it doesn't show the cursor. I can then tab to the next field and the cursor shows up fine. Very strange.
I suppose it is a big deal then. Have you tried the old hack of setting the focus to some other component first then setting it to the required control.
P.S Have you confirmed that this behavior is for IE only?
Jan 14 '08 #4
Sculder
4 New Member
I haven't been able to test in Firefox. Our product is IE only. I have taken a look at it using the Firefox IE add-on (which uses the same IE engine). So that's not saying a whole lot. I'll create a test page with the basic javascript and we'll see if I can reproduce it in Firefox.

Thanks.
Jan 14 '08 #5
gits
5,390 Recognized Expert Moderator Expert
hi ...

i encountered the same problem in FF already ... to have the focused field marked as focused i decided to set its background-color too ... just to workaround the problem ... may be a setTimeout would help too when setting the focus ...

kind regards
Jan 14 '08 #6
Sculder
4 New Member
Yeah I can reproduce in FireFox. Also, setting the timeout (setTimeout()) doesn't seem to work either. I put several setTimeout(s) in there to see if waiting on the cursor to reappear would do it; no dice.
Jan 14 '08 #7
gits
5,390 Recognized Expert Moderator Expert
hi ...

could you please post the code that makes the problem in FF ... i think i would like to play with it ... may be we find a solution :)

kind regards
Jan 14 '08 #8
cranger01
11 New Member
Did you ever find a solution for this?

I just posted an issue where I said the screen was frozen..couldn' t cursor anything...howe ver, after reading this post, I can tab, and the the screen functions fine...but not really user friendly. I would like to get this resolved and feel your issue is similar to mine.

Anyone please post if you have the answer. thank you.
Feb 6 '08 #9
gits
5,390 Recognized Expert Moderator Expert
post some code to work with! so that we may reproduce the behaviour ... and search for a fix ...

kind regards
Feb 6 '08 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

8
4269
by: Tom Petersen | last post by:
Here is the code: <SELECT NAME="email" style="font-family: Verdana; font-size: 10pt; " size="1"> <% DO WHILE NOT objRS.EOF strEmail = objRS("email") strLName = objRS("last_name") strFName = objRS("first_name") %> <option value="<% =strEmail %>"><%= strLName & ", " & strFName %>
9
11303
by: Andrew Durstewitz | last post by:
Hi! I am having a really strange issue. I have a few users calling in saying they are getting an error. On further review I found this line is what is causing it... Set strLookup = cnAddStep.Execute ("SELECT * FROM ActionSteps WHERE planId = '" & intPlanId & "' ORDER BY stepId DESC") The exact peice causing it is intPlanId. For some reason the form
1
2591
by: Stone | last post by:
OK .. admittedly this is newbie dumb... Its a JAVA script in a FORM I have passed (successfully) the referring URL into my form page on loading.... <script language="JavaScript"><!-- // THIS IS THE URL FROM THE REFERRERING PAGE! var originalURL = unescape(location.search.substring(1)); //alert(originalURL ); // this works!
4
665
by: Mike | last post by:
Hi, I need to read an hidden field on the server side (code behind). I can modify the value in Javascript (client side), then call "form.submit();" on the client side. However, on the server side the value is empty. Any idea on the best way to set a hidden field on the client side and read its value on the server side? Thanks. Mike
2
4251
by: Rodusa | last post by:
I have a hidden field inside one datagrid which I can't get to make it keep its state after a postback event. Look field: <input type="hidden" id="TxtHiddenItem_id" name="TxtHiddenItem_id" runat="server" value='<%# DataBinder.Eval(Container, "DataItem.item_id").ToString() %>'> I can get around that using an asp.net textbox control, but it doesn't
11
7427
by: newbie | last post by:
i have a form in which a hidden field (initial value as '0', and my javascript set it to '1' when an event is trigged). In the same form, i have a reset field. But I realized that the hidden field is not reset to '0' when i push the reset button. If I simply change the node from "<input type="hidden" id='IsChanged' value='0'>" to "<input type="text" id='IsChanged' value='0'>" Everything is working as expected (the value is reset to '0'...
2
1961
by: Alexio | last post by:
Sample code snippet - <td align="right">Check Amount:&nbsp;</td> (1) <td><input type="text" name="CHK_input_1" size="19"style="text-align:right" onkeyup="calcCB();" onBlur="currency(this); calcCB();" tabindex="26"> (2) <input type="hidden" name="OBKey__53_1" id="kw_check_amount" > For various database reasons, I need to be able to populate a hidden field to be used as a keyword in our system based on the first...
2
3429
Claus Mygind
by: Claus Mygind | last post by:
How do you get a trigger/event to fire on a hidden field. In this case I have a hidden field that is updated via a script. It seems when a field is updated in this manner none of the event triggers like "onChange" "onSelect" "onBlur" will fire. Is there some script based way this can occur? Currently I add code to every method I use to update a field from script. But I have a number on methods that does this, and I do not wish to go...
11
3106
by: viki1967 | last post by:
Hidden field Hello my friends. This is a htm page that contains a form open in window popUp ( page daughter ). This form insert a value in the one hidden field called "tec", in other form open in the page mother. As you can see the select contains multiple attribute.
14
8475
Frinavale
by: Frinavale | last post by:
I've been trying to test my web application using Internet Explorer 8 (release candidate 1) and have been experiencing some major problems. I'm hoping you can help me with this one. I have a JavaScript Object that tracks the horizontal scroll position of a <div> element on the page. It sets a hidden field so that when the page is submitted to the server, the server code is able to retrieve the current scroll position. When the page is sent...
0
9704
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9569
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10558
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10318
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10069
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9130
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5503
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4277
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2975
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.