Sub-pages should open in an Inline Frame

Do you want to share WYSIWYG Web Builder tips, tricks, tutorials or useful HTML code? You can post it here...
(no questions or problems please, this section is not monitored by support).
Forum rules
This section is to share tips, tricks and tutorials related to WYSIWYG Web Builder.
Please do not post questions or problems here. They will not be answered.

PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
Post Reply
Patr100
 
 
Posts: 115
Joined: Tue Dec 25, 2007 10:52 pm

Post 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.
User avatar
kees
 
Posts: 48
Joined: Mon May 23, 2005 7:36 pm
Location: Soest - NL

Post 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.
Patr100
 
 
Posts: 115
Joined: Tue Dec 25, 2007 10:52 pm

Post 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"
User avatar
kees
 
Posts: 48
Joined: Mon May 23, 2005 7:36 pm
Location: Soest - NL

Post 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.
Patr100
 
 
Posts: 115
Joined: Tue Dec 25, 2007 10:52 pm

Post by Patr100 »

Thanks that was the bit I missed -
haakoo
 
 
Posts: 189
Joined: Fri Apr 25, 2008 8:02 am
Location: Groningen/NL

Post 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
haakoo
 
 
Posts: 189
Joined: Fri Apr 25, 2008 8:02 am
Location: Groningen/NL

Post by haakoo »

Allready figured out how to do it.

Hans
User avatar
kees
 
Posts: 48
Joined: Mon May 23, 2005 7:36 pm
Location: Soest - NL

Post by kees »

FAVTdk wrote:what have I done wrong
Can you give the exact url of the main page (with the iframe)?
User avatar
kees
 
Posts: 48
Joined: Mon May 23, 2005 7:36 pm
Location: Soest - NL

Post 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>
electrochrisso
 
 
Posts: 43
Joined: Mon Aug 19, 2013 8:39 am
Location: Darling River

Re: Sub-pages should open in an Inline Frame

Post 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!
WYSIWYG THE GREATEST Web Builder EVER
User avatar
Pablo
 
Posts: 21508
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Sub-pages should open in an Inline Frame

Post 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.
mnwitten
 
 
Posts: 36
Joined: Sun Aug 17, 2008 10:29 am
Location: Newfoundland, PA
Contact:

Re: Sub-pages should open in an Inline Frame

Post 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.
Post Reply