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

Post by Patr100 » Thu Jun 04, 2009 10:25 pm

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: 49
Joined: Mon May 23, 2005 7:36 pm
Location: Soest - NL

Post by kees » Thu Jun 04, 2009 10:39 pm

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: 307
Joined: Tue Dec 25, 2007 10:52 pm

Post by Patr100 » Fri Jun 05, 2009 11:49 am

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: 49
Joined: Mon May 23, 2005 7:36 pm
Location: Soest - NL

Post by kees » Fri Jun 05, 2009 2:13 pm

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: 307
Joined: Tue Dec 25, 2007 10:52 pm

Post by Patr100 » Fri Jun 05, 2009 3:06 pm

Thanks that was the bit I missed -

haakoo
 
 
Posts: 319
Joined: Fri Apr 25, 2008 8:02 am
Location: Groningen/NL

Post by haakoo » Sun Oct 18, 2009 10:43 pm

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

Post by haakoo » Mon Oct 19, 2009 11:33 am

Allready figured out how to do it.

Hans

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

Post by kees » Mon Nov 23, 2009 5:21 pm

FAVTdk wrote:what have I done wrong
Can you give the exact url of the main page (with the iframe)?

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

Post by kees » Mon Nov 23, 2009 10:35 pm

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

Re: Sub-pages should open in an Inline Frame

Post by electrochrisso » Fri Sep 05, 2014 10:34 pm

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: 18820
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Sub-pages should open in an Inline Frame

Post by Pablo » Sat Sep 06, 2014 6:21 am

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: 214
Joined: Sun Aug 17, 2008 10:29 am
Location: Newfoundland, PA
Contact:

Re: Sub-pages should open in an Inline Frame

Post by mnwitten » Sun Jun 21, 2015 8:47 pm

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

Who is online

Users browsing this forum: No registered users and 1 guest