Site hosted by Angelfire.com: Build your free website today!

JavaScript Tips & Tricks, HTML Tips, Webmasters' Resources & More... Check'em Out! @ Webmasters.up.to - JavaTricksonline.com -


Is there a difference between Java & JavaScript ?

Many people believe that JavaScript is Java because of the similar names. Actually, this is not true & they are two different languages.
JavaScript is an Object Oriented Programming (OOP) language created by James Gosling of Sun Micro-systems and of Netscape. Java is also an OOP language. Many of their programming structures are similar. However, JavaScript contains simpler commands than Java.

What To Do If You Have A Blank PAGE Editor!! & You Don't Know Even How To Generate A Link!! How To Develop A Great Page Using JavaScript Language!! Let Me Help You.. :)

*First Of all, You should add the HTML, HEAD, BODY Tags & The Page Title as follows

*Tip1: Code Inside Head tags is loaded before the rest of the HTML document.
*Tip2: Body section contains simple HTML commands, like buttons, links, forms.It's your playground where you insert your content the way you want it to appear in your page.
*Tip3: Title of the page always inserted inside the Head tags.
*So, what is the TITLE tag?
*Any text between the TITLE tags will appear on the top of your browser.
*Suppose you inserted this text "Mos-tafa.com's JavaScript Tips & Tricks! - "Cut & Paste" JavaScript Tricks For Your Page!" inside TITLE tags.
Click here to see how it will look!

What else is inserted inside the Head Tags beside Title?
Simply, The Meta Tags. Continue To Second Step...

*Second Step: You must add Meta Tags After The TITLE for your site to get listed high in Search Engines.
*Here are The Meta Tags:

Source Code :

Let Me Explain The Meta Tags To make things more clear.

There are other Meta tags you can add to those above, but they are optional to use.

Are Meta Tags Important to be added in my HTML File[WebPage] ?
The answer is YES! Why!? Let me tell you.

The Importance of Meta-Tags
Now, I Finished building my site! It's a Great Site! What's Next! Increase Traffic!! Many people wish their site score and get listed high on the search engines. For this aim to come true, people have to add Meta Tags to HTML Documents, otherwise, their dream won't ever come true! Add Meta Tags Right Now! At the bottom of the page, there is a section where you can create Meta Tags Automatically. Just Fill information and Click on Create. Remember, Meta Tags are inserted between Head Tags.

What else is inserted inside the Head Tags beside Title?
*Cascading Style Sheets(CSS) may be one of the components of Head Section. Continue to third step..

*Third Step:, You begin to write your scripts using JavaScript Language. Notice that any script you write should be inside the Script Tags as follows :

Tip: The Script tag denotes the beginning of JavaScript Code.

The Language Attribute! Is it Important?

Notice also that we defined the language Used which is JavaScript To Inform People That The Code Between Script Tags Is Written In JavaScript. It Also Tells the Browser So. Actually, Till Now It's Optional To Define The Language Used & You Can Use <script> Instead Of <script language="JavaScript"> Why? Due to the dominance of JavaScript over other languages from the start & any Browser Will Realize That.

*After setting up your script, the last step appears, which is inserting the script in the HTML Tags in the Head Section. Sometimes it goes in the Body Section!

*Here is how it will look:

What Is The Relation Between HTML & JavaScript ?

It Is Inside These HTML Documents [WebPages] That JavaScript Code Must Be Inserted Into...

In Other Words, It's Inside The HTML Tags That JavaScript Code Is Inserted Into...Or It's Inside The HTML-Page Where JavaScript Code Is Embedded..

Document object:

*How To write anything Using JavaScript Language (The write Method) :

Source Code :

Description of the above Code: The write method of the document object displays its argument, the text string (Any text).

Here Are All other Document objects:

bgColor [Changes BackGround Color]

write [Writes something]

