Javascript in frames

S

semantiks

Been at this for 3 days. Have no hair left. It's gotta be simple.
Can anyone help?

I have a frameset with four frames:

<frameset cols="150,*">
<frame name="top" src="gallery1a.htm">
<frameset rows="33%,33%,*">
<frame name="left" src="gallery1b.htm" scrolling="yes">
<frame name="middle" src="gallery1c.htm">
<frame name="bottom" src="gallery1d.htm">
</frameset>
</frameset>


frame name"gallery1a.htm" holds thumbnails.

When you click a thumbnail, a large image should manifest in frame
name"gallery1c.htm"

Here's what I'm using in tables, and it works fine:

<td valign=top width=150><center>
<IMG SRC="test1b.gif" width=90
ONMOUSEdown="document.images['large'].src= 'test1b.gif'">
</td>
<td valign=top width=500><center>
<IMG SRC="space.jpg" NAME="large">
</td>

But how do I transpose that code so I'm calling to another frame, not
another table? Can anyone give me the exact syntax, per the above?

Any help hugely appreciated!
 
M

Mick White

semantiks said:
Been at this for 3 days. Have no hair left. It's gotta be simple.
Can anyone help?

I have a frameset with four frames:

<frameset cols="150,*">
<frame name="top" src="gallery1a.htm">
<frameset rows="33%,33%,*">
<frame name="left" src="gallery1b.htm" scrolling="yes">
<frame name="middle" src="gallery1c.htm">
<frame name="bottom" src="gallery1d.htm">
</frameset>
</frameset>


frame name"gallery1a.htm" holds thumbnails.

When you click a thumbnail, a large image should manifest in frame
name"gallery1c.htm"

Here's what I'm using in tables, and it works fine:

<td valign=top width=150><center>
<IMG SRC="test1b.gif" width=90
ONMOUSEdown="document.images['large'].src= 'test1b.gif'">
</td>
<td valign=top width=500><center>
<IMG SRC="space.jpg" NAME="large">
</td>

But how do I transpose that code so I'm calling to another frame, not
another table? Can anyone give me the exact syntax, per the above?
First of all rename your "top" frame ("top" is a reserved word)

<IMG SRC="test1b.gif"
onclick="top.frames['middle'].document.images['large'].src= 'test1b.gif'">

This assumes you have an image with the name "large" in "gallery1c.htm"
document.

Mick
 
A

ASM

semantiks said:
<frameset cols="150,*">
<frame name="top" src="gallery1a.htm">
<frameset rows="33%,33%,*">
<frame name="left" src="gallery1b.htm" scrolling="yes">
<frame name="middle" src="gallery1c.htm">
<frame name="bottom" src="gallery1d.htm">
</frameset>
</frameset>

frame name"gallery1a.htm" holds thumbnails.

no !
frame "top" containing "gallery1a.htm" that holds thumbnails.
or
"gallery1a.htm" from frame "top" holds thumbnails.
When you click a thumbnail, a large image should manifest in frame
name"gallery1c.htm"

Here's what I'm using in tables, and it works fine:

<td valign=top width=150><center>
<IMG SRC="test1b.gif" width=90
ONMOUSEdown="document.images['large'].src= 'test1b.gif'">

It is a non-sens to enlarge a small image
It is a non-sens to show a big image as a thumbnail

you have to do 2 images : a small (thumbnail) and a tall (big)
</td>
<td valign=top width=500><center>
<IMG SRC="space.jpg" NAME="large">
</td>

But how do I transpose that code so I'm calling to another frame, not
another table? Can anyone give me the exact syntax, per the above?

Any help hugely appreciated!

<IMG SRC="test1b.gif" width=90
onclick="parent.middle.document.images['large'].src='bigs/'+this.herf;
return false;">

(hope that "gallery1c.htm" as 1 free image named 'large')

or even without JS

<IMG SRC="big/test1b.gif" target="middle"><img src="small/test1b.gif></a>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top