Mar 252015
 

Where I work we display a large amount of data on our web pages and it can get hard to keep track of what data is on what row, so I found a simple way to make it possible to highlight the row the mouse is over. It seems like a small thing but when your rows get to be too big it does get hard to figure out what data goes with what. To see this in action you can navigate to jsfiddle.net/Lct0w66o or you can navigate to My Test Site at hometownnerd.com/CodeTest/RowHighlighter.htm or if it fails since my domain is being a little goofy hometownnerd.mine.nu/CodeTest/RowHighlighter.htm. Basically you will have the following code to make it work:

<html>
<head>
<style type="text/css">
.highlighted td{
 background-color: lightsteelblue;
 }
table {
 border-collapse: collapse;
}
td {
 border-color:gray;
 border-style:solid;
 border-width:1px;
}
th {
 border-color:gray;
 border-style:solid;
 border-width:1px;
 background-color:lightgray;
}
</style>
<script src="js/jquery-1.11.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
 $("table").hover(function () {
 $(".highlighted").removeClass("highlighted");
 });
 $("td").not(".hirow").hover(function () {
 $(".highlighted").removeClass("highlighted");
 });
 $(".hirow").hover(function () {
 $(".highlighted").removeClass("highlighted");
 $(this).addClass("highlighted");
 });
});
</script></head>
<body>
<table>
 <thead>
 <th>Fruit</th><th>Ripe</th><th>Not Ripe</th><th>Rotten</th>
 </thead>
 <tr class="hirow">
 <td>Apples</td><td>500</td><td>250</td><td>100</td>
 </tr>
 <tr class="hirow">
 <td>Oranges</td><td>200</td><td>30</td><td>0</td>
 </tr>
 <tr class="hirow">
 <td>Pears</td><td>1500</td><td>450</td><td>300</td>
 </tr>
 <tr class="hirow">
 <td>Peaches</td><td>700</td><td>150</td><td>400</td>
 </tr>
</table>
</body>
</html>

 

You need to have jQuery loaded, which does most of the work, and any row that you want the highlight to be on should have a class of “hirow”.

 

The

.highlighted td{
 background-color: lightsteelblue;
 }

part is what sets how you want the highlighting to look by using css, I am just setting the background color to be lightsteelblue.