lastModified [Gives date of document's last change]

writeln [Writes in new line]

referrer [Gives URL of the page that linked here]

fgColor [Changes Text Color]

linkColor [sets the link color in hex code]

alinkColor [sets the active link color in hex code]

vlinkColor [sets the visited link color in hex code]

location [sets the URL of the page]

referrer [sets the URL of the page the user came from . If no page is available, a blank space will be shown]

title [Create a Tile For the page]

Important Fact: Event Handlers are inserted in the HTML TAGS within buttons, check boxes & links NOT in the Script tags.

Let me give an example to make it more clear:

As You see in the above script the Event Handlers "OnMouseOver & OnMouseOut" are inside the HTML Tags & Not Inside The Script Tags...
-Notice How we inserted the JavaScript inside the HTML Tags.
-Notice also how HTML: [Link(A href) in the previous Example] is used to make JavaScript: [Making Text appears in the Status Bar Using Onmouseover & onmouseout Handlers, window.status command, and by calling a function] Works. Therefore, HTML Is used to make JavaScript Works. This is how HTML & JavaScript are related to each other.
-What Calling Function means? What (A href) means? Don't Worry..U'll Know! All I Want U 2 Know 4 Now is How JavaScript & HTML are related!

Here Are The Most Popular Event Handlers:

onclick: [Used To call Execution of JavaScript upon clicking]

onload: [Used To call Execution of JavaScript after the page or an image has completely finished loading]

onmouseover: [Used To call Execution of JavaScript if the mouse moved over a link]

onmouseout: [Used To call Execution JavaScript if the mouse away from a link]

onunload: [Used To call Execution of JavaScript after leaving a page]

Others:

The onFocus Command

This Event Handler is most used in Forms Especially within Textarea, Text Input.
Let Me Give You an Example:
Click Here 4 Example

Source Code:

The onChange Command

Like the OnFocus Event, This Event Handler is most used in Forms Especially within Textarea, Text Input.
To Get the Idea of This Script, I Will give you an example.
Click Here 4 Example

Source Code:

The onSubmit Command

Like the OnFocus Event, This Event Handler is most used in Forms Especially within Textarea, Text Input.
You can Even get the idea of the script from its name.
When you use forms, for example, Guest-Book, after people finish writing their name, E-mail & comments, they click on submit. You can direct them to another page, for example, Thanks Page - The page where you thank your visitors for signing the guest Book.

Source Code :

Other Tips:

The Comment Tags : Used to hide your code against older browsers of both Netscape and IE. Actually, It's Optional Whether To Use It Or Not & You Will Never Have An Error If You Didn't Use It, But It Is Recommended To Use It..

You Can Use The Following Trick To Add Comments Inside the script tags which are ignored by the browser, it may be used to describe the JavaScript, or copyright.

Let Me Give An Example :

If You Want To Skip HTML TipsClick Here

HTML TIPS

What is an HTML file?

-HTML stands for "HyperText Markup Language" and is the language we use to make Web pages.
-HTML allows you to set titles, insert images on your site, and make hyperlinks, tables, Select Menus & More. It is the language that makes the Web possible.
-An HTML file must have an htm or html file extension.

*How To Set A Text Color, Background Color, Link Color, Active Link Color, Visited Link Color, and A Background For the entire page!

*Other attributes in the Body Section:

-background="URL of Image to be a Background"
-bgproperties="fixed" Fixes the background image so that it doesn't scroll.

*How to set a Base Font for the entire pages so that you don't have to use font tags every time.

Source Code:

Attributes:

Size="number": Sets the size of the font.
Color="Hex-code" : Sets the font color for the page.
Name="" : Sets the typeface of the font.

How to EMBED a multimedia object, or video or sound file in a page?

First, what's EMBED Function?
It tells the browser to embed multimedia object.

Attributes:

autostart="True/False" : Possible values are "True" or "False". True will let the multimedia object to play by itself upon page load. False : the multimedia object should be activated by the visitor.
height="" : The height of the display in pixels or percentage.
loop="True/False" : Possible values are "TRUE" or "FALSE". True will let the multimedia object repeats continously forever until you stop it . False will let it play one time and stop.
name="" : The name of the object.
src"/mymultimedia/clip.avi" : The URL of the object file.
width=" " : The width of the display in pixels or percentage.

Example:

*Note: For Hex Color Codes Visit Link at the bottom of this page.

*How To Make A Text Colored Or Change Its Size Or Even Make It Bold and Italic :

Source Code :

What attributes Can Be Inserted In The Font Tag ?

*How To Write Any Text With The Typewriter Font ?

Source Code :

*Other HTML Commands To Use:

Source Code :

*What are The Multicol Tags ?

*It Displays text in columns.

Attributes:

cols="" : Sets the number of columns to use.
gutter="pixels" : Sets the space between each column.
width="" : Sets the width of the columns.

*What Is The <P> Tag ?

It Is used For Setting text in a New Paragraphs..It Acts Like A Space

What attributes Can Be Inserted Inside The P Tag ? Only One attribute!

*What Is The <BR> Tag ?

It Is Used For The Multiple Spacing,How? Simply, Repeat The Tag.. Unlike The P Tag Which Can't Do That

*What's The Preformatted Text?

Preformatted Text Is Used To Preserve Both       Spaces & Line Breaks.

Source Code :

*Blockquote Tags Is Used To Display A long quotation:

Blockquote Is Used To Display A long quotation.Blockquote Is Used To Display A long quotation.Blockquote Is Used To Display A long quotation.Blockquote Is Used To Display A long quotation.Blockquote Is Used To Display A long quotation.Blockquote Is Used To Display A long quotation.

Source Code :

*Q Tags Is Used To Display Short Quotation:

*Example:

Q Tags Is Used To Display Short Quotation

Source Code :

*You Can Use This Command To Insert An Image In Your Page :

Source Code :

What attributes Can Be Inserted In The Image Tag ?

Here Is A Source Code For An Image Tag With All Possible attributes Inserted Into..

Source Code :

The Image Can Be In The Gif*.* Format And Jpg*.* as Well.. You can Control Even its Size.

What Is alt="image" ?

alt="myimage" = The Word "myimage" Will Appear The Browser Didn't Load The Image or when you move your mouse over the image.

So Generally, What's "Alt" ?

It Stands For An "Alternate Text" For An Image

*You Can Use This Command To Center Anything, Image Or A Text :

Source Code :

*How To Make Underlined Text, Striked, Blink, Subscript, Supscript...

Source Code :

*Headings :

*Example:Click Here To See Headings.

Source Code :

*Text Will Be Written From The Right To The Left, If Your Browser Supports Bi-Directional Override.

Your Text Here!

Source Code :

*The Link (A Tag):

Attributes:

*Examples:
*How To Generate A Link In Your Site :

Source Code :

You can shorten the URL if the place where you desire is on the same server..

*Let Me Make It More Clear, If Your Site Is Hosted By AngelFire & You Would Like To Make A Link For This Page "https://www.angelfire.com/hi3/whatever.html" ..Instead Of Writing The Whole URL In The HREF Section You Can Write It As Follows :

*How To Generate Anchor Link In Your Site :
*If you have a long page with lots of info, you may want to provide relative links to sections of your page.

Example:Click Here To Go To The Cut'N'Paste JavaScript Section

Source Code :

*Create An Email Link :

Source Code :

*Create a Picture Link To An E-mail Address:

Source Code :

*How To Make An Image As A Link :

Source Code :

"border=0" Is Optional You Can Write It Or Not, But If U Didn't Write It, You Will Have A Thin Frame Around Your Image..

Input Tags

What Is Common In The Input Types ?

*How To Create A Reset Button :

First Of All, What Is The Rest Button?

I Will Give You An Example To Recognize It

Test: Check The Box, Then Press Reset :

Source Code :

*How To Create A Submit Button :

What Is A Submit Button?

Actually, It Is Used To Submit Any Type Of Information.. It's Normally Used In The Forms

Source Code :

*How To Create a Button :

Source Code :

*How To Create a Check Box :

Source Code :

*How To Create a Radio Button :

Source Code :

*Password Field :

*Notice That When You Type Characters In The Password Field, It Will Displays Asterisks Instead Of The Characters.

*Test: Type Anything In This TextArea.

Source Code :

*The Last Type Of Input Tags Is The "Text"

Source Code :

Here Is A Live Example of The Above Code :

*Tips On InPut TyPeS!

*checked: Use this attribute in a RADIO or CHECKBOX type, and it will be pre-selected when the page loads.
*maxlength="number": Sets the maximum number of characters that can be entered in a text input.

*To make a "marquee", or scrolling text, put the text to be scrolled between the Marquee tags.

Source Code :

Attributes:

behavior="slide/scroll/alternate" : "Scroll" is the default , "slide" makes the text slide from off the screen and then stop, "alternate" makes the text alternate back and forth.
bgcolor="..." : Specifies the background color of the marquee.
align="..." : Possible values of "top", "middle", or "bottom". Specifies the alignment of the text.
direction="Left/Right" : Sets the direction for the text to scroll. Possible values are "left" (default) or "right".
height="in pixel or percentage" : The height of the marquee in number of pixels or % of screen.
width="in pixel or percentage" : Sets the width of the marquee.

*How To create a horizontal line :

Source Code :

*You Can Even Control The Size Of The Line, Let Us Have A Look! :

Source Code :

*How To Control Its Size Using Percentage :

Source Code :

*How To Change Even Its Color And Its Place :

*Note : (color IE only) , Change align To "Center" If You Would Like The Line To Be In The Center & "Left" For The Left ...

Source Code :

Other attributes:
*noshade : The line is drawn solid with no shade.

Different Types Of Lists

*How To Create Numbered List (Ordered List) :

Source Code :

*To Create Unnumbered list (Unordered List) :

Source Code :

*Types Of Unordered List

1.Disc Bullets List

2.Circle Bullets List

3.Square Bullets list

*Types Of Ordered List

1.Letters List

2.LowerCase Letters List

3.Roman Numbers List

4.Lowercase Roman Numbers List

*How To Create a Definition List

Source Code :

*Create a Directory list of items :

*Note : Items should be less than 20 characters long.

Source Code :

*How To Generate Select Menus :

Here Is The Source Code Of The Above SELECT Menu :

What attributes Can Be Inserted In The SELECT Tag ?

Example For The The Multiple Select Tags :

Here Is The Source Code Of The Above :

What attributes Can Be Inserted In The OPTION Tag ?

Here Is An Example Of A Select Menu With 'Selected' Inserted In Option 3 :

Here Is A Live Example Of The Above Code :

*Notice That Option 3 Is The Initial Value(default Value)...This Is How The 'Selected' Option Works.. :)

*As you see this select menu has nothing to do. To make use of the select menu, we should add JavaScript To make it useful. Later in this page, U'll Know how JavaScript make Select menu works.

