Page 1 of 1

Posted: Thu Jun 04, 2009 10:25 pm
by Patr100
Right thanks I think I just need the script on the sub pages so anyone finding them on Google will get taken to a navigation page.

Posted: Thu Jun 04, 2009 10:39 pm
by kees
Patr100 wrote:Right thanks I think I just need the script on the sub pages so anyone finding them on Google will get taken to a navigation page.
... and did not get the page they were looking for :?

I would advice to perform the modifications on the main page as described.

Posted: Fri Jun 05, 2009 11:49 am
by Patr100
Yes you're right - I just thought as long as they find the nav they can make their own way but its not right to do that.
I'm having a slight problem so I may return when I have more time.

Does the following code need to be modified?

Code: Select all

onLoad = "self.IFrameName.location.href = file"

Posted: Fri Jun 05, 2009 2:13 pm
by kees
Patr100 wrote:Does the following code need to be modified?

Code: Select all

onLoad = "self.IFrameName.location.href = file"
Yes.
IFrameName should be changed to the name of your Inline Frame.

Posted: Fri Jun 05, 2009 3:06 pm
by Patr100
Thanks that was the bit I missed -

Posted: Sun Oct 18, 2009 10:43 pm
by haakoo
Kees,

Small request to you.
Is it possible to add a variable to the javascript that can be a trigger for a javascript in the index page?

crude example of what i'm looking for
-put a variable called var sd on sub_1.html
-have it display in an editbox with document.getElementById(Editbox1).value =sd;
This to execute a javascript function on index page

Hans

Posted: Mon Oct 19, 2009 11:33 am
by haakoo
Allready figured out how to do it.

Hans

Posted: Mon Nov 23, 2009 5:21 pm
by kees
FAVTdk wrote:what have I done wrong
Can you give the exact url of the main page (with the iframe)?

Posted: Mon Nov 23, 2009 10:35 pm
by kees
The inserted code at step 3a should be:

Code: Select all

<script type="text/javascript">
 if (top != self) top.location = self.location;
 var file = location.search ? unescape(location.search.substring(1)) : "./Velkommen/Velkommen.php";
</script>

Re: Sub-pages should open in an Inline Frame

Posted: Fri Sep 05, 2014 10:34 pm
by electrochrisso
Not sure if I am missing something here, but all this can be done using the standard options provided by Web Builder, No!

Re: Sub-pages should open in an Inline Frame

Posted: Sat Sep 06, 2014 6:21 am
by Pablo
Please note that this topic is more than 5 years old. 'Kees' is no longer active on this forum.
However the script still works.

Re: Sub-pages should open in an Inline Frame

Posted: Sun Jun 21, 2015 8:47 pm
by mnwitten
I came up with this little piece of code that may help anyone interested.

<script>
// Get where the user came from
referrer = document.referrer.toLocaleLowerCase(); //new URL(document.referrer).hostname;
// If it isn't onlinewatersports...
if (referrer.indexOf("onlinewatersports")==-1)
{
// send them to the main website page
window.location="http://www.onlinewatersports.com";
}
}
</script>

It simply captures where the user browsed from. In this case...was it onlinewatersports? if it wasn't...it redirects them to the main page. I modified the code to post here so consider this untested.