..
And 'Just make sure if the call ID of the element returns "null" or not.
Here's an example: suppose we have to see if the page exists or not, an element with ID 'FOO':
if (document.getElementById ('FOO')! = null)
{
alter ('OK');
Else {}
alert ('ID does not exist');
}
| |
CSS (Course)
Web Design and Accessibility according to W3C CSS and XHTML. Starting from 29 €. |
| |
HTML (Course)
The markup language for the Web from 29 €. |
| |
Javascript (Course)
Complete guide to client-side scripting. From 39 €. |