*How To Generate A Text Area : Creates a multi-lined text entry box.

Source Code :

<FORM>
<textarea name="My_Text_Area" rows="5" cols="20" wrap="virtual"> Put your text here</textarea>
</FORM>

*Attributes:

cols="Pixel/Percentage" : Sets width the text box will be.
rows="Pixel/Percentage" : Sets height the text box will be.
name="example" : Sets the name of the text area.
wrap="Hard/Soft/None" : How text will wrap. Possible values are "hard", "soft", or "none".

*How To Change Even Its Look, Example: Add BackGround , Control Its Font Color, Style using CSS:

Source Code :
<FORM>
<textarea name="My_Text_Area" rows="5" cols="50"
style="background:#your color here"
style="font-family:your font here"
style="font-weight:bold"
style="color:#your font color here"
style="border style:solid"
wrap="virtual"> Put your text here </textarea>
</FORM>


*Note : If You Don't Want Text Inside Text Area To Be Bold , Just Remove The "Font-Weight" Line. Through "Font-Family" You Choose Your Font Style Example: Arial, New Times Roman...

*How To Create a Table :

Here Is The Simple Form :

Heading1 Heading2
Description For Title1 Description For Title2

Source Code :

*Good Info: What are Table, TR, TH, TD Tags functions?

What Are The attributes That Can Be Inserted Inside The <Table> Tag :

What Are The attributes That Can Be Inserted Inside The <TD> Or <TH> Tag -The Cell Tag- :

What Are The attributes That Can Be Inserted Inside The <TR> :

*Here Is An Example Of A Table With Different attributes

Source Code :

Notice that any text inside TH Tag is Bold font (default)!

*Here Is An Example Of A Table With No Border..

Source Code :

*Table Tricks:

Other Uses Of the Table: As a matter of fact, Learning how to establish tables using HTML is very essential. There many things you can do using tables. Let me Give you an example.

*Using tables to line up links or Buttons:

Source Code:

How To Create A Form -The Most Advanced HTML-

*In Order To Achieve This Aim, You Will Go Through 3 Easy Steps.

*First Of All, You Must Set The Form Tags...Inside The Form Tag, We Will Insert Two attributes..

1.method

2.action

*Other attributes in the Form Tag:

target="" : Specifies which window the result of the form will be loaded into. Values:
"_blank" : Loads the result of the form into a new blank window.
"_parent" : Loads the result into the immediate parent of the document the link is in.
"_top" : Loads the link into the full body of the current window.

*Let Me Explain What That Means.. By Method="post", It Means That We Are Going To Post The Information..So What About action="mailto:you&youremail.com" ?! Actually, It Is The URL To Which You Are Posting The Information. This Normally Has a *.cgi, *.pl, *.php3 Ending.

*Second Step : Set A Title For Your Form, Generally, It Is A Question..

*Third Step : Set The Answers For Your Question, For This Purpose You Can Use Many Things, Like Select Menus, Input Types, For Example : CheckBox, Radio Buttons

*Finally, The Last Step Appears -The Body Of The Form- Generally, It's A Text Area, You May Use It If You Would Like To Allow Visitors To Add Suggestions Or Additional Information..Don't Also Forget To Create The 2 Input Types : 1.Clear 2.Submit At The End Of The Form, The First One To Rest Values If The Visitor Want To Clear Everything He/She Did & The Other One To Submit The Information..

*Let Me Give An Example To Make Things More Clear.. If I Would Like To Ask Visitors To Rate My Site, How Can This Be Done Using Forms...

Source Code :

<form method="post" action="mailto:you@youremail.com"> <b><u>Rate Mostafa.up.to!:</i></b><br> <input type="checkbox" name="subject">Excellent<br> <input type="checkbox" name="subject1">Very Good<br> <input type="checkbox" name="subject2">Good<br> <input type="checkbox" name="subject3">Poor<br> <b><i>Your Comments & Suggestions</i></b><br> <textarea name="body" cols="30" rows="6">You May Insert Msg Here</textarea><br> <input type="reset" value="Clear"> Or <input type="submit" value="Submit"> </form>

*Note: You Can Change The Email To What Suits You!

This Is How It Will Look :

Rate Mostafa.up.to!:
Excellent
Very Good
Good
Poor
Your Comments & Suggestions

or


THE ABOVE TIPS ARE SOME HTML TIPS THAT ARE NEEDED WHEN YOU SETUP YOUR PAGE, IT WILL HELP YOU TO GENERATE DIFFERNT TYPES OF LISTS, LINKS, PAGE TITLES, BUTTONS, CHECK BOXS, TEXT AREAS, FORMS & YOU CAN USE THEM ALONG WITH JAVASCRIPT.


Cut'N'Paste JavaScript Tricks & JavaScript Tips

*This Is A Greeting Alert Box To Greet Your Visitors. Appears When Any Page Finish Loading..Cool!! Isn't It!

*Test: Check The Box!

Source Code :

*Whenever You Move Your Cursor Over The Link, It Gives A Description For The Link That Appears In The Status Bar!! You Can Customize The The Words That Appear In The Status

Note: Instead Of "Status" You can Use "Window.Status" , It Will Make No Difference. But, In Fact, "status" Command Is A Shortcut To "window.status" Command..This also applies To any Command Starts With Window, Example : "open" Instead of "window.open" , "location" Instead of "window.location" and So On...

*Notice That We Set The " Status=' ' " In The OnMouseOut Event To Clear The Status When The Person Moves His Cursor Away From The Link..

Source Code :

The Object "location"

Source Code :

*location.host: Shows the page URL and the Port.
*location.hostname: Shows the page URL.

*Using "window.status"

Example: Move Your Mouse On The Below Link

Click Here For Mostafa.up.to

*How To Create A Button Alert :

Source Code : 2 Ways:

First Way:

Second Way: (By Calling A Function "inform")

Example:

IF-ELSE Statement

What is IF-ELSE Statement?

IF-ELSE Statements allows you to choose between 2 conditions?

Let me give you an example:

Using Confirm Method:

First, let's have a look on the simple form of the confirm command:

*Placing this script in your page will generate an Alert Box with ok & cancel button along with the statement "Do you want to enter this page?"

*How to make a use of this script:
*Hint: Add If-Else Statement.
*Using If-Else statement, we can allow visitors choose between 2 places :

Source Code :

*Another Script: You Can Use This To Ask Users If They Like To Jump To A Certain Page Or Not..A Great Script.. Give It A Try!
*When you place this code in your page, before entering the page, you will have an Alert asking you this question "Are you sure you want to enter my website?" If you click "Ok", you will enter yahoo. If "Cancel", you will have an alert with statement "Ok, as you like" & will stay where you are.

Source Code:

*Third Form of the above script:

Source Code :

*In the above script we ignored the else Statement. If cancel is clicked on, you will stay were you are.

*Fourth Form of JavaScript Code Used To Ask The Visitors If They Would Like To Enter A Certain Page Or Not.. VerY Useful :)

Source Code :
Note : You Can Change The "history.go(-1)" by Any Page You Want, history.go(-1) actually tells the browser to go back in the history.

*You Can Use This Script To Greet Visitors With Their Name.. Very Useful

*Note: Trick Here is in Command "Prompt"

Source Code :

