Showing posts with label JavaScripts. Show all posts
Showing posts with label JavaScripts. Show all posts

Wednesday, 30 November 2011

OPEN NEW WINDOW WITH HYPERLINK

This JavaScript will open a new browser window when you click on the hyperlink. You can also change the optional settings you want depending on how you want the new window to display in the browser. 1 = Yes and 0 = No for displaying purposes.




ASP Web Pro







Open New Window




http://www.aspwebpro.com/javascripts/windows/opennewwithhyperlink.asp

OPEN NEW WINDOW AUTOMATICALLY

This JavaScript will open a new browser window automatically when your web page is accessed. You can also change the optional settings you want depending on how you want the new window to display in the browser. 1 = Yes and 0 = No for displaying purposes.




ASP Web Pro







Open New Window




http://www.aspwebpro.com/javascripts/windows/opennewautomatic.asp

TEXT ROLLOVER

This JavaScript displays a simple text rollover like the ones you see on our main menu:




ASP Web Pro






Your Text Here




http://www.aspwebpro.com/javascripts/rollovers/textcolor.asp

DISBALE RIGHT-CLICK

If you want to deter users from copying the content from your website, this script will disable the right-click function on the users mouse. Of course, we say this is only a deterant because the user can change the settings in their browser and get around this. At least it helps to deter novices from stealing your work.


ASP Web Pro










http://www.aspwebpro.com/javascripts/miscellaneous/disablerightclick.asp

PAGE BREAK

It is often necessary to insert page breaks into your web pages so that users can print your information without data or images running off of one page to another. Using this simple JavaScript, "Page data 1" will print on page 1 and "Page data 2" will print on page 2.


ASP Web Pro




Page data 1


Page data 2





http://www.aspwebpro.com/javascripts/miscellaneous/pagebreak.asp

PRINT THIS PAGE

There are a lot of websites that contain information that users want to print. If you have a page that is printer friendly, why not include a print button or link for the user. Just paste the below code into your page where you want your print option to appear.


ASP Web Pro









http://www.aspwebpro.com/javascripts/miscellaneous/printthispage.asp

CLOSE WINDOW

Many websites use popup windows that display while you are surfing their website. They are very commonly used for displaying advertisements. They are also often used for site Help files, short surveys, and a few other things. Well, if you are going to use a popup window on your website, it is proper netiquette to include a close window button or link within the popup window. All you have to do is choose if you want to display a close window button or link and paste the one line of code below into your page. It just doesn't get any easier than that!


ASP Web Pro





or Close Window





http://www.aspwebpro.com/javascripts/miscellaneous/closewindow.asp

MAKE THIS MY HOME PAGE

We all want as much traffic to our website as possible. Well, if people have your website set as their homepage that will guarantee you at least some traffic each time they connect to the Internet, so why not make it easy for your users to do this by adding a button to your page like this:

* Note: This script only works for IE 5.0 +


ASP Web Pro









http://www.aspwebpro.com/javascripts/miscellaneous/makethishomepage.asp

BOOKMARK THIS PAGE

We all want people to bookmark our website, so why not make it a little easier for people to do it. This short script will add your website to the users Bookmark or My Favorites list. To add this feature, just paste the code below into your page where ever you want the Bookmark link to appear.


ASP Web Pro







http://www.aspwebpro.com/javascripts/miscellaneous/bookmarkthispage.asp

ANIMATED STATUS BAR MESSAGE

This JavaScript displays an Animated Status Bar Message:




ASP Web Pro









http://www.aspwebpro.com/javascripts/messages/animated.asp

ROLLOVER HYPERLINK STATUS BAR MESSAGE

This JavaScript displays a simple text rollover like the ones you see on our main menu:




ASP Web Pro





YOUR LINK TEXT HERE




http://www.aspwebpro.com/javascripts/messages/onhyperlinkrollover.asp

ON PAGE LOAD STATUS BAR MESSAGE

This JavaScript displays the Status Bar Message you see at the bottom left of your screen:




ASP Web Pro






http://www.aspwebpro.com/javascripts/messages/onpageload.asp

START CURSOR AT FIELD

This handy little JavaScript goes inside the body tag and automatically starts the users cursor in a given form field. This script will start the cursor in the Username field:




ASP Web Pro




Please enter you Username and Password:

Username:
Password:





http://www.aspwebpro.com/javascripts/forms/startcursoratfield.asp

DROP DOWN MENU VALIDATION

This JavaScript requires the user to select any item from the drop down menu except the first entry:




ASP Web Pro





Please choose an item from the drop down menu:

Choose a username:





http://www.aspwebpro.com/javascripts/forms/dropdownvalidation.asp

BLANK FIELD VALIDATION

This JavaScript ensures that the user enters a value into your form fields before allowing them to submit the form:




ASP Web Pro


http://www.aspwebpro.com/javascripts/forms/blankfieldvalidation.asp

DATE / TIME ON STATUS BAR

This script will display the current day of the week, month, date, year, hour, minutes, seconds, and AM or PM in your Status Bar like this:

Thursday, May 10, 2001 10:45:01 AM


ASP Web Pro







The rest of your page.




http://www.aspwebpro.com/javascripts/dates/datetimeonstatusbar.asp

TIME

This handy little script displays the time with the hour, minutes, seconds, and AM or PM like this:

11:36:09 AM


ASP Web Pro













http://www.aspwebpro.com/javascripts/dates/time.asp

COUNT DOWN TO DATE

This script performs a count down to any any date you plug in. You can customize as many different messages as you like. Here is how the script will display like this:

It'sNew Years Day 2010!!


ASP Web Pro









http://www.aspwebpro.com/javascripts/dates/countdowntodate.asp

MONTH / DAY / YEAR

This script displays the date in this format:

November 30, 2011


ASP Web Pro








http://www.aspwebpro.com/javascripts/dates/monthdayyear.asp