Click to See Complete Forum and Search --> : Targetting DIV tags in html frameset


bloke
09-12-2003, 08:59 AM
Hi guys

Can I target a link in a frame to a DIV tag within another frame?

If, for example, I have a content frame with something like:

<DIV id="thisone">
something here
</DIV>

..can I have a link in a different frame, something like:

<a href="thisone">a link</a>

or will this just look for a frame called "thisone", not find it and open in a new window, as I suspect?

Cheers

DaveSW
09-12-2003, 09:46 AM
if you changed that div into an iframe I believe it would find it. Provided you used name not id

However, you link to it like:

<a href="filetoappear.htm" target="thisone">Link</a>




<iframe src="source for iframe initially - blank if none.htm" name="thisone"><A href="source for iframe initially - blank if none.htm">Your browser does not support inline frames. Please follow this hyperlink.</a></iframe>

bloke
09-12-2003, 09:53 AM
Hmm, tried changing

<div id="this">blah</div>

to

<iframe id="this">blah</iframe>

with no joy. Am I missing something? I've never really used iframes so not too sure of the correct syntax here.

Cheers

DaveSW
09-12-2003, 09:58 AM
is the iframe empty to start with?

bloke
09-12-2003, 10:01 AM
Sorry mate, just seen your revised post. Works a treat!

Tar lar

DaveSW
09-12-2003, 10:02 AM
great! I thought I'd better explain LOL.

DaveSW
09-12-2003, 10:04 AM
You can also specify width, height and frameborder.

<iframe src="" name="thisone" width="200" height="200" frameborder="0"> etc </iframe>