*This Script Is Also Not Useful But You Can Use It To Confuse And Challenge Your Visitors.. The Idea Of This Script That The Link Is Not Clickable.. MmMmmmM Actually, You Can Click The Link , But There's Only One Way..Try To Know It..Paste It In Your Page To Challenge Your Visitors & Keep Them Entertained..

Source Code : 2 Ways:

1st Way: (By Calling A Function)

2nd Way:

Example

Show Me How Clever You Are To Click This Link!

*To Change The BackGround Of The Page :

Source Code :

*To Change The BackGround By A Click On A Button :

Source Code :

*The Core Of The above Script Is: document.bgColor='burlywood'

*To Change The BackGround By Moving Your Mouse Over A Link :

Source Code :

*The Drop Down Menu! It Is Very Cool & It is a Space Saver :

Source Code :

Example

*Open A Page By A Touch To The Link.. Cool!!

*Note : Instead of "window.location" you Can Use "window.open('http://yourpage.com') " , But The Page Will be Opened Like a Pop-Up Window.

Source Code :

Example

Touch This Link To Go To Mostafa.up.to

*Using "window.open" :

*Note : As Mentioned Before, You Can Use "Open" Instead Of "window.open"

*Open A Page By A Click On A Button :

Source Code :

Example

*Create A -GO BACK- Link Without Referring To A Specific Page :

*Note: Instead of "history.back(1)" , You can Use "history.go(-1)"

Source Code :

Other History Commands:
The "History" Object :

*Tell your visitors How many pages they have visited before the page they currently surf.

Source Code :

*How To Create A Good Bye Alert :

Source Code :
*Note: Insert The Code In The Body Tag

*How To Create A Radio Button Alert :

Source Code :

Example

1: 2: 3:

*Frame Breaker :

Source Code :

*Just Check Box To Change Background Color :

Source Code :

*Change Background Color By a click on Radio Button :

Source Code :

*Go To a certain Page by checking a Box :

Source Code :

Example

*Check This Box:

*How To Reload a Page :

*Trick : window.location.reload()

Source Code :

*Obtaining browser Info :

*How To direct Visitors according to the Browsers they Use :

*The Core Of The Below Script Is In "appName" Which Is Used To Indicate The Type Of Browser Used.. Also, "appVersion" Is Used To Indicate The Version Number Of The Browser...

Source Code :

*Tell Your visitors that they use a good browser :

Source Code :

Other Navigator Commands:

The Object "navigator":

appCodeName: Gives the code name given to the browser.
useragent: Turns the hypertext transfer protocol header used by the browser when working with servers so the server knows what it is dealing with.

Example:

Source Code :

*How to have a background sound! (when the page finish loading or when you maximize the browser window).

Source Code :

*How To Close a Page :

*Trick : window.close()

Source Code :

*Other ways to close a window :

Source Code :

How to close a window by its name?

Suppose there is a window called windowX. Suppose you want this window called windowX to be closed when the page finish loading!

To do this, first you need to use the onload event handler. Second, you must add the following statement inside the event handler.

Source Code :

*Here is how the full code will look like:

Source Code :

*How To View a Source of a Page :

*Note : VerY Useful...

Source Code :

Example

*Another JavaScript Code Used to greet visitors with their Names :

Source Code :

*How to inform visitors of the last update date of your page :

Source Code :

*Whenever You Use the command "window.open", You can Control the size of the Opened Window & Many More..Let's See! :

Note: Trick is : window.open('URL', 'NAME', 'ATTRIBUTES')

*For Example :

Source Code :

*Here Are Some Properties Of "Window.Open" You Can Use :

*Note 1 : {0} Off & {1} On

*Note 2 : Instead Of {0} You Can Write {No} & Instead Of {1} You Can Write {Yes} ...

Source Code :

Here Is An Example Of A Window With A "ToolBar, Status" Only

Source Code :

*Image Flip!
*Have a Different Image When You Move Your Mouse Over An Image :

Source Code :

Example :Move Your Mouse On This Sad Face To Make It Smile..

*Just Click on a Link To Have a Msg Written In A New Browser:

Source Code :

*This Script is Used To Call the Execution of Javascript After Image of a Page Has Been Completely Loaded :

*Note: Trick Here Is In The Event: "onload"

Source Code :

*This Script is Used To Call the Execution of Javascript After The Frameset of the Page Has Been Completely Loaded :

*Note: Trick Here Is In The Event: "onload"

Source Code :

*Have an Alert When You Move Your Mouse Over Image :

Test : Move Your Mouse Over Flame : myimage

Source Code :

*Move Your Mouse Over Image To Jump To Your Page :

*Test: Move Your Mouse Over The Smile Face :

Source Code :

*Another JavaScript Code Used To Refresh Or Reload A Page :

Source Code :

Example

*How To Create An Automatic Printing Link :

Source Code :

*How To Create An Automatic Forwarding Link :

Source Code :

*How To Generate PoP-uP Window :

Source Code :

*Open A wInDoW Upon Leaving A Page By Calling A Function "Exit" :

*Note : You Can Use This Script For Example To Allow Visitors To Subscribe To Your Newsletter Through A Window Opened Upon Leaving Your Page :

Source Code :

*Another JavaScript Code Used To Open A Pop-Up Window Upon Page Leaving:

Source Code :

*How To Direct users of your site that are optimized for individual resolutions:

Source Code :

How to create a popup window displaying a message such as "Page Loading Or Please Wait..." while a page is loading? Here I configured it to full size. It will cover the whole screen :

Two Steps :

First Step :

-Place The Code In The Head Section Of Your Page :

Source Code :

Second Step :

-Place It In The Body Tag :

Source Code :

*Create A Shortcut Icon To Your Page :

*Place It In The Head Section Of Your Page :

*Note : You Will Need An Icon Generator Program :

Source Code :

*Another JavaScript Code Used To Create A Good Bye Alert By Calling A Function "Exit" :

Source Code :

*How To Get Rid Of Line Under Any Link (CSS) :
Get Ready For The CSS Tips, You are 100 CM Away From Play With CSS.

Source Code :

*Another JavaScript Code Used To Create An Alert After Page Finish Loading By Calling A Function "Loadalert" & Using The Event "OnLoad" .... :

Source Code :

Free Resources Sites :

*Fonts : Font File

*ClipArt : 321 ClipArt

*321Free.com : 321 Free

*Html Clinic : HtMl Help!

*Audio Clips : Audio Clips

*Reciprocal Link Verification : Link Counter

*Everyone.Net : Everyone.net

*Name Zero (Free Domain) <.com Or .net Or .Org> : NameZero

*Name Demo (Free Domain) <.com Or .net Or .Org> : NameDemo

*Create A Top Sites List : Top Sites Lists

*Design Banners For Your Site To Increase Traffic For Free : Free Banners

*Animation For Your Site : Animation Factory

*Create Your Logos & Buttons : Cool Text

*Create Your Wap Site For Free : Wappy

                   

*Calling A Function To Open A Page By A Click Of A Button :

Source Code :

*It's Pretty Clear Now How To Call A Function. For More Information About This TopicClick Here

Other Tricks Can Be Used apart From The JavaScript Language :

*Other Languages: VBScript
*How To Create The Following Using VBScript :

Note : For IE Browsers Only...

1."Ok" Button

Source Code :

2."Ok" & "Cancel" Buttons

Source Code :

