Forum Moderators: open

Message Too Old, No Replies

Target a HTML into a div?

         

BootySlap

5:16 am on Apr 24, 2003 (gmt 0)

10+ Year Member



Is it possible to use the <A HREF... TARGET=...> tag to target a HTML file to open up in a <DIV>?

I have tried it and it doesnt seem to work. Do I have to use inline frames instead?

Cheers.

DrDoc

5:21 am on Apr 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The short answer is "no".

However, there are a couple of ways to make it look like that's what you're doing.

1) Use the innerText JavaScript method. This is, however, poorly supported or buggy in some browsers. It works great in IE and recent Gecko based browsers.

2) Use a combination of JavaScript and CSS to show/hide divs that already have the information in them.

These two methods are only useful for short texts. If we're talking longer texts, or whole pages, then an inline frame is better to use, or, even a whole new page.

BootySlap

5:33 am on Apr 24, 2003 (gmt 0)

10+ Year Member



Thanks for the prompt reply I think I will go for inline frames. Now the secret is to get them all looking the same on IE, NN and Opera :)