forcing URL in frame??

P

petev

Hello, can anyone help me out?? Maybe its a bit complicated, maybe not :)
I'll try to explain. Am not a programmer so have patience!

[SITUATION]
I have a website whose url looks like this:
http://home.provider.nl/~mybusiness/

Shortly I have a registered a domain name:

http://www.mybusiness.nl

.... that is now "hosted" by another provider: the only thing it does is
sending a visitor of www.mybusiness.nl to
http://home.provider.nl/~mybusiness/ (this is called "webforwarding" or
routing)

You don't see that you are sent to the actual URL of my website;
www.mybusiness.nl remains displayed in the URL-bar. This is achieved because
www.mybusiness.nl displays http://home.provider.nl/~mybusiness/ in a frame:

<HTML>
<HEAD>
....
</HEAD>

<FRAMESET CELLPADDING="0" CELLSPACING="0" BORDER="0" ROWS="100%,*">
<FRAME SRC="http://home.provider.nl/~mybusiness/" NAME="qwerty" NORESIZE
SCROLLING="AUTO">
<FRAME SRC="/empty.html" NORESIZE>
</FRAMESET>
</HTML>

Because my site also has frames, I had to change all "target=_top" to
"target=qwerty" to make internal navigation work correctly while being at
www.mybusiness.nl . That was no problem.

[2 - PROBLEM]
My problem is to rewrite the javascript I made (well.. the usual
copy/paste/adapt actions) for all content pages. When found by a search
engine and clicked, the correct frames are forced around that "orphaned"
page. It works as long as you navigate at
http://home.provider.nl/~mybusiness/ (not via www.mybusiness.nl ).

NOW I guess the script needs to send you first to www.mybusiness.nl and THEN
force the found page+parent frame(s) in the new "qwerty" top-frame. How the
hell should I do that? A tried some things, but cant get it right.

The javascript I have now and needs to be changed looks like this (with
onLoad="framecheck()" in body tag) :

<SCRIPT LANGUAGE="JavaScript">
<!--
function framecheck()
{var parentframe = 'page.html';
// check if orphan
if (parent.location.href == self.location.href)
{var current = window.self.location.pathname;
window.location.replace (parentframe + '?' + current);
}
};
//-->
</SCRIPT>

Anyone an idea how to change it??

Many thnx in andvance for any suggestion..

PV
 
I

Ivo

petev said:
Hello, can anyone help me out?? Maybe its a bit complicated, maybe not :)
I'll try to explain. Am not a programmer so have patience!

[SITUATION]
I have a website whose url looks like this:
http://home.provider.nl/~mybusiness/

Shortly I have a registered a domain name:

http://www.mybusiness.nl

... that is now "hosted" by another provider: the only thing it does is
sending a visitor of www.mybusiness.nl to
http://home.provider.nl/~mybusiness/ (this is called "webforwarding" or
routing)
Because my site also has frames, I had to change all "target=_top" to
"target=qwerty" to make internal navigation work correctly while being at
www.mybusiness.nl . That was no problem.
The problem is www.mybusiness.nl and http://provider.nl/ are different
domains, and browser security prevent socalled cross-domain scripting. There
are workarounds, since you control what is happening on pages on both sides,
but it gets nasty quickly. It is very good to be aware of problems you run
into when search engines pick up your unframed pages, but then to force the
correct, even nested frames in another domain, is no sinecure.
Besides all that, frame-forcing scripts will prevent your pages from
participating in Google Images Search to name one good example of the use of
frames. I would reconsider using frames alltogether, at least for the
regular pages, and accept the provider.nl in the address- and statusbars for
the time being (that is:until you move to mybusiness.nl permanently).
HTH
Ivo
 
P

petev

Ivo said:
petev said:
Hello, can anyone help me out?? Maybe its a bit complicated, maybe not :)
I'll try to explain. Am not a programmer so have patience!

[SITUATION]
I have a website whose url looks like this:
http://home.provider.nl/~mybusiness/

Shortly I have a registered a domain name:

http://www.mybusiness.nl

... that is now "hosted" by another provider: the only thing it does is
sending a visitor of www.mybusiness.nl to
http://home.provider.nl/~mybusiness/ (this is called "webforwarding" or
routing)
Because my site also has frames, I had to change all "target=_top" to
"target=qwerty" to make internal navigation work correctly while being at
www.mybusiness.nl . That was no problem.
The problem is www.mybusiness.nl and http://provider.nl/ are different
domains, and browser security prevent socalled cross-domain scripting. There
are workarounds, since you control what is happening on pages on both sides,
but it gets nasty quickly. It is very good to be aware of problems you run
into when search engines pick up your unframed pages, but then to force the
correct, even nested frames in another domain, is no sinecure.
Besides all that, frame-forcing scripts will prevent your pages from
participating in Google Images Search to name one good example of the use of
frames. I would reconsider using frames alltogether, at least for the
regular pages, and accept the provider.nl in the address- and statusbars for
the time being (that is:until you move to mybusiness.nl permanently).
HTH
Ivo

Thanks Ivo. I understand what you're saying. Maybe indeed its best to later
move the entire site to mybusiness.nl! For the moment I keep trying to solve
this puzzle. Stil hoping anyone can come up with some javascript (if at all
possible).

Frames: yes I know they are not considered very positive, for many reasons.
I still did choose for frames though, because my client gave priority to
speed, the site should be super fast. Reloading every time a new page with
all menu-graphics in it would slow it all down... (for people with slow
modems). Or maybe with speed in mind..was/is there a better option than
frames? (graphics are already minimized in number and kb size)

PV
 

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
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top