Solved

input.focus in css is not working?

Posted on 2012-04-07
7
482 Views
Last Modified: 2012-08-08
Dear Team,

      I am using JSF integrated with rich faces, i.e <a4j:support event="onblur"> if we perform onblur it will fire my server side validation.

To highlight the field with the different color, i have implemented with input.focus. but it is not working in IE 6&7. so that i have implemented the same with JavaScript.in that java script code onblur is used.if i am using this java script highlighting is working fine, but my actual business validators are not working.

i tried with JQuery also, but here also validators are not firing.

So kindly help me how i can implement this with out disturbing my actual BL.
0
Comment
Question by:BhanuSVS
7 Comments
 
LVL 23

Expert Comment

by:basicinstinct
ID: 37820721
simple - don't support ie6. i refuse to in my professional and personal work.

where do the users of your website hail from? here is microsoft's breakdown of ie6 usage: http://www.ie6countdown.com/

as for ie7, it never got off the ground in the first place
0
 

Author Comment

by:BhanuSVS
ID: 37820731
Thanks basicinstinct,

thanks for your advice, but i can't say this to my customer, please try to give the proper solution.
0
 
LVL 16

Accepted Solution

by:
s8web earned 500 total points
ID: 37821343
You probably should say that to your customer, it's in their best interest.

There is no reason to develop for antiquated browsers. Where do you draw the line? In a field where technology turns over every 18 months, why support browsers that are 11 years old(IE6) and 6 years old (IE7). Browser upgrades are free, and recommended by their respective distributors. Heck, even MS doesn't support IE6 anymore, they kind of held a funeral for it.

It is important that the information contained in your website is accessible and navigable on all platforms. As far as the display bells and whistles,  I'd leave the old browsers where they belong, in the past.

If you still want to support hover in old IE's, check out csshover3.htc. Make sure you load it conditionally as its presence can mess up newer browsers (IE8 specifically).
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 9

Expert Comment

by:experts1
ID: 37821417
Could you submit an example of your JS code
which is not working?
0
 

Author Comment

by:BhanuSVS
ID: 37846318
Please find the java script code below,

<script type="text/javascript" src="/scripts/jquery-1.5.1.min.js"></script>
<script type="text/javascript">
$(function() {
   $(".textInputField")
      .focusin(function() {
         $(this).css("background-color", "green");
      })
      .focusout(function() {
         $(this).css("background-color", "white");
      });
});
</script>

...

<input name="field1" class="textInputField">
<input name="field2" class="textInputField">
0
 
LVL 9

Expert Comment

by:experts1
ID: 37846524
Should work if you modify input fields as follows:
<input name="field1" class="textInputField" onblur="this.style.backgroundColor='green';" onfocus="this.style.backgroundColor='white';">
<input name="field2" class="textInputField" onblur="this.style.backgroundColor='green';" onfocus="this.style.backgroundColor='white';">

Open in new window

0
 

Author Closing Comment

by:BhanuSVS
ID: 38270590
thanks
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now