JavaScript Editor Ajax software     Free javascripts 



Main Page

DHTML Popup Windows
As a last alternative, popups can be simulated using DHTML. To accomplish this you can place an invisible
<div>
element at a particular location, then use JavaScript events to hide and unhide it. A robust example
is beyond the scope of this book, but the following code is a proof of concept:
<span onmouseover=”document.getElementById(‘dhtml_popup_test’).style.visibility=
i
‘visible’;” onmouseout=”document.getElementById(‘dhtml_popup_test’).style.
i
visibility=’hidden’;”>put your mouse here</span>
<div style=”position:absolute; visibility:hidden; border:1px solid black”
i
id=”dhtml_popup_test”>This is only visible if your mouse is over the above
i
text</div>
One caveat with this method is that although the text is spiderable, it will likely be regarded as an invisible
on-page factor because it is not visible by default.
Crawlable Images and Graphical Text
This is a topic that frequently puts designers and search engine marketers at war! Designers tend to
balk at the thought of not having graphical text at their disposal. But spiders cannot read any text that
is embedded in an image, regardless of how clear and obvious it may be to a human reader. Therefore
regular text styled by CSS should be employed whenever possible.
Unfortunately, CSS does not always provide all the flexibility that a designer needs for typesetting. Further
-
more, users do not have a uniform set of fonts installed on all computers. This restricts the fonts that can be
used reliably in CSS typesetting substantially. Table 6-1 lists the common fonts that are available on typical
Windows and Mac installations.
Table 6-1
Table continued on following page
Font Type
Font Name
Cursive
Comic Sans MS
Monospace Courier New
Serif
Times New Roman
Georgia
Sans-serif
Andale Mono
Arial
Arial Black
Impact
129
Chapter 6: SE-Friendly HTML and JavaScript
c06.qxd:c06 10:55 129


JavaScript Editor Ajax software     Free javascripts