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
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
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

 
Flash poll

Does your Website use Flash?






View all Polls

Purchase Easy Poll for your site, only $29

Run Surveys on your site. Click here
 
Global Warming

Your energy bills doubled in exchange for clean energy such as wind and solar power?






View all Polls

Run Polls on your site. Click here

Run Surveys on your site. Click here
 
Store Download FAQs Contact Us Support Programming Policies  
Miscellaneous     List of Categories

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

  2. How do I make a link void of any action?

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

  4. How do I hide select menus when using layers?







  1. 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 of Page



  2. 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 of Page



  3. 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 of Page



  4. How do I hide select menus when using layers?

    When using div tags that scroll in any direction, select menus or drop down menus, and in some cases other form fields, remain at the top most layer of the rendered page, or above layers and div tags. This is true for for Internet Explorer 6 and earlier anyway. The latest version of Firefox, and the Mozilla engine (which also powers Netscape and a few other browsers) does not inherit this problem.

    There are two methods you can use to solve the problem of select menus above layers in Internet Explorer. Between the two, you should be able to form a solution for your layers below select menu problem.

    1. Use an <iframe> tag. iframes are rendered even higher than select menus in the layer array. So you could create an empty iframe inside your div tag, set it's position to absolute, and it's z-index to -1. Then, create a nested div tag inside your outer layer and set it's position to absolute also, but it's z-index to 1 or greater. Then position it's left and top co-ordinates so that it rests above the iframe. Here's an example of the code you could place inside your layer to cover select menus, form elements and possibly all other elements:

    <iframe width="890" height="550" style="position: absolute; top 0px; left: 5px; z-index: -1;" frameborder="0"></iframe>

    Then position the elements of your layer, in a nested layer, so they rest above the iframe, like such:

    <div style="position: absolute; z-index: 2;">

    Your layer's elements here.

    </div>

    The above solution will cover all form elements in IE.

    2. Hide all select menus by changing their visibility from visible to hidden, then back again as required. Here's an example of how to hide all select menus found on a page and how to restore them, so that your layer's content can appear uninterupted. You'd call the first function to hide all select menus, and the second to restore their visibility.

    <script>
    function hideSelect(){
     for (var i = 0; i < document.all.length; i++) {
      o = document.all(i);
      if (o.type == 'select-multiple') {
       if (o.style) o.style.display = 'none';
      }
      if (o.type == 'select-one') {
       if (o.style) o.style.display = 'none';
      }
     }
    }

    function restoreSelect(){
     for (var i = 0; i < document.all.length; i++) {
      o = document.all(i);
      if (o.type == 'select-one') {
       if (o.style) o.style.display = '';
      }
      if (o.type == 'select-multiple') {
       if (o.style) o.style.display = '';
      }
     }
    }
    </script>


    Top of Page



Speed Search our site

Search script for your site
Survey Software
Create your own fully customized web based Surveys. Only $39.00
Linux Hosting Plans from $9.12 per month, includes Plesk Control Panel, MySQL databases, cgi-bin, crontab manager and 50 email accounts.
Mailing list management made easy

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

Global Warming
Your energy bills doubled in exchange for clean energy such as wind and solar power?






View all Polls

Run Polls on your site. Click here
About us | Contact us | Script FAQs | Script Support | Website Hosting | Our Policies | Store | Testimonials
Subscribe to our periodical newsletter and receive notifications of Perl Script updates, new CGI Script releases and Special discounted offers. Existing Subscribers log in here.    
HTML Plain text
©1999 - 2008 All content Copyright PerlScriptsJavaScripts.com Proudly hosted by LinuxHostingPlans.com