The

 $(document).ready(function () { 

part tells the jquery code to wait to be able to run until the page has completely loaded into the browser.

The

$("table").hover(function () {
 $(".highlighted").removeClass("highlighted");
 });
part turns off the highlighting on the row if we are moving away from the table we are in by removing the class "highlighted".

The

 $("td").not(".hirow").hover(function () {
$(".highlighted").removeClass("highlighted");
});

part turns off the highlighting placed on the old row that was hover over by removing the class “highlighted”.

The

$(“.hirow”).hover(function () {
$(“.highlighted”).removeClass(“highlighted”);
$(this).addClass(“highlighted”);
});
part is the workhorse that actually highlights the row, by first removing any “highlight” classes and then applying the “highlight” class to the current row hovered over.

Hopefully this will help some people when they have this need, let me know if you have any questions.

Mar 092015
 

I have been around IT for quite a while now, I owned my first Internet connected PC in 1994 or so, although I did own a Commodore 128 that connected to BBSes before that. I remember connecting to those at 300 baud and trying to locate a 1200 baud modem. I even had a 3.5″ disc drive for the commodore, which was VERY rare at the time. Ever since the first time I heard that connection to the outside world, that horrid sound of the analog to digital connection, I knew it was something I should be getting in to. I remember hearing about Microsoft certifications and A+ certifications and Oracle and Cisco certifications and being jealous of those people that could afford to go take the test and get certified, even those that could afford to get the specific training that all but guaranteed they would be certified, even though they had no real clue what they were doing, sure they had learned some things but most of it had just been wasted on them. Now, I do realize that at the time that paid off for many many people, but many of those certification programs were year long or so hard to get that it just was not for everyone, even those that were in the field. It seemed to give you a good amount of income and also made it very hard for new IT people to break in to the field.

That all changed a few years later, all of the sudden the IT field figured out these certs were not worth the paper they were printed on, and all of the people that legitimately earned them and had a leg up had nothing anymore. It seemed like IT had become a place for those that “knew” stuff, which is finally when I got my chance at working in the field. I made it into the field through a backdoor that meant I had to show people how important it was to be a part of it. I started to program for a decent size scale company Mettler Toledo. My boss showed an interest in someone starting to pick up an ancient language they had, and all that was in the shop at the time were older people that had no interest in learning something new, so I started to learn how to program it, which was a breeze to learn. I started to repair and modify code for a few of the older systems that were floating around and also to write a few new ones as well, this meant my shop could do something in house other shops had to get filled by other way busier shops, which could take a month or so. This gave me the ability to start asking for some new stuff to play with, I knew Basic from high school and could write that pretty good and had heard about a newish language which gave me the ability to write for Windows.

I wrote a few apps for my shop which they sold to some clients, allowing them to print tickets and interface their computers to the scales, locally. I was getting really good at it. I even started to write for a new scale product which had Basic built in, and realized I had finally found what I wanted to do. I was making $15 per hour at the time, which was ok money for a scale tech, but nothing like the $40+ per hour for an IT person. A few of the guys from my shop applied to Verizon and got in and they were going to be making $50 an hour, so I did the same. When my boss found out he tried to keep me with the company by finding a place for me in systems and it was a pretty good deal, $45k but I had to move my new wife and son to New Hampshire….crap, my wife wanted to stay close to her family, which we did, so I went to Verizon as a Tech for DSL. It didn’t take me long to start to make an impact on things there as well, creating fancy Excel spreadsheets for people and making some very influential friends.

I moved up within 6 months to Management because of one of those friends. I started to immediately make an impact on the team by creating a intranet server for them on a PC under my desk and started to learn ASP and MySQL. I created this all on my own and made it very helpful to people in my group and started to get other groups to use it as well. I never like to toot my own horn, which has always been one of my weaknesses, but it works out better to have other people toot your horn for you, which I always have had happen. This was no exception, the people using the system told their bosses and my team told our boss and I became a very important person in the building as well as some other locations, all over the US. This server even helped me to get a beefier server given to me, which gave me the ability to start learning PHP as well as Javascript and HTML. I was riding the IT wave pretty well and was able to keep my job for a long time through a lot of 30% staff cuts every 3 months, maybe I was getting to secure where I was. I had even attended college on Verizon’s dime and received my AA. I was also able to help people with their PCs, doing admin tasks on them since IT would take days and days to help them. This admin ability was my downfall at Verizon, which on that day was the WORST day of my life, but not everything is bad when you get told to pack up your stuff. I had made some more influential friends and within a week had an interview with a web development company that my boss’ boss’ husband worked at.

Enter my current company that I work for, Aurora Healthcare, they write ASP.Net code that interfaces with a MSSQL database that houses some 8-9 TB of data. This was my first job as a fulltime developer and it has been a god send, I love developing. I have been developing their product with them now for 6 years and have learned quite a bit since my Verizon days, I am now officially in the IT field and still spend a lot of time learning what the IT world looks for. I now know at least 6 development languages, and have learned how to use google to get better and figure out those things my company needs to have, like a self learning database manipulator that can copy databases and tables and make a lot of difficult tasks possible for people on my team. I have to say I am glad I did not jump on the certification bandwagon, I may never have been able to stay in IT or I may have hated it, who knows, but what I do know is learning many different things in IT is WAY better than getting pigeon holed into a specialty, which could be here today and gone tomorrow with no warning. It is so much better to keep yourself relevant than it is to become a specialist, maybe that is just to get your foot in the door, maybe once you are in being a specialist can command a lot more money than I get, but just make sure you have a backup plan, just in case something happens and that specialty dissolves like so many of them do.

Later

Get Adobe Flash player