Re: Java script help

From: Jane Here (cibhere_at_yahoo.com)
Date: 09/17/04


Date: Sat, 18 Sep 2004 00:43:40 +1000

An example:

To see our top twenty tips, click Next:
---------------------------------------------------------------------
Tip 5: When boiling eggs, add salt to the water.
Comment 5: Keep eggs cold until needed.
<First> <Prior> <Next> <Last>
---------------------------------------------------------------------

I'd like to fill an array with the tips, and then when the user clicks Next
it shows the next one. When she clicks Prior, it shows the prior one.

Also, I'm curious to know how to write code to do the above with two arrays
(so I can have two lines of text). How would you keep both arrays in synch.
Example: If we display the Tip 5 from the first array, I also want to
display the 5th Comment from the second array. For future flexibility, I
would prefer to have two arrays rather than all in one array.

"Kevin Spencer" <kspencer@takempis.com> wrote in message
news:O2lcLFLnEHA.3196@TK2MSFTNGP10.phx.gbl...
> You'll have to forgive me, as I seem to have trouble interfacing with
> humans. You say you want to "display" text. HOW do you want to "display"
it?
> Perhaps a bit of background about your business requirements would be
> helpful.
>
> --
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> I get paid good money to
> solve puzzles for a living
>
> "Jane Here" <cibhere@yahoo.com> wrote in message
> news:#8XDk8InEHA.4004@TK2MSFTNGP10.phx.gbl...
> > I am trying to understand how Java script works. Can someone help me
with
> > this hopefully straightforward example:
> >
> > I want one page to display different text. I want to put the text into
two
> > separate arrays.
> >
> > Array 1:
> > ---------
> > aContent[0]=Fruit salad
> > aContent[1]=Vegetable pack
> > ...
> > aContent[21]=Meat trays.
> >
> > Array 2:
> > ----------
> > aType[0]=Apples
> > aType[1]=Carrots
> > ...
> > aType[21]=Beef.
> >
> > Note: For the purpose of this example, I want the arrays to be separate.
> >
> > Now on the page I want these buttons:
> > ----------------------------------------------
> > (F)irst (P)revious (N)ext (L)ast
> > and these outputs: Display_Contents Display_Type
> >
> > Initial display show --------------------------------- Fruit
> > alad ---------- Apples
> >
> > User clicks (N)ext.
> > Counter gets incremented by 1
> >
> > So display now shows: ---------------------------- Vegetable
> ack --------
> > Carrots
> >
> > How would I accomplish this in Java script?
> > (I'm using FP2003).
> >
> >
> >
>
>