Javascript Question

Well, I have a series of images that are going to be placed in an IFRAME. I want to make a button (not in the IFRAME) that will change the IFRAME without having to reload the buttons. I figure i need javascript for that. I know I could do this in flash, but I don’t really want to use any flash elemnts for this site… if you need more information let me know…

Well if your buttons are not in the iframe, and you are changing yoru iframe, then there is no reason to refresh your buttons right?

Then you can use a link like…

<A TARGET="iframename" HREF="page.html">LINK</A>

yeah i didn’t include enough information. They are like a forward and a back button that cycle thru the images.

OHHH, well that would be more difficult then.

Well if it helps…

<A HREF="javascript:history.forward()">Go Forward</A>
<A HREF="javascript:history.back()">Go Back</A>

These act like the browsers back and forward buttons. You can try and work something out with them.

I will see what I can come up with as well :slight_smile:

Well it wouldn’t be the history, it would be loading images into the IFrame. I don’t want to have to reload the entire page for the users sake

the code on a flash button would look something like this…


on(press){
ii++
loadMovie("http://www.livetoskateboard.com/curious/myImage"+ii+".jpg" ,  "_root.targetMC")
}

and


on(press){
ii--
loadMovie("http://www.livetoskateboard.com/curious/myImage"+ii+".jpg" ,  "_root.targetMC")
}

Well it would allow you to go back and forth through the images.

If you want to load the images directly without having them be a different page… that will get more difficult :-\

I will see what I can do though… I will work on it later.

Is there any AS on the frame?

If so, that would help me out too.

Nah, I lost ya. Lol… I mean, I don’t want to use Flash. I’m just giving an example of what the AS would look like. I know its possible to do in Javascript, I have seen it done with functions and the like…Don’t worry about it. I’ll just use Flash. Just publish it as Flash 5. Thanks anyway Beta…

No, I think I can come up with a javascript way.

I just need to use Arrays and have it go back and forth through the array.

The only thing I might not be able to do is load it through the iframe, I am not sure though, I might be able to figure it out.

eh, I can use flash. not a big deal. Not even a deal. I just didn’t want to have to use an excessive amount of flash. This will be work for monday…thanks anyway Lost…

Yeah, I kinda couldn’t get it to work right.

I have never done one before so I don’t know exactly what to do. I might work it a bit this weekend (it would give me practice in Javascript).

If you want to see what I came up with after giving up on your thing it can be seen here (yes, I know, it is totally different in everywhere, but I got back to working in DHTML)…

Build Blocks Spiral Experiment It should work in both IE and Netscape (it does for me).