Text Link Ads

Showing posts with label JavaScript. Show all posts
Showing posts with label JavaScript. Show all posts

Saturday, June 9, 2007

Server Side Programming Languages

By: dave

Server-side programming languages are scripts that are executed on the server, and are then translated into HyperText Markup Language (HTML) which can be viewed by all web browsers. The two most popular server-side scripting languages are PHP: Hypertext Processor and Active Server Pages (ASP). Additionally, there are numerous other languages like AJAX and Coldfusion.

PHP can run on both Unix and Windows servers, which makes it more accessible than its Windows counterpart, Active Server Pages (ASP). Most full-service web design firms will have at least one PHP guru.
PHP uses are widespread, and can include any kind of server functionality that takes user's input and displays or manipulates the input. Some pertinent examples of such work are message boards, auction sites, shopping carts, and more. There are numerous free (open-source) scripts out there for PHP newbies to use. This synopsis is meant to serve only as a gateway to other works; although the main goal is to give a reader enough information so they can make educated decisions about what their web developer should do. For those looking to get into PHP, there are many free tutorials and primers out there: http://www.4webhelp.net/tutorials/php/basics.php is a pertinent example.
PHP generally uses the mySQL database system. MySQL is a server-side system that is included on many Unix, and some Windows servers.

On the other hand, Active Server Pages runs - for the most part - solely on Windows servers. This can cause some problems. Windows hosting or private servers generally cost more than Unix servers, making it less accessible than PHP. Like PHP, ASP can do just about anything. There are considerably fewer open-source scripts written in ASP, another testament to its inaccessibility.
For those interested in ASP, here's a great free tutorial: http://www.w3schools.com/asp/default.asp.

ASP can use many different database systems. Many users prefer Microsoft Access. Access, unlike MySQL, offers a what-you-see-is-what-you-get (WYSIWYG) editor as part of Microsoft's Office suite. In fact, you may already have a copy of Microsoft Access on your computer and not even know it. Its uses aren't limited to databasing, it's also used as a basic spreadsheet application for those who need a more programmer-friendly environment than Excel. ASP can also work well with MSSQL or MySQL.

A third programming language with burgeoning popularity is Asynchronous Javascript and XML. AJAX, as it's commonly referred to, creates interactive web programs just like its cousins ASP and PHP. AJAX uses XHTML and CSS, along with the Javascript Document-Object Model to create interactive pages designed for speed and overall usability. Although AJAX hasn't gained the acclaim of PHP and ASP, its future is certainly bright.
AJAX Basics - http://dhtmlnirvana.com/ajax/ajax_tutorial/

It's difficult to say which of the three programming languages, or the numerous others for that matter, is the best. There will always be disputes, and no standard is set. With the varying interpretations of what a programming language should be, predilections to PHP or ASP arise. PHP is certainly more widely used, but isn't necessarily the best. When a site is being created to be interactive, a professional can give an educated opinion on which technology should be used.




Get custom programming done at GetAFreelancer.com!

Thursday, June 7, 2007

Some Useful JavaScript Tricks

by: Mitchell Harper

JavaScript can be one of the most useful additions to any web page. It comes bundled with Microsoft Internet Explorer and Netscape Navigator and it allows us to perform field validations, mouse-overs images, open popup windows, and a slew of other things.

In this article I will show you how to:

- Display the browser name and version number
- Change the text in the status bar of the browser
- Use an input box to get text from the user
- Use a message box to display text to the user
- Change the title of the browser window

Before that, however, we need to know how to setup our web page
so that it can run the JavaScript. JavaScript code is inserted between opening and closing script tags: <script> and </script>, like this:

<script language="JavaScript">

// JavaScript code goes here

</script>

These script tags can be placed anywhere on the page, however
it's common practice to place them between the <head> and </head>
tags. A basic HTML page that contains some JavaScript looks like this:

<html>
<head>
<title> My Test Page < itle>
<script language="JavaScript">

