Forum Moderators: open

Message Too Old, No Replies

How do I force iframe-based content?

iFrames,force,google

         

ninjaDK

4:40 pm on May 28, 2003 (gmt 0)

10+ Year Member



Hi all,
I have been struggling with an idea today and searched the site for ideas, but I've hadn't had any luck!

I have an index.html page that contains a table with reference to 3 iframes.
(menu, content, and date frame)

The contents of content-page varies and is easily accesed from the menu using targets. No problem.

But the ever returning problem with frames (and I presume iframes)is when people search and find a particular content page on let say Google. I have a wonderful JavaScript that force a frame into the frame set! But I cant get it to work with the iFrame page, because I don't have any frameset.

Does any one know of JavaScript that will bring any searched iframe content into the index.html?

And, is it true that google won't crawl my content pages if they are placed in an iFrame (I really need them to be crawled by searchengines, but I read somewhere that they won't)

I'm a complete novice into JavaScripts, so plz don't leave out any information if you have an idea!

Thank you,
ninjaDK

tedster

8:55 pm on May 28, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, ninjaDK.

You may want to check out MESSAGE #21 in our Generic Javascript [webmasterworld.com] thread - the one entitled "Force Many Pages into Frames." That spells out the basic logic you need, whether your page uses an inline frame or is a conventional frameset.

The difference for an iframe comes at the last step - where the example uses [blue]document.write()[/url] to create a frameset. What you need to do is create a second HTML version of your page and in that version write the variable "passpage" into the iframe src= attribute.

I know you said you're completely new to js, but try playing around with some test examples. It's easier than you might think on a first look.

Relative to search engines, if you're just using plain HTML links with a target attribute, then spiders from most modern search engines WILL index the iframe page.

ninjaDK

10:07 am on May 30, 2003 (gmt 0)

10+ Year Member



Hi tedster,
I'm a little confused. Do you mean that I have to write my table set and place the iFrames in the tables using the document.write function in my master.html?

If that is the case can you point me in direction of a way to do that?

By the way - I have read the thread about your force frame which you gave in response to some guy in 2001. It was that discussion that lead me to use iFrames in the first place.

I'll give it a try! But I'm sure I'll be back with more questions!

- ninjaDK