Headline Script West Virginia

Today we wrap this up the headline script.

Local Companies

Computer Consumer Consultants
(304) 339-2172
Valley Head, WV
Huntington Technology Group Inc
(304) 697-6773
Huntington, WV
Essential Software
(304) 766-9700
339 12th St
Dunbar, WV
Integrated Computer Systems Inc
(304) 744-5566
109 A St
Charleston, WV
Weston Enterprises
(304) 743-0663
Milton, WV
UB-04software.com
1.8668292763
UB-04 Software
Richmond, WV
Vertex Technology Management Inc
(304) 876-9347
Charles Town, WV
Teknetix
(304) 424-9400
2501 Garfield Ave
Parkersburg, WV
Shenandoah Systems Corporation
(304) 258-4713
RR 522
Berkeley Springs, WV
Sam's Silver Shop
(304) 339-2172
Valley Head, WV

provided by: 
Originally published at Internet.com



Bonjour...

Today we wrap this up. Let them click, I say!

The Script's Effects

-----------------------------------

Here's the Code

Now that all the values are set, we can trigger the function that makes the link occur. In the IE version of the script, the onClick is within the text box. In the Navigator version, the onClick is in a button. Either way, both trigger a function called goTo(inlocation).

Now, you'll notice that inside the parantheses of the function is the variable we just set, "inlocation". That variable represents the URL of the headline currently displaying in the visible text box.

Now, let's take a look at the function goTo(). You'll find it up high in the script just below the the two functions chngNext() and chngPrev()

function goTo(newURL) { self.location.href=newURL; }

What the author is doing here is passing a specific value to the fuction. The first line of the function has the variable "newURL" inside its instance. When the user clicks the button or the text box to go to the headline, the variable "inlocate" is passed to this function.

When the function runs, the value of "inlocate" is transferred and is now given the variable name newURL. By doing it that way, the "inlocate" value can now be used within the goTo() function. It just has to be called "newURL" inside the function.

The only line in the function forces a link to be made:

self.location.href=newURL;

The location the browser will link to is "newURL", which is the value passed to the function as "inlocate" which was the value created in the headMack() function.

It's a long way to go - but effective.

Well, there you go. Another script broken down. Next week we'll get into a password script and some JavaScript tricks to hiding the password in the code.

Next Time: New Script: Passwords

Author: Joe Burns

Read article at Internet.com site

Featured Local Company

UB-04software.com

1.8668292763
UB-04 Software
Richmond, WV


Topics: 
Architecture & Design Languages & Tools Project Management Web Services
Database Microsoft & .NET Security Wireless
Java Open Source Techniques XML