3."Abort", "Retry" & "Ignore" Buttons

Source Code :

4."Yes", "No" & "Cancel" Buttons

Source Code :

5."Yes" & "No" Buttons

Source Code :

6."Retry" & "Cancel" Buttons

Source Code :

*Click Here To DownLoad A VBScript Tutorial.

*Other Languages: CSS

Playing with CSS.

*Embedding Fonts using CSS!

*Through CSS you can keep a basic font size, type, color for the entire page so that you don't have to use font tags every time.
Remember Basefont tags!!
*Here's an Example:

*To have the effect of these font characteristics on your text, insert your text between "div" tags.
Here's an example:

*Font of Text between div tags , will be blue, arial, bold and italic, size 3 (15 pixels)

Font size correlation between HTML and CSS.

Controlling backgrounds with CSS!

*Notice that Head Style 1 is attributed with red color so that when you insert any text between Head Style 1 tags (h1) will be colored red.

*To have the effect of these text Backgrounds, do the following:

Using CSS to set Backgrounds. When we control backgrounds through CSS, we can have cool background effects that Body tag can't do. Remember Body tag!!

Here's the Basic form of setting a background:

Playing with Backgrounds.

Background Repeat:
Normally, background images will "tile" or fill in the entire screen. With CSS, you can title your background as only vertical, or only horizontal.
Use The following code to do this:

Replace the repeat-y with repeat-x to switch from a vertical to horizontal single tiling.

*Background Position.

Here's an Example of a centered Background:

*Possible values are: top center, center bottom, bottom left, center center & so on.

How to set a fixed background: Background Will not scroll.

*Get rid of underline links!

*Rollover text links.
*How to have a different link color when you move your mouse over a link.

*Other CSS Commands:
*All a style definition consists of a tag followed by a list of specifications enclosed in fancy brackets.

*What Is A JavaScript Link? A Good Question!!

*A link is Used activate a JavaScript command upon clicking. Simply use the keyword JavaScript: , along with the code :

*Let Me Give An Example :

*When You Click The Link In A Page, The Page Will Be Reloaded.

*How To Move A WiNdOw By Clicking A Button :

*Trick Here Is In "MoveBy()" :

Source Code :

*How To Write AnyThing In A TextArea & Click On A BuTTON To Have It Alerted :

Example
Click Here For An Example.

Source Code :

*The Date Object :

*First Step : What Can Be Done To activate a Date Object!

*Simply, Begin Your Code With The Object "New Date()" :

*Second, Activate The "Year,Month,Day" By The Following "GetYear(),GetMonth(),GetDate()" :

*Third Step : Choose A JavaScript Command To Display The Date :

*Note: output Will Be As Follows : Year/Month/Day

*Note 2: I Added "1" To The Month, Since In JavaScript, It Counts Months Starting From "0", Not "1".

Here Is An ExAmPlE Of A Date :

Who Said That The Books Age Has Gone!! Actually,"A book is worth a thousand web pages"


Books On JavaScript

JavaScript Books

JavaScript Books On The Amazon

Other Books On JavaScript

JavaScript BookList

More JavaScript Books

Securing Java: Getting down to business with mobile code

Swing

The Java Tutorial

Thinking in Java

Amazon.com Java Books


Other Resources

Here Is A list of some useful resources I Found While Surfing!

JavaScript Reference The Netscape's Javascript documentation
JScript Web Page Microsoft's JScript documentation
The AskAway! Network A unique directory of FAQs
Yahoo! JavaScript Links Yahoo's directory of JavaScript links
Focus on Javascript About.com's Javascript directory
The Web Design Resource Everything related to web site design
Doc Javascript Javascript tips and lots of how-to columns
The JavaScript Source An excellent "Cut & Paste" JavaScript library
Website Abstraction Tutorials, scripts, applets, discussion forum...
Dynamic Drive Free DHTML scripts to add to your site
The Programming Sharehouse Programming resources for many languages
JavaFile A good collection of free Javascripts
JavaScript-Intro by Voodoo A very through Javascript tutorial.
The JavaScript Planet Lots of free Javascripts
NCSA-A Beginners Guide to HTML The best site to start
HTML Tutorials in Web Page Design Very through HTML tutorial
The HTML Guide Another good HTML tutorial

Webmaster Tools

HostReview.com Compare more than 1600 hosting plans.
!Register-It! Register your site with search engines
Submit-It! Another submission service
WebPosition Monitor your site's ranking in search engines
Position Agent Another service to find your search engine ranking
Web Site Garage Tune up your web site
GifCruncher Reduce the size of your GIF images
ListBot Add a free mailing list to your site
Extreme Tracking Track visitors to your web site
VantageNet Web Services Free discussion forum and polls
WebmasterBoard Discussion Forum for Webmasters
Site Add Submit your site to several Serach Engines


