Category Archives: Client Side Programming

Classes in Javascript

Source : >http://www.phpied.com/3-ways-to-define-a-javascript-class/ 3 ways to define a JavaScript class Introduction JavaScript is a very flexible object-oriented language when it comes to syntax. In this article you can find three ways of defining and instantiating an object. Even if you … Continue reading

Posted in Client Side Programming, JavaScript | Tagged , , | Leave a comment

Making the input file box readonly in IE

Is it possible to prevent a user from typing in a file input text box in IE? The reason I ask is that if a user enters text that does not look like a file system path (eg. doesn’t start … Continue reading

Posted in IE | Leave a comment

How to make hover effects work in Internet Explorer

Thanks to http://www.bernzilla.com/item.php?id=762 for the post. 🙂 I spent about an hour this morning trying to figure out how in the world to get IE7 to apply my :hover styling to a non-anchor () element. Amazingly enough, numerous searches on … Continue reading

Posted in IE problems | 2 Comments

How to highlight table rows on mouseOver

Please note that if you are using IE, don’t forget to add the DOCTYPE to your HTML document For more details, you can refer to this link or this link Put this inside your section tr:hover { background-color:#317082; color:#FFF; } … Continue reading

Posted in HTML | 6 Comments

More about regular expressions in Javascript

Aah !! Regular expressions I have got confused most of the times, I need to escape special characters when specifying a regular expression. Let us take an example of simple date formatdd/mm/yyyy There are two ways, you can specify your … Continue reading

Posted in Client Side Programming, JavaScript | Tagged , , | 3 Comments

How to expand collapse (toggle) div layer using jQuery

Thanks to http://designgala.com/how-to-expand-collapse-toggle-div-layer-using-jquery In almost all of my projects, I have been using jQuery to toggle the layer. So, I thought of sharing how easy it is to expand div layer and collapse panel using jQuery. When user clicks on … Continue reading

Posted in Client Side Programming, JavaScript, jQuery | Tagged , , | 5 Comments

How to get old Value with onchange() event in text box

You’ll need to store the old value manually. You could store it a lot of different ways. You could use a javascript object to store values for each textbox, or you could use a hidden field (I wouldn’t recommend it … Continue reading

Posted in Client Side Programming, HTML, JavaScript, jQuery | Tagged , , | 2 Comments

How to replace in Javascript, when replacement string is a variable

How to replace in Javascript, when replacement string is a variable Very often we use replace method in javascript while replacing a string literal by another string literal.But what if we need to replace a string whose value is held … Continue reading

Posted in Client Side Programming, JavaScript, jQuery | Tagged , , , , | Leave a comment

Dynamically generate HTML elements using javascript and save them on server

Dynamically generate HTML elements using javascript and save them on server Today while working in office, I had a requirement where I was required to generate dynamic elements in HTML form and then later on submit the form to a … Continue reading

Posted in HTML | Leave a comment

How to align the value in a text box using javascript?

How to align the value in a text box using javascript? I found various methods to do it on google, but only one of them worked for me. Hence I decided to write a post on this. function mytest3() { … Continue reading

Posted in HTML | Leave a comment