Display and Reset

Now that we know which button was clicked and which headline number should be displayed, we need to display what is called and then reset all the values.

provided by: 
Originally published at Internet.com


How you doin'?

Now we know which button was clicked and which headline number should be displayed. Now we need to display what is called for and then reset all the values so that we're ready for the next time the user clicks.

The Script's Effects

----------------------------------- Here's the Code

It time for headMach() part two. We know the number of the headline currently in the text display. We've either increased that number by one or taken it down by one depending on which button the user clicked. Now, let's get the display and reset the values:

if (headShow == 1) { var _head = "first headline"; var inlocat = "firstlocation.html"; } if (headShow == 2) { var _head = "second"; var inlocat = "secondlocation.html"; } if (headShow == 3) { var _head = "third"; var inlocat = "thirdlocation.html"; } if (headShow == 4) { var _head = "and so 4orth"; var inlocat = "fourthlocation.html"; } document.headline.headHere.value = _head; document.headline.nowShowing.value = headShow; document.headline.shownext.value = "N"; document.headline.showprev.value = "N"; document.headline.inlocation = inlocat; We already know there are four headlines. We set that at the top of the function. So we need to now offer the actual text and links associated with each headline number...

Read article at Internet.com site
Regional Articles
Related Articles
- Diary of a Web Developer: Fork in the Road
Our intrepid advice columnist tackles a user's inquiry on building a Web interface in Perl that will launch an offline job on the server. There are two approaches. Get the code for using the fork and exec methods.
- Get It To The Text Box
- Create the Clock
- So You Want to Resize Your Window, Huh?
- Using Colored Text
- Classification Properties
- Use Perl to do math
- Programming with C# - - 101
- Dates and Times
- Drop-down Display

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