# Javascript Question

**URL:** <https://forum.kirupa.com/t/javascript-question/7829>\
**Category:** flash\
**Created:** [November 8, 2002, 3:39pm UTC](https://forum.kirupa.com/t/javascript-question/7829 "2002-11-08T15:39:20Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jubba](https://avatars.discourse-cdn.com/v4/letter/j/90ced4/32.png) [@Jubba](https://forum.kirupa.com/u/Jubba)\
**Post date:** [November 8, 2002, 3:39pm UTC](https://forum.kirupa.com/t/javascript-question/7829/1 "2002-11-08T15:39:20Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 8, 2002, 5:20pm UTC](https://forum.kirupa.com/t/javascript-question/7829/2 "2002-11-08T17:20:40Z")

</div>

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…

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

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 8, 2002, 5:45pm UTC](https://forum.kirupa.com/t/javascript-question/7829/3 "2002-11-08T17:45:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 8, 2002, 7:36pm UTC](https://forum.kirupa.com/t/javascript-question/7829/4 "2002-11-08T19:36:32Z")

</div>

OHHH, well that would be more difficult then.

Well if it helps…

```php
<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 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 8, 2002, 8:31pm UTC](https://forum.kirupa.com/t/javascript-question/7829/5 "2002-11-08T20:31:59Z")

</div>

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…

```auto

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

```

and

```auto

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

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 8, 2002, 8:35pm UTC](https://forum.kirupa.com/t/javascript-question/7829/6 "2002-11-08T20:35:09Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 8, 2002, 8:36pm UTC](https://forum.kirupa.com/t/javascript-question/7829/7 "2002-11-08T20:36:35Z")

</div>

Is there any AS on the frame?

If so, that would help me out too.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 8, 2002, 8:46pm UTC](https://forum.kirupa.com/t/javascript-question/7829/8 "2002-11-08T20:46:49Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 8, 2002, 8:48pm UTC](https://forum.kirupa.com/t/javascript-question/7829/9 "2002-11-08T20:48:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 9, 2002, 4:26am UTC](https://forum.kirupa.com/t/javascript-question/7829/10 "2002-11-09T04:26:38Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 9, 2002, 4:56am UTC](https://forum.kirupa.com/t/javascript-question/7829/11 "2002-11-09T04:56:39Z")

</div>

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).