Need More Here You are

  • 0 Cost Host - offers free hosting, domain name of choice, and site creation tools.
  • 008web - offers free web space hosting, built pages with editing and site management tools.
  • 00server.com - includes email, guestbook, statistics, site builder, FTP, and more.
  • 0urFamily.com - offers hosting for family websites.
  • 1 Chat Boulevard - provides web pages, email, and chat rooms.
  • 1Avenue.com - offering free web space including subdomains, page building tools, bandwidth, message boards, and webmaster resources.
  • 20m Free Web Space - offers domain names, web pages, site design tools, email, and chat.
  • 321Website.com - offers web pages plus bulletin boards, chat, guest book, survey maker, email capture, calendar, and shopping cart.
  • 50Megs.com - offers 50 megabytes of space for web sites. Also includes EZ builder and guestbook.
  • Above World - offers virtual domain hosting and a Web page creation tool.
  • Achievement International - offers free web pages for any worthy cause.
  • ACMEcity - create your own home page at Warner Bros. ACMEcity. Get 20 megs free space, email, homebuilder and more.
  • Affari.to - offers hosting packages with PHP4.0 support, 15 Mb, CGI access, and domain registration services.
  • Angelfire
  • AT&T WorldNet Community Port - chat and message boards for everyone, community listings for members.
  • B-City - offers free business web site design and hosting.
  • Batcave Network, The - free web pages, chat, daily news, and forums.
  • BizLand.com - provides small business with web hosting, promotional tools, online storefronts, and more.
  • Book-Club.net - provides pages for book clubs, sales, buybacks, and exchange services.
  • Bravenet
  • CampusWest - offers web pages and email.
  • Chattown - many lifestyles supported. Teens to restricted adult.
  • Click2site - provides online resources for small businesses, entrepreneurs, and home-based start-ups including web hosting frontpage support, traffic reports, etc.
  • CommunityWare - free homepages, live chat, & live messaging, too.
  • Conkworld
  • Create uh Page - create your own web pages quickly, easily, and for free.
  • Create Your Site - build a free web site with no software to buy and no knowledge of HTML required.
  • Creative Junctions
  • Crosswinds - web site host.
  • Cybercities.com - unlimited web space.
  • Cyberinfo.com - offers personal or business web pages.
  • Cyberspear Technologies - offers a commercial-free web page builder.
  • Dencity.com - offers free web hosting for commercial or personal use, message board, daily statistics, CGI scripts, FTP access and a web file-manager.
  • Dreamwater Free Web Space - guestbook, chat board, email and short URL.
  • dreamworld.org - offers free webspace, email, irc chat, and more to non-profit organizations, online communities, and positive thinking individuals.
  • eHomeBook.com - features include photo album, calendar, health watch profile, and recipe posting.
  • Esoteric Source Providers - provides web space for authors of metaphysical subjects.
  • Europe@Home
  • Ezpage
  • Family Shoebox - offers web space and tools especially for families.
  • FamilyBeat.com - specializes in family web sites.
  • FamilyStreet.com - free point-and-click family web sites. No programming required.
  • FanSpace Free Web Sites - offers web space for fan pages, email, website statistics, FTP, and site building tools.
  • FindLaw Internet Legal Resources - create a web site for law firm or organization. Features extensive index of law firm sites.
  • FirstStepSite - provides a free 3-page web site hosting.
  • FortuneCity UK - offers 100mb of free web space.
  • Free - website creation system.
  • Free City - offers space, homepages, and hosting services.
  • Free Web Page List - includes reviews of web page providers.
  • Free Web Space Inc. - also offers domain names, design tools, and email accounts for personal and business use.
  • FreeServe - free customized web pages, html help, and more.
  • Freeservers.com - offers web space, customized domain name, unlimited email addresses, guestbook, direct FTP access and more.
  • FreeTown - chat, web pages, classified ads and more.
  • Freeyellow.com
  • The Globe
  • Go Play - offers page building tools, a directory of member sites, email, greeting cards, and other features.
  • Go2click.com - features unlimited email, FTP access, editing and site management tools, counters, and more.
  • GrlSpace.com - offers ten megs of free web hosting and email.
  • gURLpages - free homepage hosting from the same people who brought you gURL Magazine.
  • Hatteraslight.com
  • Hess.net - free service to link the private homepages via a shorter URL.
  • Homepage.com - features member-named Web addresses for corresponding home pages.
  • homestead.com - allows groups or individuals to create free web sites online.
  • HowdyNeighbor - free personal home page neighborhood. Full Ftp access to your site.
  • HTML Publishing
  • Idealia Web-City - offers multichat, messages box, museum on line, free homepages, fan clubs, web hosting, and more.
  • ILoveUSA - free virtual domain for any USA made product or business.
  • IntelCities - homepage community and business site hosting service.
  • Internet Avenue - offers free web site design and storage for your local Chamber of Commerce.
  • Internet Trash
  • Jacksonville Virtual Mall - offers web site hosting services.
  • Joe's CyberPost
  • JustWebit.Com - free e-commerce sites for small to medium sized businesses.
  • Lighthouse Business Services - free web design to Christian churches, missions, and organizations. Non-profit organizations at very low cost.
  • LocalBzNet - offers free web pages to local profit and non-profit businesses.
  • Macrules.com - free web hosting and news for Macintosh web sites.
  • Megspace Inc. - features guest books and search engine submissions.
  • Microweb Services - provides free personal or business homepages.
  • Moonfruit - provides simple tools for building multimedia-rich websites.
  • MSN Home Pages - customizable templates provided or users can ftp pre-existing pages to the server.
  • MyFamily.com - offers private family web sites with calendar, chat, instant messaging, multimedia album, email, and more.
  • MyFreeOffice - free space, domain hosting, and a suite of office applications.
  • NanoHome - create your own 3D web page.
  • Nerk's Media Machine - non-profit entity providing high-end graphic and web site design and hosting services for progressive organizations on a low-cost or free basis.
  • Netcolony - free homepages and no annoying pop up windows.
  • pageLaunch.com - offers site builder with hosting.
  • Pagelist - providing free Web pages.
  • Phrantic.Web - offers free home pages to anyone for personal use.
  • ProHosting - free virtual hosting.
  • QSites.com - offering sites with photo album, personal calendar, address book, discussion, and more.
  • Record.Net, The - offers sites for individuals to publish creative works such as poetry, pictures, music, film, and more.
  • ROTFL Online Services - free email, free homepages, electronic postcards, and much more!
  • Spaceports - offering email and Web site space.
  • State of Insanity Server Space - providing free space for any organization which advocates for diversity and freedom of speech.
  • Stormloader.com - offers homepages without banner ads.
  • SuperFamily.com
  • TerraShare.com - features articles, moderated discussions, links, and site building resources.
  • thedigs.com - providing teens and college students with an online home they can use for expression, identity, community, and commerce.
  • TopCities - offering 150 MB of space, sub-domains, guest book, personal message board, counter, form mail, and more.
  • TopTown
  • Toronto Web Services
  • Tripod
  • Truepath - free homepages for Christians.
  • Vancouver Webpages
  • WBS
  • Web Jump - with or without your own domain name.
  • WebProvider.com - domain-based, web hosting for personal or commercial use.
  • Webspawner - online web authoring system that lets you design and develop customized web pages in a matter of minutes - without having to learn HTML.
  • WeCare - offers free web sites to non-profit organizations.
  • WhatTown
  • Worldbreak.com - offers free hosting, design tools, and more.
  • WWWBoard Network - message board pages and services. Also contains a directory of message boards.
  • Yahoo! GeoCities
  • Yod.net - provides hosting services for entertainment sites only.
  • Zarcrom Free - free 5Mb to anyone for homepages.
  • ZY.com - build your web pages online.
  • Hide Source Of your page


JavaScript Search

Just Click Here!!


What's Hot!

A Huge Collection Of Webmaster Tools
Create Your Own Free Banners Online & Increase Traffic
Get A Free Chat For Your Home Page
Track & Analyse The Behaviour Of Visitors To Your WebSite.
ButtonLand
Caboodles
I-Face Warehouse
ProDraw Free Graphic Gallery
WebGFX
Dove Enterprises
The Animation Factory
Zyris
CoolArchive-Button Creator
IconBazaar
El Paso 1 Web Design
Graphics by Susan
Barry's Clip Art
Gif Wizard
Boing Web Design
Gifart's Web Resource!
Full Moon Graphics
Graphics Designer's Studio
Grafica Design
clip-art-gallery.com
FreeSiteTemplates.com
GIF Wizard
guistuff.com
Okteria

webvoodo Hot!
Free4Free

Also Please Have A Look On HostIndexSearch Nearly Over 3,000 Web Hosts At The Largest Hosting Directory..Also Free Domains & Free Website Design & More...Just Give It A Try..



100 Best Free Hosting Services

Reviews of hosting providers offering free home pages. Includes reviews of webmaster utilities, domain names, email, and site design tools. Just Click Here!



Be an Expert! Spice Up Your Home-Page!

Eliminate Broken Links, Faulty Transactions & Slow Loading Pages!

Free Linkbot Personal Download from Watchfire. Check for more than 50 types of website problems. Eliminate broken links, faulty transactions, and slow loading pages! Replace your manual web page testing with Linkbot! Linkbot Personal gives you the power to make sure your website works.

Download a FREE Copy of Linkbot Personal NOW!

What are people doing on your website?

Ahmed visits your website. Do you know where he came from? What links he clicked on? Whether he encountered any error pages? Do you know what browser and Operating System Ahmed is using?

If you don't know these facts, how can you improve your site? Stop guessing, download a free trial of WebTrends and start knowing Click Here!

GIF2SWF is a single-purpose tool for converting animated GIF images into Shockwave format. Simply load up your animated GIF file, click on the convert button, and you'll have a Flash file which you can then embed onto your webpage.

