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< 1 2 3 4 5 6 7 8 9 > Next
JAVA SCRIPT 5
The document Title Property

The Title of a web page appears at the very top of the browser window. You set it by typing some text between the two <TITLE> tags. You can use JavaScript to either get the Title or to set a new one. Here's a script that pops up the Title in an alert box. Try it out and see it in action:

Mouse Rollover Effect

In the most common form, a rollover consists of an image serving as a hypertext link. While the mouse pointer is over the image, it changes appearance to attract attention to the link. For example, you could add a glow effect, a drop shadow or simply change the background color. The onMouseOver and onMouseOut events are used for rollovers. Images are preloaded to avoid delays in transmission.Here is an example of the JavaScript functions which can be placed in the document head section or saved as a separate .js file:

Conditional Compilation of JScript/ JavaScript in IE

In IE, there is a little known feature called conditional compilation. Supported since IE4, this feature starting getting some attention when it began showing up in some Ajax related JavaScripts. An absolute form of object detection, conditional compilation lets you dictate to IE whether to compile certain parts of your JScript or JavaScript code depending on predefined and user defined conditions. Think of it as conditional comments for your script that can also be molded to work gracefully with non IE browsers as well.

JavaScript If...Else Statements

Very often when you write code, you want to perform different actions for different decisions. You can use conditional statements in your code to do this.

In JavaScript we have the following conditional statements:

if statement - use this statement if you want to execute some code only if a specified condition is true

if...else statement - use this statement if you want to execute some code if the condition is true and another code if the condition is false

if...else if....else statement - use this statement if you want to select one of many blocks of code to be executed

switch statement - use this statement if you want to select one of many blocks of code to be executed

FUNCTIONS

Instead of just adding your javascript to the page and having the browser perform the tasks as soon as the script is read, you might want your javascript to be performed only upon the detection of a certain event.

For example, if you made a javascript code that changed the background color of the page when the user clicked a button, then you would need to tell the browser, that the script should not be performed right away when loaded.

To keep the browser from performing a script as soon as it is loaded you need to write the script as a function.

previous< 1 2 3 4 5 6 7 8 9 > Next
  Copyright 2000-2006 © SoloScript.com, All rights reserved.