1. onMouseOver effect on Table cells.
You can do onMouseOver effects also on TD (or TR) level. Just add this inside TD tag:
onmouseover= "bgColor='#EEEEEE'" onmouseout= "bgColor='#FFFFFF'"
Note that you can use also different commands than bgColor, but don't forget that everything you write within quotes is basically a script therefore it's case sensitive.
2. How To Make Dreamweaver Crash? It's much easier than you would expect. Just link any StyleSheet to your HTML document (for this editing use Editplus or Notepad, no Dreamweaver), add comment to your StyleSheet and "forget" to put end of the comment. You should have something like this:
.MyClass {
/* This is your comment
color: black;}
(End of File)
Okay, now close that html (if it's open) and try to edit that file. Dreamweaver should crash.
Tested under WinXP with AMD processor.
3. How to put layers over Flash? By default it's not possible to place a layer (DIV) over any flash file. This may cause some troubles when using drop-down menus or layers in general on flash enabled website. Flash get's higher priority and is displayed always on top of all other elements on the page. You can prevent this by puting following code inside your flash statements:
<PARAM NAME="wmode" VALUE="transparent">
4. Google keywords: link There are special words, which Google recognizes as a commands to perform search with additional options. One of these special words is link:
When you write in Google's search box this example:
link: www.wyktor.com
As a result you'll see all websites which are referring to this domain (and are listed in Google's database).
5. Google keywords: site Another useful keyword in Google is site: If you want to search only through one domain, this is the way to go. Just type keyword with domain name and then your search phrase. Example:
site:www.wyktor.com Photoshop Tutorials
This will search for photoshop tutorials only on www.wyktor.com.
6. Google keywords: filetype Last Google keyword I'm going to show you is filetype. With this keyword you can search for specific file formats. For example:
filetype:jpg woman face
Results of this query would be all JPG images which name includes words woman and/or face.
Find more about Google's keywords and other ways how to improve your search querys on Google's help page
7. Displaying HTML Code
Whenever you need to show HTML code on your page, you'll find that using<CODE> tag isn't always the best way. There are two basic ways to write HTML code "on screen".
Using special characters
Using tags
When using first method, you can combine<CODE> (it will give you required font formatting) with special characters such as: <, or >.
Second method is much faster. You can use either<PRE>, or <XMP> tag. XMP is supported only by Internet Explorer, but is more powerful than PRE. PRE will still render those special characters mentioned above, while XMP will ignore their meaning, and will not translate them.
8. This page was last updated...
There are many cases when you want to tell to people, when was the last time you updated certain html file. There is simple but powerfull method for this in Javascript:
document.lastModified
If you use this method like this:
document.write(document.lastModified)
You'll get full date and even time when was the last time you saved that certain file. In cooperation withDate object you can get more user friendly output.
9. Grouping Form Items
When creating forms, there's often a need to group similar items. In Html 4.0 there's new way how you can group form items together. You can create group by enclosing desired form elements withFIELDSET tag. If want to put caption over this new group, putLEGEND right after startingFIELDSET tag. Example:
<FORM METHOD=POST>
<fieldset>
<legend>My Group</legend>
<INPUT TYPE="radio">
<INPUT TYPE="radio">
</fieldset>
</FORM>
10. Grabbing Screen Resolution
There are properties in Javascript which can give you the exact display resolution of user's screen. You can use this information for instance when opening popups so they open at the same position on the screen, no matter what.
if (navigator.appName.indexOf("Microsoft") >= 0)
{ x = screen.width;
y = screen.height;
} else {
x = screen.availWidth;
y = screen.availHeight; }
top_ = y/3
left_ =(x/3) - 50
window.open(popup.html,myName +',top=' + top_ + ',left=' + left_);
}
First routine is used for MSIE, second one for any other browser. Then we use gathered information intop_ andleft_ variables, where we say that this popup will be opened in one third of width and height of the screen.
|