Program Name: GIF2SWF v1.0 (Windows - Freeware)
URL: http://www.anthillweb.com/daunis/gif2swf.htm

For more on Flash and the different tools available to create Flash files, read "Get Flashed" at Click Here

5 Stars Trick

When a user is on your site, you have to assume that they want to stay there for a long time. Hopefully they stay and browse your entire site to see its content. This is something you definitely want. But something that can change all that is linking your advertisements or links to other sites in the "same" window. If you want users to stay visiting, it is a good idea to have your out-of-site links come up in a "new" browser widow. You can do this very easily by adding a very small amount of code to your links code.

Add target="blank_" to the end of the href tag like this:

Source :

When your text is clicked on now, the site will opened up in a new window, and your site will still be accessible right underneath the new window. Now the user can visit your linked site, and your own at the same time without any worry.

A Cool Script:
Want a pop-up window that automatically centers on a user's screen? Check out the JavaScript for just such a pop-up at: http://www.dynamicdrive.com/dynamicindex8/autocenter.htm

Do you dream of having a -TRAFFICJAM- of visitors to your Web site? Well,now you can and best of all you can do it for FREE - with TrafficJam.com!

Remember:
MORE TRAFFIC = MORE MONEY!

Online Resources at BraveNet.com

Making Money Online:
http://www.bravenet.com/reviews/money/
Tons of Webmaster Freebies:
http://www.bravenet.com/reviews/freebies/
Webmaster Freeware (Free Software):
http://www.bravenet.com/reviews/freeware/
Discounted Webmaster Software:
http://www.bravenet.com/reviews/software/

A Cool Trick: Dynamic Background Colors
This little HTML snippet is a lot of fun as it allows your user to choose a background color for a page dynamically from your site. Play around with this one to choose colors that fit your site design!

Remote Sourcing of Scripts:

There's no question about it, JavaScripts add functionality and fun to any Website. One drawback is they can clutter up your code, and people can take your code right from your page. To fix these issues, you can remotely source your scripts from a directory on your server. This will shorten your page code and your scripts will not be displayed. Of course, in order for the script to work, the visitor will have to download it so they can be found in a browser's temp directory or cache. Still, remote script sourcing is great because the script resides in its own file and it's easy to make site-wide changes.

So, how do we do this? First off, we need a script. Here's a handy date generator you can use to display the current date on your site (remember, though, the date will be the one that a user's own computer is indicating).

Source Code :

We could place this on a page and it will show the date where we place it. Or we can source this code like this:

All you need to do is paste your code into a text editor, like NotePad, then save it with the java-scriptextension of ".js" Now place .js file into the right directory on your server and then place the source tag where you want your date to display and presto!
This works for single component and multi-part scripts. For example if a two-part script is needed with variables in the top and display in the bottom, you can source the variable portion in one file, and the display portion in another. We'll show you all about that next time.

Advertise your site to 10,000,000 people on 80,000 websites for FREE!

Free Banners is a fantastic new way to get more exposure for your web site while earning you CASH! Just think - when you become a member you can get your banner ad displayed on other members' sites. Even better - the more popular your own site gets, the more exposures you'll get! Click Here!

Tips About Internet Search Engines & Search Engines Submission.
Click Here

Ad Resource: Internet Advertising and Web Site Promotion Resources.
Click Here!

Make Money Online

Commission Junction offers thousands of merchant partners. - Highly recommended -
BeFree is one of the best affiliate registration and reporting sites on the Web. Site offers many merchant programs!

More Affiliate Progromes

ClickBank
CYBERCLICKS
LinkShare
onResponse.com
Outsource 2000
PopUpSponsor.com
webROCKET
Verza

Free Web Page Templates @
http://www.321clipart.com/

A Graphics Program that does Screen Captures
PaintShop Pro is a great program. Grab it @ shareware.com.

Click Here To submit your website to 91 Search Engines 4 FREE

Add ALT attribute in your image Tag?

Actually, many people ignore the ALT attribute when they use image tags. First, What's ALT? ALT is an attribute inserted inside the image tag. It is the Text String that appears when you move your mouse over the image or when image don't get loaded. It is useful for two reasons? Let me tell you why it is important.

First, some images don't get loaded , and don't appear. Others take a time to load. The ALT attribute help the Visitor of your site to know what's missing in the page.

Second, when a robot or spider visits your site, it will read keywords in the ALT Tags! This trick is especially important if you want to tell the robot to "index, follow" in your meta tags.

Here's How to use it.

Source Code :

Hiding Your Source Code:

Many people feel worried because people steal their images and source code of their home page. A great way to prevent people from stealing your work, use the No right-lick Script. This Script prevent people from viewing the source code of your web page or even steal your images. However, Advanced Javascripters can View source of any page, even if page has the No-Right Click Script! How?!! You'll find somewhere here! Oh, I Forget! For getting the No-Right Click Script, Visit www.javascript-source.com.

How To Hide your Scripts?

You can hide your JavaScript By placing JavaScript Code in a remote place on your Home-Page Directory. Write Your Script in your Notepad or any HTML Editor or whatever you use. Then, we you finish writing your script, save the file with the *.*JS Extension. Upload The File in your Home-Page Directory. To Have the effect of script in your home-page, add <script language="JavaScript" src='yourscriptfile.js'></script> in the HEAD section of the page you want the JavaScript to have effect. When you place <script language="JavaScript" src='yourscriptfile.js'></script> in your HEAD section, it will tell the browser to activate the JavaScript Contained in this file [yourscriptfile.js] in the page you inserted the in.

Getting Listed Easily:

To get listed in the Search Engines Easily, you must Check if Images, Links of your site is working or not? What about the spelling mistakes? Did you miss-spelled a word? Do you have errors? Do you have broken images or links? Actually, if you would like your site get listed easily in the search engines , Check these things out before submitting your site to any search engine.
Check Out these HTML Checkers:
Dr. Watson
NetMechanic
Backward Compatibility Viewer
SiteInspector

REMEMBER, FIX YOUR ERRORS BRFORE SUMBITING YOUR SITE TO SEARCH ENGINES

How can I Pre-load Images?

First, What Pre-loading images mean?
When you pre-load an image, it will load in cache first so that it will be loaded in a One-Go in your site. This Trick is mostly needed when you have an image slide show in your site. Imagine your Image Slide Show without pre-Loading Images. Your visitors will get bored!

Source Code :

*Note: x & y are Dimensions of the image.

*Have a Look on SiteSolutions.Com , They have lots.

The mighty Mouseover machine
Create Cool Mouseover Effects

Download Flash 5 Update for free Click Here

Who is linking to you?

Have you ever wondered who is linking to your site?

Visit HotBot.com Choose the drop-menu and select "Links to this URL", then enter your Home-Page URL and click search. Don't Forget to add http:// before your Home-Page URL



Search Engine Tips!

To score high in search Engines, Check out these Tips:

  • Use Meta tags.
  • In the Meta keywords Section, use keywords that people use alot. Ask your friends what keywords they will use when they search for your site and use it.
  • Open source code of Highly scored sites on search engines, see what keywords they used in their Meta tags, and use them.
  • Check broken images, links, and spelling mistakes through any HTML checkers.
  • Submit your site to search engines.

Search Engines has become many webmasters' concern. Many people build nice websites but they always face the problem of getting listed in search engines! Actually, getting listed easily in search engines needs some steps. I recommend you to check out this search engine Tutorial.