function testfunc()
{
var x = 1;
}

</script>
</head>
<body>
<h1>Hello</h1>
</body>
</html>

For the examples in this article, you should use the basic
document format I have just shown you, inserting the JavaScript
code between the <script> and </script> tags. When you load the
page in your browser, the JavaScript code will be executed
automatically.

-----------------------------------------------
Displaying the browsers name and version number
-----------------------------------------------

The "navigator" object in JavaScript contains the details of the
users browser, including its name and version number. We can
display them in our browser using the document.write function:

document.write("Your browser is: " + navigator.appName);
document.write("
Its version is: " + navigator.appVersion);

I run Windows 2000 and Internet Explorer version 6, so the output
from the code above looks like this in my browser window:

Your browser is: Microsoft Internet Explorer
Its version is: 4.0 (compatible; MSIE 6.0b; Windows NT 5.0)

-----------------------------------------------
Changing the text in the status bar of the browser
-----------------------------------------------

To change the text in the status bar of a browser window, we just
change the "status" member of the "window" object, which
represents our entire browser window:

window.status = "This is some text";

-----------------------------------------------
Using an input box to get text from the user
-----------------------------------------------

Just like in traditional windows applications, we can use an input box to get some text input from the user. The "prompt"
function is all we need:

var name = prompt("What is your name?");
document.write("Hello " + name);

The prompt function accepts just one argument (the title of the
input box), and returns the value entered into the text box. In the example above, we get the users name and store it in the "name" variable. We then use the "document.write" function to output their name into the browser window.

-----------------------------------------------
Using a message box to display text to the user
-----------------------------------------------

We can display a message box containing an OK button. These
are great when you want to let the user know what is happening
during their time on a particular page. We can use a message box
to display the "name" variable from our previous example:

var name = prompt("What is your name?");
alert("Your name is: " + name);

The "alert" function takes one argument, which is the text to
display inside of the message box.

-----------------------------------------------
Changing the title of the browser window
-----------------------------------------------

To change the title of our web browser's window, we simply modify
the "document.title" variable, like this:

document.title = "My new title";

One bad thing about the "document.title" variable is that we can only manipulate it in Microsoft Internet Explorer. Netscape's implementation of JavaScript doesn't allow us to modify it.

-----------------------------------------------
In Closing
-----------------------------------------------

As you can see from the examples in this article, JavaScript is a powerful scripting language that we can use to enhance our visitors experience with our site. You shouldn't use JavaScript too much, however, because in some cases it can annoy your visitors and send them packing before your site even loads!

Interactive Forms

by Brian Zimmer

Why interactive forms?

Forms are easy enough to create when they are simple, like

search boxes. But what if you need them to be complex? How
about changing the forms based on input by the viewer? This
is where interactive forms using Javascript and HTML can
help. I'll use a simple example on how interactive forms can
be useful.

The problem

I am going to use a business project as an example to teach

interactive forms. Imagine that we are creating a ordering
system for flowers. We would like the customer to be able to
order a bouquet of flowers. The customer can choose to have
any number of flowers in the bouqet from 1 to 6. For each
flower, the customer can choose a type of flower, and there
are 3 different kinds of flowers. Now imagine all these
options as a regular form. There would be 18 options to
choose from, even if you only wanted one flower! This would
be ugly! In this tutorial we will learn how we can show and
hide form elements depending on the input by the customer.
Now let's get started!

Creating the interactive form

-HTML

We are going to create a page where you can enter the

information for ordering flowers. We've decided on having a
drop down menu to select the number of flowers, and then for
the number selected, display that number of options to
choose the type of flower. We'll start by creating the HTML
forms. First we will write the html code for the form.

<select id='numflowers'>

<option value='0'>Number of Flowers
<option value='1'>1
<option value='2'>2
<option value='3'>3
<option value='4'>4
<option value='5'>5
<option value='6'>6 </select>

This will create a menu.

Next we need to create the form where the customer will

choose the type of flower they would like. We will let them
choose between a red rose, a white rose, and a yellow rose.
I am going to use radio buttons for the selection. Here is
the code:

<input type="radio" name="color1" value="red">Red

<input type="radio" name="color1" value="white">White

<input type="radio" name="color1" value="yellow">Yellow


For this tutorial, I assume you have a basic knowledge of

HTML. All of these pages still need mandatory tags, but I
left them out because of the size they would take up. Notice
how I made all the options the same name. This is so they
are grouped together, and only one option can be choosen.

This is what it will look like: 0 Red 0 White 0 Yellow

Duplicate this code 6 times, for each of the flower. But

every time you see "color1", change that to a different name
so they are all seperate. I will use "color1", "color2",
"color3", and so on.

Now we need to put all of this together into an ordering

form. But we need to add something so that the forms can
disappear. We will add <div> tags around each of the flower
type selection rows. Enter the following code around each of
the groups of options. Make sure that for each one, you
label the id tag for the <div> differently. For example, the
first group will start with <div id="divColor1", the second
will start with <div id="divColor2", and so on. THIS IS
IMPORTANT. When we pass variables onto the script, the only
thing that should change between the name of the <div> tags
should be the number. This is because we will use a loop to
go through all the numbers. We will pass through the name of
the <div> tags to the javascript script, and the script will
add the numbers.

<div id='divColor1' style="display: none;">

Choose type of flower 1:


<input type="radio" name="color1" value="red">Red

<input type="radio" name="color1" value="white">White
<input type="radio"

name="color1" value="yellow">Yellow
</div>

Now we have each option groups surrounded by a <div> tag.

This will allow us to change their visibility with
javascript. I have put <div> tags around the options, and
added a submit button. Note: when adding <div> tags inside a
table, make sure they are contained within a <td> cell.
Something like <table><div><tr><td>< d>< r></div>< able>
will not work for the same reason that adding text outside
of <td> cells inside a table doesn't work. If the stuff
inside the <div> tag is showing up, tables may be your
problem. To fix this, either don't use tables, or create an
entire seperate table for the information inside the <div>
tag. Here is the code:

<h3>Flower Order Form</h3>

<form action="processorder.php" method="post">
Select how many flowers you would like:

<select id='numflowers'>

<option value='0'>Number of Flowers
<option value='1'>1
<option value='2'>2
<option value='3'>3
<option value='4'>4
<option value='5'>5

</select>

<div id='divColor1' style="display: none;">

Choose type of flower 1:


<input type="radio" name="color1" value="red">Red

<input type="radio" name="color1" value="white">White

<input type="radio" name="color1" value="yellow">Yellow

</div>

<div id='divColor2' style="display: none;">

Choose type of flower 2:


<input type="radio" name="color2" value="red">Red

<input type="radio" name="color2" value="white">White

<input type="radio" name="color2" value="yellow">Yellow

</div>

<div id='divColor3' style="display: none;">

Choose type of flower 3:


<input type="radio" name="color3" value="red">Red

<input type="radio" name="color3" value="white">White

<input type="radio" name="color3" value="yellow">Yellow

</div>

<div id='divColor4' style="display: none;">

Choose type of flower 4:


<input type="radio" name="color4" value="red">Red

<input type="radio" name="color4" value="white">White

<input type="radio" name="color4" value="yellow">Yellow

</div>

<div id='divColor5' style="display: none;">

Choose type of flower 5:


<input type="radio" name="color5" value="red">Red

<input type="radio" name="color5" value="white">White

<input type="radio" name="color5" value="yellow">Yellow

</div>

<div id='divColor6' style="display: none;">

Choose type of flower 6:


<input type="radio" name="color6" value="red">Red

<input type="radio" name="color6" value="white">White

<input type="radio" name="color6" value="yellow">Yellow

</div>



<input type="submit" value="Next Step">
</form>

We used css to hide the <div> tags. The next step is to use

javascript to show and hide each of the <div> cells
depending on what is selected in the drop down menu. We will
start out by making a javascript function, then I will
explain the code and link it up with the drop down menu.
Javascript

We are going to create a function that will show and hide

the <div> cells. There are 3 things we need to pass onto the
script: the number of total options, the name prefix for the
<div> tags, and the number of options(to end the loop). Here
is the script that I wrote:

<script language="JavaScript">

function ShowMenu(num, menu, max)
{
//starting at one, loop through until the number chosen
by the user
for(i = 1; i <= num; i++){
//add number onto end of menu
var menu2 = menu + i;
//change visibility to block, or 'visible'
document.getElementById(menu2).style.display
= 'block';
}
//make a number one more than the number inputed
var num2 = num;
num2++;
//hide menus if the viewer selects a number lower
/ his will hide every number between the selected number
// and the maximum
//ex. if 3 is selected, hide the <div> cells for 4, 5,
//and 6
//loop until max is reached
while(num2 <= max){
var menu3 = menu + num2;
//hide
document.getElementById(menu3).style.display = 'none';
//add one to loop
num2=num2+1;
}
}
</script>

Add this code inside the <head> section of your page. Now we

have one less step; to call the function from the drop down
box. Here is the code to do that:

ShowMenu(document.getElementById('numflowers').value,'divCo

<select id='numflowers' onChange="javscript: lor', 6);">
<option value='0'>Number of Flowers
<option value='1'>1
<option value='2'>2
<option value='3'>3
<option value='4'>4
<option value='5'>5
<option value='6'>6

</select>

What this does is when the value is change, it will pass on

the value, the name prefix of the <div> cells, and the
number of <div> cells. In the first part, make sure the
getElementById('numflowers') matches the 'id' attribute in
the <select> tag.

That's it! You can use this javascript function for

anything, the only things you have to change are the name
prefixes and number of <div> cells, and the id of the select
tag. Using onChange, you can use a group of radio buttons or
a checkbox instead.

Here is the final code:

<html>
<head>
<title>Flower Order Form< itle>
<script>
function ShowMenu(num, menu, max)
{
//starting at one, loop through until the number
//chosen by the user
for(i = 1; i <= num; i++){
//add number onto end of menu
var menu2 = menu + i;
//change visibility to block, or 'visible'
document.getElementById(menu2).style.display = 'block';
}
//make a number one more than the number inputed
var num2 = num;
num2++;
//hide it if the viewer selects a number lower
/ his will hide every number between the selected
//number and the maximum
//ex. if 3 is selected, hide the <div> cells for
//4, 5, and 6
//loop until max is reached
while(num2 <= max){
var menu3 = menu + num2;
//hide
document.getElementById(menu3).style.display = 'none';
//add one to loop
num2=num2+1;
}
}
</script>
</head>

<body>

<h3>Flower Order Form</h3>
<form action="processorder.php" method="post">
Select how many flowers you would like:

<select id='numflowers'

onChange="javscript:
ShowMenu(document.getElementById('numflowers').value,
'divColor', 6);">
<option value='0'>Number of Flowers
<option value='1'>1
<option value='2'>2
<option value='3'>3
<option value='4'>4
<option value='5'>5

</select>

<div id='divColor1' style="display: none;">

Choose type of flower 1:


<input type="radio" name="color1" value="red">Red

<input type="radio" name="color1" value="white">White

<input type="radio" name="color1" value="yellow">Yellow

</div>

<div id='divColor2' style="display: none;">

Choose type of flower 2:


<input type="radio" name="color2" value="red">Red

<input type="radio" name="color2" value="white">White

<input type="radio" name="color2" value="yellow">Yellow

</div>

<div id='divColor3' style="display: none;">

Choose type of flower 3:


<input type="radio" name="color3" value="red">Red

<input type="radio" name="color3" value="white">White

<input type="radio" name="color3" value="yellow">Yellow

</div>

<div id='divColor4' style="display: none;">

Choose type of flower 4:


<input type="radio" name="color4" value="red">Red

<input type="radio" name="color4" value="white">White

<input type="radio" name="color4" value="yellow">Yellow

</div>

<div id='divColor5' style="display: none;">

Choose type of flower 5:


<input type="radio" name="color5" value="red">Red

<input type="radio" name="color5" value="white">White

<input type="radio" name="color5" value="yellow">Yellow

</div>

<div id='divColor6' style="display: none;">

Choose type of flower 6:


<input type="radio" name="color6" value="red">Red

<input type="radio" name="color6" value="white">White

<input type="radio" name="color6" value="yellow">Yellow

</div>



<input type="submit" value="Next Step">
</form>

</body>

</html>

Thats all! Have a great day!

How to test for the Javascript DOM?

by Ivan Petrenko

Minsk, Belarus, October 11, 2005 -- Software development company Scand released its new product - dhtmlxMenu v1.0.


This JavaScript menu enables web developers to design and edit a simple DHTML menu in a very convenient way.


dhtmlxMenu has cross-browser support, so it can be used for sites and web applications that are supposed
to run under different OS. The menu is compatible with all main web browsers for Windows, Linux, Unix and Mac OS.


This JavaScript menu has XML support that gives possibility to build menus dynamically from XML file or database.
Any complex menu structure can be generated using a simple XML code. Menu appearance can be easily changed
dynamically without requiring the web page to be reloaded. Powerful client-side API allows changing the menu
state "on-the-fly" with external JavaScript code.


dhtmlxMenu is highly customizable. This JavaScript component provides an easy way to create pop-up or drop
down menus of any configuration. dhtmlxMenu can also be used as a right-click context menu.


Skinable design allows web developer to change visual appearance of the menu so it matches different
styles, e.g. Windows or Mac OS style. This DHTML menu also has such useful feature as vertical scrolling of
items
. Above all, the menu has high functional stability and performance.


dhtmlxMenu v1.0 is free for non-commercial use (GNU General Public License - GPL) and can be downloaded
from JavaScript Menu Homepage. In order to use dhtmlxMenu in commercial projects,
there is a possibility to purchase the Commercial license ($49 - 3 months of support period).


About Scand LLC

Scand LLC is software development company based in Belarus (Eastern Europe).
The company delivers offshore outsourcing software development services supplied by the best quality,
timeliness and creativity. Scand LLC offers some advanced ready to use Java applets and JavaScript
components that are available for download on Scand Website.

Using External JavaScript Source Files


By now most web designers and developers know that JavaScript causes a real headache for search engine spiders.

There are however a number of scripts which, whilst not absolutely
essential to the functioning of a site, are nevertheless very handy.


So where do you draw the line between keeping your page as search
engine friendly as possible and including reams of JavaScript to
achieve the desired effects?


You may be surprised to learn that there is an alternative which keeps
search engine spiders (reasonably) happy whilst drastically cutting
down on the necessary scripts within any given web page.


External JavaScript Source Files

Let's take the humble "Add Bookmark"
script as an example (please note that I have replaced the < >
brackets with [ ] brackets so as to be able to display the code
properly within this article).


[script Language="JavaScript1.2" type="text/javascript"]

var bookmarkurl = "http://www.doodademporium.com";

var bookmarktitle = "Purple Doodads for sale";

function addbookmark()

{

if (document.all)

window.external.AddFavorite(bookmarkurl, bookmarktitle);

}

[/script]


By placing the script's function into an external folder and file
(/java/bookmark.js for example) you will be able to streamline your
code down to the following:


[script Language="JavaScript1.2" src="java/bookmark.js" type="text/javascript"][/script]


It's worth remembering that this is probably one of the simplest
examples of JavaScript out there and that the savings in terms of code
are going to be substantial with larger scripts.

This method is also worth its weight in gold, so to speak, if you are running a number of scripts on the same page.

Just remember to create a different source file for each script, so as not to confuse matters unnecessarily.


Through the use of external JavaScript files you not only save yourself
having to write (or even copy/paste) the same bulky scripts again and
again, you are also saving search engine spiders from becoming
seriously disillusioned with your web page and going elsewhere in
search of easier prey.


Always remember that any web site should make a search engine's life as easy as possible.

If you do use JavaScript in your pages, this approach will prevent
unnecessary complications when having your site indexed, whilst at the
same time easing your task of coding.

Spice Up Your Web Site with JavaScript

by Shelley Lowery

JavaScript is a scripting language designed for use
within a web page and/or on a web server. It is used
to create special effects within a web page. Elements
such as links, images and forms can be manipulated
using this powerful technology.

Unlike CGI scripts, JavaScript can be placed directly
into your HTML code. It can also reside on your server
and be called from a small code within your web page.

This powerful scripting language can be used to create
special effects on your web page such as link effects,
mouseovers, image roll overs, navigational systems
and much more.

Here are a few great scripts to get you started:

Navigation Bar

This script is actually a combination of JavaScript and
HTML better known as DHTML. It will enable you to
have a mouseover navigational menu at the top of
your web page. When you place your mouse over the
main menu, a drop down menu will appear. As you
move your mouse over the drop down menu, each
selection is highlighted. This navigation menu is very
similar to the menu used at Microsoft.com.

http://www.brainjar.com/dhtml/navbar/index.html

Dynamic Splash Screen

If you've ever wanted to set up a splash screen for
your web page, Dynamic Splash Screen will do just
that. Splash pages can be used to tell your visitors a
little bit about your site or whatever you'd like. The
great thing about this script is that it is constructed
using a single page. Once the splash messages have
been completed, the script will navigate to the URL
of your choice. It also includes a link on the splash
page that says, "Skip Intro." Nice effect.

http://www.dynamicdrive.com/dynamicindex3/dynamicsplash.htm

Pausing Up and Down Menu Scroller

This nice little script will enable you to have linked
text that scrolls upwards and will pause between
each message. You can choose to include a
background image and customize the background
color and box size. This script provides a nice way
to announce new additions to your site or whatever
you'd like.

http://www.dynamicdrive.com/dynamicindex2/crosstick.htm

overLIB

Create mouseover popup boxes for your text links.
This great script can be used to include information
about the links, tips or whatever you'd like. It can
create simple mouseover popup boxes or can even
create a popup box that will stay open until the user
wants to close it. The boxes can also be displayed
with or without a caption and colors can be
customized. This is a great little script.

http://www.bosrup.com/web/overlib/

Source Protector

Although this script won't completely protect your
page content, it will deter those wanting to steal
your code. When you right click on your mouse, an
alert box will appear. You can include a message of
your choice.

http://www.javascript-page.com/noclk.html

Right Click Menu

This nifty little script not only helps prevent your code
from being stolen, but it also creates a pop up
navigation menu. When you right click on your mouse,
instead of the browser menu appearing, your menu
will appear. This little menu can contain live links to
other pages on your web site.

http://www.geocities.com/html_4u/rc_menu.html

Banner Rotator

This simple little script will enable you to rotate
banners on your web page. You simply add your
banner information to the code and place this script
within your web page where you'd like your banners
to display. Each time your page loads, a new banner
will be displayed. Great little script.

http://www.javascript-page.com/banrot.html

Daily Tip

This script will enable you to display a daily tip on your
web site. You can program it with tips for the entire
month and they will automatically display each day.

http://www.geocities.com/html_4u/dailytip.html

FairWell Window Launcher

Although popup windows can be irritating, this script
is a little different. It will launch a new window when
your visitor leaves your site. What's great about this
script is that it will only appear the first time someone
visits your web site. If you offer your visitors a free
publication, try placing your subscription information
within this new window. This provides a great way to
increase subscriptions to your publication.

http://wsabstract.com/script/cut65.shtml

Locating JavaScripts:
http://javascript.internet.com/

Locating DHTML Scripts:
http://www.dynamicdrive.com/

Learn more about JavaScript:
JavaScript Learning Center
http://www.javascriptmall.com/learn/contents.htm

Dirty Web Promotion Tricks #1 - Legitimate and Malicious Javascripts

by: Michael

One of the best way to get visitors to further explore your site is to
convince them to set your home page as their Internet start page, or
for them to add you their "Favorites". In this article, we'll examine
some ethical and unethical ways this is done.

Many

sites include legitimate javascripts that allow visitors to easily add
a page to their "Favourites" by clicking on a link. A script to achieve
this would look like something along the lines of:

=======================================================================

SAMPLE Legitimate "BOOKMARKING" SCRIPT:

<script LANGUAGE="JavaScript">

//Free for Redistribution. (C) Michael Bloch from WWW.TAMINGTHEBEAST.NET

//Please do not remove these comments. This script can be use within tables.
//Suitable for most 4+ Browsers. Copy and paste into a text editor first,
//change the YOURSITE details to suit, then paste into appropriate area
//between <body> and </body> tags in HTML. Visit Taming the Beast for a
//wide selection of Web development tools and articles!

if ((navigator.appName == "Microsoft Internet Explorer")

&& (parseInt(navigator.appVersion) >= 4))
{
var url="HTTP://WWW.YOURSITE.COM/";
var title="YOURSITE DESCRIPTION (this will appear on bookmark text)";
document.write('<A HREF="javascript:window.external.AddFavorite(url,title);"');
document.write('<small>Bookmark YOURSITE!</small>
');}

else {
var msg = "Bookmark YOURSITE!";
if(navigator.appName == "Netscape") msg += " - press(Ctrl-D) on your keyboard.";
document.write(msg);
}
</script>
========================================================================

This

script should work well in most 4+ browsers. It is as simple as I could
make it, and was put together using a number of free scripts available
as a reference. There are many other scripts available that allow for
the use of images and status bar text.

In this script:

-

When Netscape is detected, it only displays a message suggesting that
the visitor uses the Ctrl+D command to bookmark the page and the
scripting will not appear in the source code of the page.

- In

Internet Explorer, it will add your homepage to this visitor's
"Favorites" from any page in the site - along with a custom description
you specify in the script.

- Other types of javascript enabled

browsers will only display the suggestion to bookmark (no keyboard
commands as this can vary browser to browser), and the script will not
be displayed in the source code.

Unfortunately, some companies do not use ethical methods to gain a valued place in a visitors Favorites or bookmarks.

On

visiting a web design resource site the other day via a search engine
link, my anti-virus program jumped up and alerted me with the following:

"real-time protection has found that C:WINDOWSTEMPORARY INTERNET FILESCONTENT.IE5S3QFQF0XADVERTS[1].HTM is JS.IEStart trojan."

I

hadn't clicked on anything! This script had been activated simply
through me visiting the page. There were no warnings on the page that
this was going to occur. What the javascript had done was to reset my
"home" page and added entries to "My Favourites"! I examined the script
that had caused it occur and while I won't publish it here for obvious
reasons, I can assure you that it would qualify as a "scumvertising"
tactic.

When restarting IE I found that via an ezine site and

another marketing company (from where the script was called), I was
being redirected to a very well known software companies' home page. In
total, there were 4 companies involved in this particular incident - I
look forward to the responses to the emails I will send them.

If you have had this happen to you, I'd like to know about it.......

The JS.IEStart trojan is also known as VBS.Passon (CA), VBS.PassOn (NAV) VBS/IEstart.gen.

While

it is not destructive, I object strongly to other companies adding
sites to My Favourites and altering the default home page without my
permission or knowledge. If I hadn't had my AV program running in the
background, I probably never would have figured out where this script
came from. I have since then copied the scripts, along with appropriate
screenshots pending further action.

It is an invasive,

disgusting marketing tactic that only serves to irritate visitors; and
it helps give the web marketing industry a bad name. I am sure the
company I was redirected to will be interested in knowing that their
advertising cash is being spent on a marketing firm who uses, in my
opinion, illegitimate means to send visitors to them. It is a waste of
their money as they are recieving traffic that is not targeted - what
is known as "garbage traffic".

To the companies that incorporate

this type of ploy as part of their "bleeding edge" marketing technology
- "may you live in interesting times"! You will be caught out!

It's

bad enough that we have to travel the 'net with our AV programs and
firewalls on "paranoid" mode - do we now have to have "pop up killers"
running all the time as well?

Monday, May 28, 2007

7 Reasons You Should Avoid JavaScript Dynamic Navigation

by Iain Row

Over time many bad web design ideas have been dropped or lost favour, including unnecessary splash screens and unwieldy framesets, for the good of the web user. However, one web design bad habit that persists is the JavaScript Dynamic Navigation. This is bad news for both web users and those looking to commission a web designer to build a site for them. Ultimately if your navigation is broken, so is your site.

The seven top reasons why you should not use JavaScript Dynamic Navigation are:

Site navigation is difficult when navigation is not permanently displayed.

Everyone likes to know where they are going and even where they are! A site with a permanently visible navigation structure meets both of these requirements, but popup or dynamic navigation systems do not. Remembering that Google and the other search engines are as likely to deliver a visitor to a subpage as they are to your home page, a clear navigation structure is essential. Think of it as they "You are here" icon in your local shopping mall's map.

Embedded elements can clash with dynamic navigation

A typical dynamic navigation structure will result in an overlay or pop up/down display. The challenge here is that if your site is media rich (ie contains flash animation or embedded video) these embedded elements will take precedence on the page. The end result is that part of your navigation will be hidden behind these elements making site navigation difficult if not impossible.

Cross browser/platform compatibility issues

As any developer will tell you, since the dawn of the internet, not all browsers are created equal. Some applications will follow a stricter implication of JavaScript than others. The only way to combat this issue is through vigorous testing - something that takes time and money. When you consider how quickly some browsers release code updates you have to be prepared to be in constant test and verification mode.

Usability issues- Dynamic Navigation is not for everyone

Just like menus in Windows or OSX, dynamic navigation structures require good hand/eye co-ordination. Not everyone will be as fast or as accurate as you are when it comes to using a mouse and nested dynamic navigation can be particularly hard to use. Usability studies with elderly users or those new to computers and the internet shows that such nested menus quickly cause frustration and are far from easy to use. Operating systems have addressed this issue by allowing a user to navigate using their arrow keys as well as a mouse but this is a complicated and difficult task to accomplish in JavaScript.

The Experts don't do it

Go and visit your favourite site and then all the big internet names such as Google, Amazon, YouTube, BBC, MSN, Yahoo!, MySpace, eBay, Wikipedia, Craigslist, IMDB, etc, etc. There is a reason that you don't see these sites using dynamic navigation and that's because there are better ways. Any coaching or strategy expert will tell you the secret to success is to model those who are already successful. So if th336e experts don't use dynamic navigation why would you?

You have plenty of other options

One advantage of a dynamic JavaScript navigation structure is that everything is contained in a single script file. Changing any aspect of the whole site's navigation can be achieved by modifying this one file. However, this benefit is not unique to JavaScript. An external xml navigation structure or a range of server-side scripting processes can achieve the same effect and all are capable of outputting standard XHTML without any of the drawbacks listed in this article.

Your site will be broken if JavaScript is turned off!

With increased security awareness and the constant screen invasion by pop-ups many users restrict or even turn off JavaScript settings in their browsers. While this activity is designed to stop the JavaScript based popups, squeeze pages and floating ads, it will render your site inoperable. Statistics from W3Schools show that 10% of the visitors to your site will have JavaScript disabled. As there are plenty of better alternatives to a dynamic JavaScript navigation structure why even risk alienating 10% of your site visitors?