We accept safe and secure Credit Card and PayPal Payments.
 
Perl Scripts

All Count
Attachment Mailer
Perl Scripts Build A FAQ Plus
Perl Scripts Clock In Center
eBackup Automated
Easy Poll
eSurvey
Fetch a File
Form Maker
Mailing List Server
MySQL Mate
PDF Creation
QCart
Quick Fix
Quote of the day
Speed Search
Task Manager
Traffic Pack
Upload Plus
Upload Gold
Upload Pro
Website Manager

 
Free Perl Downloads

Free Perl Scripts Main Page
Free Perl Scripts 404 Alerter
AccessLog Viewer
Build A FAQ
PHP Scripts eBackup
Free PHP Scripts ErrorLog Viewer
eVars - Server Info
HT Pass Creator
Upload Lite
Website Manager

 
JavaScripts

Free Java Scripts Alert Boxes
Free JavaScripts Browser Sniffer
Check email
Generators
Slide Show
Sudoku
Window Maker
More...

 
Extra Utilities

ASP Scripts Ascii Codes
Free ASP Scripts Color Picker
Font Finder
HT Pass Creator
Meta Cloak
Meta Magic
Pano Zooms
SlideShow
Server Size

 
Online Tutorials

Free HTML Scripts Glossary
Free HTML Scripts HTML
JavaScript
MySQL
SSI
Build Traffic
Other

 
Miscellaneous

About Us
Graphics
Testimonials
Installations
Latest versions

 
Hawk Eye in Tennis

Should Hawk Eye replace linesmen and lineswomen at all tennis tournaments?







 
View all Polls

Run Polls on your site

Run your own Surveys

 
Store Download FAQs Contact Us Support Programming Policies  
JavaScript -> Miscellaneous        

How do I scroll to the very top of a page?

How do I make a link void of any action?

How do I nest quotes without JavaScript causing a runtime error?




How do I scroll to the very top of a page?

Using the scrollTo() method which accepts two arguments. Horizontal and vertical pixel positions. Eg. to scrol to the very top :

<a href="javascript:scrollTo(0,0);">

Or to scroll to any part of a page, enter the pixel co-ordinates. scrollTo(10,175)

Top


How do I make a link void of any action?

By using the void() function. Using it in a href tag will cause the link to do nothing, you could then use the onclick event handler to execute another function. Eg.

<a href="void(0);" onclick="alert('Hello')">

Top


How do I nest quotes without JavaScript causing a runtime error?

You must escape them or alternate between single and double quotes. Take a look at the first example which uses alternating quotes.

<a href='#' onclick="alert('Hello')">About </a>

The following example uses the escape character (\) to let the JavaScript engine know that we want the quote printed and is not part of the syntax.

<a href='#' onclick="alert('How\'s your day?')">About </a>

Quotes can be escaped numerous times in any one statement. If you forget to escape your quotes, your scripts will fail. Take a look at this stipped down example :

'You\'re day\'s going well?'

Sometimes you need to print double quotes, in this case, you'd use something like the following :

"Click the link that says \"Start\""

Top


Speed Search our site
Plesk Hosting
Linux servers with Plesk Control Panel, cgi-bin, crontab manager, Mysql, PHP and ASP.

Linux Hosting Plans from $9.12 per month, includes Plesk Control Panel, MySQL databases, cgi-bin, crontab manager and 50 email accounts.

Discounted Scripts
Subscribe to our periodial newsletter to receive special offers.

Bathroom Hygiene
How often do you thoroughly clean your bathroom?








View all Polls

Run Polls just like this one on your website!


About us | Contact us | Script FAQs | Script Support | Website Hosting | Our Policies | Store | Testimonials
Subscribers log in here. Subscribe to our periodical newsletter for special offers on commercial scripts, hosting, exciting business opportunities, and industry news and events. Our Mailing List Software is powered by Consolidator    
HTML Plain text
©1999 - 2015 All content Copyright PerlScriptsJavaScripts.com Proudly hosted by LinuxHostingPlans.com