BullGuard Antivirus Sale - 60% Off with openElement !
Forum Home Forum Home >

openElement

> Websites Created with OpenElement
  New Posts New Posts RSS Feed - tree view target iframe
  FAQ FAQ  Forum Search   Register Register  Login Login

tree view target iframe

 Post Reply Post Reply
Author
Message
prdecina View Drop Down
Newbie
Newbie
Avatar

Joined: Apr 18 2016
Location: philippones
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote prdecina Quote  Post ReplyReply Direct Link To This Post Topic: tree view target iframe
    Posted: Apr 19 2016 at 6:10am
Sir/Maam:

Iam ryan and iam making a website for our school. but i need help on making the IFRAME  as the display for my tree view links..
 i cannot connect the tree view to the iframe/ EXTERNAL FRAME.
please help me..

thank you
Back to Top
Dmit OE View Drop Down
Admin Group
Admin Group


Joined: May 31 2012
Status: Offline
Points: 5283
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dmit OE Quote  Post ReplyReply Direct Link To This Post Posted: Apr 19 2016 at 8:39am
Hi,

You just need to add a bit of code.

First, add the External page element (which is essentially an iframe), or, if it doesn't provide you enough options, add a Code Block Visual with the HTML code for your iframe. Whatever element it is, in its Properties, put a Custom Class "my-iframe" (without "").

For your tree view element, put a Custom Class "iframe-links".

Add a Code Block Source type Javascript position Header with code:


$(function() {

$('.iframe-links').find('a').click(function(event){
  var url = $(this).attr('href');
    alert(url);
  $('.my-iframe iframe').attr('src', url);
  event.stopPropagation();
  return false;
});

});




Edited by Dmit OE - Apr 19 2016 at 9:58am
Back to Top
Dmit OE View Drop Down
Admin Group
Admin Group


Joined: May 31 2012
Status: Offline
Points: 5283
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dmit OE Quote  Post ReplyReply Direct Link To This Post Posted: Apr 19 2016 at 8:39am
P.S. If it does not work, please publish your website online and give the link.
Back to Top
prdecina View Drop Down
Newbie
Newbie
Avatar

Joined: Apr 18 2016
Location: philippones
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote prdecina Quote  Post ReplyReply Direct Link To This Post Posted: Apr 19 2016 at 9:33am
sir 
    thank for reply. 
    but i cant publish it yet online because it is not free. i want to finish the website first 
    before asking the to aprove. its is still a one page and i the foundation on the work
    wold be in the iframe connected to the tree view. 
    can i have your email adress so that i can send you a copy ? cause i can find way in sending even 
    a print screen.. hope you can help me sir.. my email address is prdecina@gmail.com
Back to Top
prdecina View Drop Down
Newbie
Newbie
Avatar

Joined: Apr 18 2016
Location: philippones
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote prdecina Quote  Post ReplyReply Direct Link To This Post Posted: Apr 19 2016 at 9:38am
sir,
    in any case to make my work easier i can use a textlink rather that the view tree to make it
    simpler probably like in a html iframe ..
    sorry for a little disturb ,because im new in making webpage but still learning with the help of           open element ..
Back to Top
prdecina View Drop Down
Newbie
Newbie
Avatar

Joined: Apr 18 2016
Location: philippones
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote prdecina Quote  Post ReplyReply Direct Link To This Post Posted: Apr 19 2016 at 9:48am
SIr ,

this is the file a upload it at google drive

https://drive.google.com/file/d/0BwBfmkARvq9_eEo2OUJfYnl5Q0U/view?usp=sharing
Back to Top
Dmit OE View Drop Down
Admin Group
Admin Group


Joined: May 31 2012
Status: Offline
Points: 5283
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dmit OE Quote  Post ReplyReply Direct Link To This Post Posted: Apr 19 2016 at 10:00am
I've tested with your project, and fixed my code - I updated the previous post, please copy-paste the code to your Code Block. Otherwise it works except that all the 3 links you have (Google, MSN and Yahoo) cannot be opened in iframes (they are made like this), you should use links to some other websites.
Back to Top
prdecina View Drop Down
Newbie
Newbie
Avatar

Joined: Apr 18 2016
Location: philippones
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote prdecina Quote  Post ReplyReply Direct Link To This Post Posted: Apr 20 2016 at 9:58am
sir ,

sorry iam new by on making a website. 
will where will i copy paste the code  block? 
will it be at TREE VIEW?
name :??
type: java script
position: header
Back to Top
Dmit OE View Drop Down
Admin Group
Admin Group


Joined: May 31 2012
Status: Offline
Points: 5283
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dmit OE Quote  Post ReplyReply Direct Link To This Post Posted: Apr 20 2016 at 1:50pm
Use our Wiki to learn how to use openElement.

That I suggest you is very simple to do.

1. Click your TREE VIEW element to select it.

2. On the right, go to Properties, find Custom Classes, and put into it:

iframe-links


3. Click on your External page (iframe) element to select it.

4. On the right, go to Properties, find Custom Classes, and put into it:

my-iframe


5. In the Elements panel on the right, find Code Block (Source). Drag and drop it onto your page. The Code Editor will open. Choose on the top the type Javascript. Then copy the following code into it:


$(function() {

$('.iframe-links').find('a').click(function(event){
  var url = $(this).attr('href');
    alert(url);
  $('.my-iframe iframe').attr('src', url);
  event.stopPropagation();
  return false;
});

});


6. Exit the Editor (first button on the top), select again your TREE VIEW element, and in its Properties, change the links to not use Google, MSN etc., as none of these sites allow to be opened in an iframe. Try openelement.com for example, or any other website.
Back to Top
prdecina View Drop Down
Newbie
Newbie
Avatar

Joined: Apr 18 2016
Location: philippones
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote prdecina Quote  Post ReplyReply Direct Link To This Post Posted: Apr 24 2016 at 9:39am
sir,

Tank u very much ive done it.. hope to finish my siple project..

thanks,

ryan
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.063 seconds.