Category: Html

All the html related posts.

A

Avoiding CSS Image Flicker issue in IE 6.0

There are two types of flickering when it comes to the background-image CSS attribute and its IE6 support. The first is when the whole image flickers. This one can be solved by the aforementioned workarounds. Here is another nice article: http://www.fivesevensix.com/studies/ie6flicker/ The other one is cursor flickering - when you hover an element with the ...

P

Page refresh leading to larger font size when using popups

Well this was one error i faced during on of my development projects. I have a button click firing a ShowModalDialog window. On close of that window, i want the parent to refresh. But the problem was that, when i close the dialog box or popup, the parent page finishes its loading and shows up ...

L

Learn jQuery: A simple ‘Hello World’ jQuery Code

jQuery - A powerful javascript library capable of doing all your complex javascript actions and functionality in a line or two. How cool is that. Pre-requisites : Notepad, jquery.js file(You can get it here),  some coding background and an open mind Let's Start with a simple Hello World: Open your notepad, create a html file ...

H

How to apply width to IE and not Firefox

Well the solution is simple. All you need is the knowledge of some keyword that IE recognises while setting the property value, while Mozilla ignores it. Few solutions: 1. Using Expressions: div#maincontainer{ width:300px; /* IE and mozilla will take the width as 300px */ width:expression('100%'); /* But now mozilla will ignore this statement, but IE ...

A

ASP .Net Menu using ordered list – ul, li concept

I give a different approach to menu creation, in my ASP .Net project. The main wins being the performance and ease of use. Asp menu is pretty messy when you look at the code behind and the page size it adds. But use this concept only if performance is a critical factor. Concept: •    Use ...

j

jQuery : To check if an element is present in the page or not

This is a precautionary measure that you can adopt, if you are doubtful about the presence of a particular control in the page. Under normal scenarios, in case if the element is not there, it would throw an error. But you can now check if that particular element is present in the page or not, ...

H

How to determine whether Javascript is enabled?

There are a lot of approaches to this. Lets take them one at a time: Using NOSCRIPT tag: You can write a noscript tag just before your script tag to display the user a warning message. Check the code below, wherein the user will be redirected to another page if javascript is disabled: <html> <head> ...

J

Javascript to maximise window on load

Well this is simple script to get your browser maximised onload: <html> <head> <script language="JavaScript"> window.onload = maxWindow; function maxWindow() { window.moveTo(0,0); if (document.all) { top.window.resizeTo(screen.availWidth,screen.availHeight); } else if (document.layers||document.getElementById) { if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth) { top.window.outerHeight = screen.availHeight; top.window.outerWidth = screen.availWidth; } } } </script> </head> <body>Testing</body> </html> I just tested it it IE. Hope this ...

H

How to suppress nagging javascript errors?

To suppress javascript error popups and warnings in your browser, just use the code snippet below: <SCRIPT language="JavaScript"> <!-- function silentErrorHandler() {return true;} window.onerror=silentErrorHandler; //--> </SCRIPT> This however has some limitation, from what i had experienced. It works well in IE, to a major extend in Firefox, but not much in Opera and Safari. Hence ...

I

Internet Explorer Bugs

Internet explorer is considered as the most widely used browser over the internet. However, this buddy comes up with some weird bugs in every version of it. I will be giving you a high level view of the bugs that IE has got. To get the indepth view of these bugs, i would recommend you ...