468,104 Members | 1,312 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,104 developers. It's quick & easy.

passing information between frames

I am very very new to jscript. What I want to do is set a variable in one
frame of a page, and then reload another frame so that it uses the new
variable. Is this possible? I want to have a thumbnail menu in the first
frame, where clicking on the thumbnail sets a variable equal to the larger
image's filename. The script would then reload the page in the larger
frame, which uses the new variable value to load the larger version of the
image. I have probably now completely shown my ignorace of js, as I think I
used the wrong terminology, but I hope what I want to do was explained
adequately.

TIA

Josh
Jul 23 '05 #1
1 1360
In article <6r***************@newsread2.news.atl.earthlink.ne t>,
mi**@misc.com enlightened us with...
I am very very new to jscript. What I want to do is set a variable in one
frame of a page, and then reload another frame so that it uses the new
variable. Is this possible?
In most browers, yes.
But frames can suck if not done right.

I hope you have a dynamic frameset and a little blurb on the framed pages
that say "this frame should be in my frameset" with a link to reload the
frameset properly. If a user comes in through a search engine and gets only
one page, it's a real hassle if you don't have that stuff.
Among other problems with bookmarking and the like...
I want to have a thumbnail menu in the first
frame, where clicking on the thumbnail sets a variable equal to the larger
image's filename. The script would then reload the page in the larger
frame, which uses the new variable value to load the larger version of the
image. I have probably now completely shown my ignorace of js, as I think I
used the wrong terminology, but I hope what I want to do was explained
adequately.


You may not need to get this involved, really. As long as you're using
javascript, you can simply reassign a new value to the source of the image
tag instead of reloading the entire page. Assuming all you are changing is
the image. This is easier than trying to set variable names and stuff.

i.e. in the first frame:
<img src="myThumb.jpg" onClick="top.frames['largerFrameName'].document.images
['theBigImageName'].src='theNewLargerImage.jpg';">

(I didn't test that, but you get the idea)

--
--
~kaeli~
Press any key...NO, NO, NO, NOT THAT ONE!!!!!!
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Hans | last post: by
1 post views Thread by divya | last post: by
11 posts views Thread by Dthmtlgod | last post: by
1 post views Thread by cirillo_curiosone | last post: by
8 posts views Thread by chimambo | last post: by
25 posts views Thread by Geoff Cox | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.