/    Sign up×
Community /Pin to ProfileBookmark

Forced frames

I have a website which is built on traditional HTML frames.

When searching a search word which I use in meta tags, in a search engine, some of my pages comes up alright, but the pages only – without the frame construction (!)

I wonder if someone out there know of any Java Script or so, which I can place in these pages, which in turn will FORCE any browser FIRST to load up the frame construction BEFORE loading up the page itself, in order to be shown correctly ?

I am not very ‘advanced’ in this, but I find it fascinating, though.

Many thanks in advance for any help!

to post a comment
JavaScript

8 Comments(s)

Copy linkTweet thisAlerts:
@LotusJul 20.2003 — Could we see your code?
Copy linkTweet thisAlerts:
@stampmanauthorJul 20.2003 — I got a reply from Charles. He gave me this code:

<script type="text/javascript">

<!--

if (self.location == top.location) {self.location.replace('frameset.html')}

// -->

</script>

I don't have a frameset.html file but I suppose I can use the index.html file instead, by using this the frameset comes up, but, of course, the right page the person clicked, will not show up.

Or do you have a better idea? I am not so advanced in this.

Mange hilsener til Bergen fra Gøteborg.
Copy linkTweet thisAlerts:
@pyroJul 20.2003 — These might help you force a frameset:

http://forums.webdeveloper.com/showthread.php?s=&threadid=2197#post10318 (javascript - won't work for 13% of your users)

http://forums.webdeveloper.com/showthread.php?s=&threadid=2111#post10273 (PHP -- needs some modefying)
Copy linkTweet thisAlerts:
@stampmanauthorJul 20.2003 — OKI

Let's say this:

I place the java script on all the pages in my site, so ensure they open with the frameset.

<script type="text/javascript">

<!--

if (self.location == top.location) {self.location.replace('index.html')}

// -->

</script>

Is there a way to force the frameset to open together with the required page?

What I mean is that if someone clicked on http://www.thesite.com/page5.html link, the

http://www.thesite.com/index.html

opens up instead of the desired page. Which was not desired...
Copy linkTweet thisAlerts:
@CharlesJul 20.2003 — [font=georgia]Create a new frameset just like the old one but with the new pages. Load this one.[/font]
Copy linkTweet thisAlerts:
@pyroJul 20.2003 — Did you look at the links I posted?
Copy linkTweet thisAlerts:
@stampmanauthorJul 21.2003 — Dear Charles

Wow now I understand why webmasters dislike to use frames, may be I have learn't a lesson here...

Dear Pyro

Yes I looked at the codes in the links you gave, I think these have to be modified no matter which one I use?...or can I use them as they are?

Dear wonderful people out there,

Thank you so very much for giving me so much attention, I am not very much advanced, but as I ask and get suggestions I learn more and more. I am now planning to redesign my entire site consisting of about 500 pages. When I started the project I started with frames since I thought that every single page would be smaller in bytes, in order to save bandwith.

Now I encounter this problem with the search engines. I thought if there was a way for me to save all that labour of redesigning each and every page.... that's why I turned to you.

Best wishes from Göteborg in Sweden.
Copy linkTweet thisAlerts:
@stampmanauthorJul 21.2003 — I have tried the little javacript snippet you gave me and it seems to function.

I wonder what would happen if I add a target="xxx" to this javascript? Have you tried such? May be this will fix the problem? Weird but possible?

I mean, in this case I wouldn't need to direct all to the index page instead of to the page desired by visitor, and still I wouldn't need to make a whole new frameset for each page???

If such a weird thing functions, that is!



Original:

<script type="text/javascript">

<!--

if (self.location == top.location) {self.location.replace('index.html')}

// -->

</script>


With target:

<script type="text/javascript">

<!--

if (self.location == top.location) {self.location.replace('page5.html' target="intro")}

// -->

</script>
×

Success!

Help @stampman spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.25,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...