HTML is a semantic markup language, used to describe its contents. It is never to describe how its content *looks* nor *behaves*.
CSS is for describing how your content LOOKS.
Javascript is for describing how your content BEHAVES.
Tables are just part of HTML — and they have a place in marking up content: they are for tabular data.
If you content is something you’d use in Excel, it is a good choice for a table.
If you are using a table to position content on the page or “make things line up” then you are misusing HTML for layout purposes.
Showing posts with label JavaScript. Show all posts
Showing posts with label JavaScript. Show all posts
Saturday, June 12, 2010
Monday, December 1, 2008
Exception Details in JavaScript
function displayException(e,method)
{
if(method != null)
{
alert('Error occured in ' + method);
}
if(e instanceof EvalError)
{
alert('Eval function is used in an incorrect manner. Error name: ' + e.name + '. Error message: ' + e.message);
}
else if(e instanceof RangeError)
{
alert('A numeric variable exceeds its allowed range. Error name: ' + e.name + '. Error message: ' + e.message);
}
else if(e instanceof ReferenceError)
{
alert('An invalid reference is used. Error name: ' + e.name + '. Error message: ' + e.message);
}
else if(e instanceof SyntaxError)
{
alert('Syntax error occured while parsing JavaScript code. Error name: ' + e.name + '. Error message: ' + e.message);
}
else if(e instanceof TypeError)
{
alert('The type of a variable is not as expected. Error name: ' + e.name + '. Error message: ' + e.message);
}
else if(e instanceof URIError)
{
alert('encodeURI() or decodeURI() functions are used in an incorrect manner. Error name: ' + e.name + '. Error message: ' + e.message);
}
else
{
alert('An unspecified error occurred!. Error name: ' + e.name + '. Error message: ' + e.message);
}
}
Subscribe to:
Posts (Atom)