HTML Goodies: Script Tip: Week 72
How to Help Your Business Become an AI Early Adopter
Today we wrap this up. Let them click, I say!
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()
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:
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.
Next Week: New Script: Passwords
Do YOU have a Script Tip you'd like to share? How about suggesting a Script Tip to write about? I'd love to hear it. Write me at:
IT Solutions Builder TOP IT RESOURCES TO MOVE YOUR BUSINESS FORWARD
Which topic are you interested in?
What is your company size?
What is your job title?
What is your job function?
Searching our resource database to find your matches...