Home | Contact Us | Log In | Help
HOME NEW LISTING MOST POPULAR HIGHEST RATED SCRIPTS ADD SCRIPT DOWNLOADS FORUM
Tutorials
  ASP.Net & C#
  ASP
  Perl and PHP
  Java Scripts
  C and C++
  Ajax Tutorials
  J2ee, J2Me, Java
  Python & Ruby Rail
  Crystal Report
  Sap
  CGI
  XML
  Cold Fusion & CFML
  HTML, DHTML & CSS
  Dreamweaver
  FLASH
  Photoshop/Web Designing
  Tools & Utilities
  Oracle/D2K
  Sql Server
  MySql
  Domain Name Registration
  Remotely Hosting
  Web/Server Application
  Hotel Marketing
  Internet and Law
   Search Engine Optimization/SEO
E-Commerce
Interview Questions
previous< 10 11 12 13 14 15 16 17 18 > Next
JAVA SCRIPT 14
Flip Menu (v 5.0)

Flip Menu creates a collapsible menu tree out of an ordinary HTML list! It consists of just one external .js file, in which you specify settings such as whether to persistence the menu state (using cookies), the images used to replace the default list bullets, and if any previously open branches should be closed when the current one is open. Very nice

Opening windows with JavaScript

One of the most useful (and quite possibly the most abused) features of JavaScript is its ability to manipulate browser windows. It can be very handy for creating a pop-up navigation window, or for making snappy websites with no menus or button bars (see one of our PageKits, filmstar, for an example of the latter).

Multiple pop-up windows can be a real pain, especially now that certain free web space companies are getting in on the act as a method of advertising, so go easy on them. A good rule of thumb is: if you're opening two new windows, you're opening one too many!

Shuffling the numbers in an Array

OK, the next thing we want to do is shuffle our numbers up. Once the numbers are shuffled up, we can just peel off the first six for our lottery numbers. Again, we'll use arrays inside loops to do this for us.

The code that shuffle the numbers up might be a tad complex at this stage of your programming career. The code is this:

Restricting access of JavaScript libraries to designated domains

Just to refresh our memories, "myscript.js" should contain the script itself minus the surrounding <script></script> tags, and saved as a text file (but with .js extension).

Now, the nature of JS libraries means that they're not only accessible by your site/domain, but anyone's. Like an image, a library could potentially be utilized by any site that decides they like your script but not the bandwidth associated with it. Specifically, they would simply use a syntax like the following on their page:

Screen Resolution Detection

Newer browsers allow you to detect the user's screen resolution using the screen.width and screen.height properties. This can be a helpful way to send viewers to the right version of your page, depending on their computer's screen resolution.

The properties hold the values of the pixel length of the width and height of the viewer's screen. For example, you could send the viewer an alert when a link is clicked that gives the screen resolution:

<A HREF="javascript:alert('Your resolution is '+screen.width+'x'+screen.height);"> Click for your screen resolution</A>

previous< 10 11 12 13 14 15 16 17 18 > Next
  Copyright 2000-2006 © SoloScript.com, All rights reserved.