leaded
09-29-2003, 06:20 PM
I'm sorry but I want to start out by saying I'm a huge newb. The only JavaScript I've done was some basic stuff my senior year of high school, which was almost 3 years ago.
One of the simple things I did was have and image slideshow thing where if you click a link the img changes.
I want to do something similiar but I'm having a tough time because it's text.
I have an array (which I'm postive works) with 4 variables set by the array, with each variable containing a sentence or two.
When the page loads I've got it so it loads to the first array variable, so something like
document.write(text[0])
(*I might be forgetting apotrophies or something, I'm writing during a class*)
and it works.
What I want to happen, is if you click on a link on the page, it turns into
document.write(text[1])
You get the idea I hope.
On the exercise I did in high school I had it so in the 'a' HTML tag's onmouseclick ran a function that changed the name of the image to what I wanted it to be.
Well, with this, I can't change the 'p' HTML tag, or can I?
Basically I'm stuck, can't do it, and I'm a huge newb so I don't know how.
If you'd like me to copy and paste my current code, please let me know and I'll do it the next time I hope on my computer.
Thanks in advance for the help!
One of the simple things I did was have and image slideshow thing where if you click a link the img changes.
I want to do something similiar but I'm having a tough time because it's text.
I have an array (which I'm postive works) with 4 variables set by the array, with each variable containing a sentence or two.
When the page loads I've got it so it loads to the first array variable, so something like
document.write(text[0])
(*I might be forgetting apotrophies or something, I'm writing during a class*)
and it works.
What I want to happen, is if you click on a link on the page, it turns into
document.write(text[1])
You get the idea I hope.
On the exercise I did in high school I had it so in the 'a' HTML tag's onmouseclick ran a function that changed the name of the image to what I wanted it to be.
Well, with this, I can't change the 'p' HTML tag, or can I?
Basically I'm stuck, can't do it, and I'm a huge newb so I don't know how.
If you'd like me to copy and paste my current code, please let me know and I'll do it the next time I hope on my computer.
Thanks in advance for the help!