Showing posts with label JavaScript. Show all posts
Showing posts with label JavaScript. Show all posts

Friday, October 3, 2008

JavaScript : Alert

the 'javascript alert' is probably the easiest (and the most annoying) javascript event to code.

heres an example
alert example

Back Button

this javascript back button code uses a form button that when clicked on sends the user back to the last webpage veiwed
*Please note, this javascript back button should not be relied upon alone and a link to your home page should also be included where ever this javascript back button is used, the reason, if a user arrives at one of your pages from a search engine and clicks on the javascript back button they will simply be sent back to the search engine.
so be kind and do yourself a favour include a link to your homepage where ever the back button is used


or
a text link could also be used
example...
<A HREF="javascript:history.go(-1)">back</A>


Auto Redirect

this javascript is similar to the one above and redirects users regardless of the browser they are using.
Place the javascript in the head of your html document and remember to change 'index.html' to the name of page you wish to redirect to

Browser Redirect

use this javascript to redirect users according to the browser they are using.
If you have you optimized your site for a certain browser use this script in the head of your html document.
Many websites are optimized for a certain browser, but they don't tell the visitor.
This leads to visitors not being able to view parts of the site (or the whole site)
This javascript allows you to make a page for each browser so that all users can view your page.
Remember to change 'explorer.html' and 'netscape.html' to the names of the pages you wish to redirect to.

JavaScript Break Frames

this javascript will automatically break a frame, place it in the head of your html document and you will never have to worry about someone loading your page into a frame, the javascript will 'smash' out of the frame.

Followers

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | cheap international voip calls