View Full Version : Javascript Question
Jubba
November 8th, 2002, 10:39 AM
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...
lostinbeta
November 8th, 2002, 12:20 PM
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>
Jubba
November 8th, 2002, 12:45 PM
yeah i didn't include enough information. They are like a forward and a back button that cycle thru the images.
lostinbeta
November 8th, 2002, 02:36 PM
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 :)
Jubba
November 8th, 2002, 03:31 PM
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")
}
lostinbeta
November 8th, 2002, 03:35 PM
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.
lostinbeta
November 8th, 2002, 03:36 PM
Is there any AS on the frame?
If so, that would help me out too.
Jubba
November 8th, 2002, 03:46 PM
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...
lostinbeta
November 8th, 2002, 03:48 PM
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.
Jubba
November 8th, 2002, 11:26 PM
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...
lostinbeta
November 8th, 2002, 11:56 PM
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 (http://www.8ballcreations.com/lostinbeta/experimental/blocks.html) It should work in both IE and Netscape (it does for me).
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.