*What's The NoScript Tags :

*If Your Browser Doesn't Support JavaScript, It Will Show The Text In The Noscript Tags :

Source Code :

*How To Display Different Msgs Depending On The Time :

*Notice The Comment Tags...

Source Code :

*Display A Msg In The Status Bar When The Page Finish Loading!

Source Code :

*Another JavaScript Code Used To Tell Your Visitors The Type Of The Browser They Use :

Source Code :

*Tell Your Visitors More Details About Their Browser :

Source Code :

*Tell Your Visitors Information about Their Monitor :

Source Code :

*Calling Functions!
How To call a Function:

*First Step: Define the function.
Defining the function doesn't execute it. It only gives the function a name and specifies what to do when the function is called. Here is the basic format for "Defining a function". Define the function simply by add the word function followed by the name of the function & the two parentheses ().
Inside the fancy brackets (curly braces) {}, insert your code - what will happen when the function is called-

For Example:

In the example above, The name of the function is "ok" *Tip: Two parentheses is used when we call a function with arguments where a list of arguments to the function, enclosed in parentheses and separated by commas.
*Second Step :To call the function, you need a tool to activate it. For This Purpose You Can Use Input Types & Event Handlers. In the example above, the function will be called when the button is clicked on.

*Example :

*Let Me Put The 2 Codes Alltogether :

The Code Between { } Will Be Activated When You Click The Button, This Is How You Can Call A Function

*I Will Give You An Example To Make It More Clear..

*Example: How To Have A Msg Written After A Page Finish Loading By Calling A Function

I Think It's Pretty Clear Now How To Call A Function Using JavaScript :)

*Calling A Function With Arguments :
In this case, we will use the parentheses. Notice the changes.

Source Code :

*Here Is A Live Example Of The Above Code : Move Your Mouse Over Here

What Are JavaScript Variables ? & How To Use Them?

Variables are used to store data.

*There are two ways to use variables
*By simply assigning it a value. For example, x = 5
*Using the keyword var. For example, var x = 5

*I Will Show You How To Use Them :

*Description Of The Above Code: If You Inserted The Above Script In Your Page, You Will Have That Between Brackets Alerted, So What's That Between Brackets?, It's myname. "Myname" Is A Variable That Was Used To Store A Data, That's It, Mostafa. Therefore, When Page Finish Loading, the Alert Method will display its argument which is the variable, myname & You Will Have An Alert With The Word "Mostafa".. Notice Also That We Didn't Write ' Between Alert Msg, Just Keep In Mind When You Use Variables Don't Put 2 Apostrophes Between Msg, This Also Applies To "Document.write" Method..

JavaScript String Objects :

*Using Indexof() Object :
*It's Used To Test If A String Contains A Specified Character.

Source Code :

*OutPut:

Source Code :

*Output :

*The Above Method Is Used In Forms Validation, Example : E-Mail Validation.

Example : Try To Input An Email Without The {@} Sign.

Enter your E-mail address:

Source Code :

*Using "Lenght()" Object :

*How Can You Calculate Number Of Characters In A Word Using JavaScript Language

*Simply, This Can Be Done Using The "Lenght()" Object.

Output :

*Notice That The Space Is A Character.

*Uses :Length Validation Form

Example : Type More Than 7 Characters In This TextArea & Then Click On The Button..Notice That The Is Space Is Counted As A Character & The First Character Is Zero & Second Is The First & Soo ON..

Source Code :

*Using "Substr()" Object :

*How To Pick Characters From A Statement Using JavaScript ?

*Simply, This Can Be Done Using The "Substr()" Object.

*Description of The Above Code :This Will Pick The 4th Character & The Next 3 Characters.

*Output :

JavaScript Math Objects :

*What Is "Math.Random()" Object ?

*This Method Will Generate A Real Number Between 0 And 1

Example:

Source Code :

*If You Multiplied "Math.Random" By 8, It Will Generate A Real Number Between 0 & 8

Example :

Source Code :

*How To Round A Number To The Nearest Whole Number(To An Integer) Using JavaScript :

*Simply, Use The "Math.round()" Object

*OutPut :

Using JavaScript, How Can You Identify Which Number Has The Highest Value?

Simply, By Using "Math.max()" Object

Source Code :

*OutPut:

Using JavaScript, How Can You Identify Which Number Has The Lowest Value?

Simply, By Using "Math.min()" Object

Source Code :

*OutPut :

What Is JavaScript Looping?

There Are 3 Types Of Looping :

*For Loop

Source Code :

*Description Of The Above Script :As long As "i" Is Less Than Or Equal To Seven The Loop Will Continue To Run.

*While Loop

Source Code :

*Description Of The Above Script :While "i" Is Less Than Or Equal To Five, The Loop Will Continue To Run.

*Do-While Loop :

Source Code :

*Description Of The Above Script :While "i" Is Less Than Or Equal To Nine The Loop Will Continue To Run.

What Are Arrays In JavaScript?

Arrays Are Used To Store A Series Of Related Data Items :

Source Code :

For The OutPut Of The Above Script

*How To SetTimeOut :

*This Method Will Help You To Execute A JavaScript Code After A Certain Time:

*For Example : When You Click On The Button, An Alert Will Be Generated After 5 Seconds, Notice That Time Is In Milliseconds (5000 Milliseconds=5 Seconds)

*Code Of The Above Example:

Important Facts About "Documnet.write" Method

Do You Know That You Can Insert Tags Inside It..

Example 1 :

Example 2 :

*What To Do If You Want To Insert This Statement "It's My Life" In The Document.write Knowing That It Will Make An Error Cause Of The Apostrophe IN "It's", In Order To Avoid This Error Just Add The Backward Slash Before The Apostrophe ... That's All...

Example :

*How To display a random Msg :

*Trick : Math.round(Math.random())*3

*Note : You Can Change Number of Rounds How? Simply, Multiply By the number of Rounds you want (Instead of {*3} replace {*5}) But Keep In View That When You Multiply By 5, You Should Have 5 Msgs! N Sooo On.

Source Code :

*How To display a random Image :

Source Code :

*Use This Script To Flatter Your Visitors

Example :
Click Here For An Example.

Source Code :

How To Write Special characters In The HTML Documnet

Character Description Trick
  non-breaking space &nbsp;
< less than &lt;
> greater than &gt;
& ampersand &amp;
" quotation mark &quot;
' apostrophe  &#39;

*How To Make A Username-Password Gate :

*Another Script To Make A Username-Password Gate (Simple one) :

*Tip: According to computer language, equal is denoted by ==

Others:

Not equal (!=)
Greater than (>)
Greater than or equal (>=)
.Less than (<)
Less than or equal (<=)

*How To Create A Password Gate :

Source Code :

My Is 67579709

Go Back

| Word From Webmaster | Promote Your Site | Hexadecimal RGB Table | JavaScript's FAQ | Recently Added JavaScripts | Have A Question? | JavaScript's Chat | Link To This Page |

Home | GuestBook | SmS Service | What's New | About Us | History | Hot Tips
Photo Album | Newsletter | FAQs | Link To Us | Log Out

More Tips & Tricks Will be added soon !

For any Information about the Webmaster, Please Visit : Mostafa.up.to, Thanks.

Copyright Mostafa.up.to All Rights Reserved.