f



need help using javascript to target a frame!

First off, please excuse the crossposting--I really need an answer quickly.

I have a decent amount of experience with html but not javascript. Currently
I'm using dreamweaver to do a photo gallery where I have a whole bunch of
thumbnail pics within an iframe. These thumnail pics are to swap an image in
the parent frame with whichever thumbnail was clicked. I assigned a name to
the pic in the parent frame which is to get replaced (i.e. "viewer") and I'm
using dreamweaver's built-in js code to accomplish the swap. Here is an
example of the code that dreamweaver generated:

<a href="#" onClick="MM_swapImage('viewer','','buildingcorner.jpg',0)"><img
src="buildingcorner.jpg" name="Image1" width="142" height="100" border=0
id="Image1"></a>

the swapimage refers to a function in the head section of the page, but I
don't think there is anything wrong with this as I've used it before without
any problems, but never with frames involved. I did manually change the
section within the parenthesis since dreamweaver doesn't seem to be able to
target other frames. My question is basically, how can I make this code
work. I tried modifying it a bit, like 'parent.viewer', but that did
nothing. What can I do to make this work--help would be greatly
appreciated--thanks.

Keith

kegepet
at
nyc dot
rr dot
com


0
TheKeith
6/25/2003 5:58:15 AM
comp.lang.javascript 38370 articles. 2 followers. javascript4 (1315) is leader. Post Follow

1 Replies
917 Views

Similar Articles

[PageSpeed] 29

In post <rICdne214OFzpGSjXTWcpg@giganews.com>
TheKeith said...

> I have a whole bunch of thumbnail pics within an iframe. 

iframes are just as evil as frames 

http://html-faq.com/htmlframes/?framesareevil
http://homepage.ntlworld.com/l_vajzovic/tom/web/frames.html
http://stone.thecoreworlds.net/www/frames/

> <a href="#" 

a fragment identifier separator isn't going to do anything for people
without JS.

f'ups alt.html

-- 
brucie a. blackford. 25/June/2003 05:03:59 pm kilo. 
http://loser.brucies.com/
0
brucie
6/25/2003 7:07:41 AM
Reply: