Iframe script? multiple embeds in a iframe

UnknownGuy

Well-Known Member
103
38
28
2018
100
Hello, I was looking for maybe a script, using which I can put multiple embed links into an iframe and viewers can switch to those different embeds inside the iframe freely.

This is how it would work:
cloudplayer

note: rather than relying on other websites I would like to install the script on my own server. So if there are scripts like this available please let me know
 
Last edited:
16 comments

kimikelku

Member
19
4
3
2020
145
I'm not sure if i understood correctly, but you want to be able to embed multiple video sources, in this case iframes, with an option to change between them?
If this is the case, I don't think there is one specify just for this usecase, but its easly done within a CMS platform, or with static site generators.
 

UnknownGuy

Well-Known Member
103
38
28
2018
100
I'm not sure if i understood correctly, but you want to be able to embed multiple video sources, in this case iframes, with an option to change between them?
If this is the case, I don't think there is one specify just for this usecase, but its easly done within a CMS platform, or with static site generators.
yes you understood correctly
and i use a PHP script on my website

if i knew Coding i could easily make one
Post automatically merged:

and the reason i posted the thread here is because I've seen a lot of sites using this same type of script and those works almost identically if not the same
that's why i was wondering maybe there was a paid script
 

kimikelku

Member
19
4
3
2020
145
Without some knowledge in programming, its going to be hard to find and adapt something to your needs.
You can pay someone to do it for you.
 

Mucha

Well-Known Member
109
55
28
2019
191
Please tell me how you create embeds, manually or there is some sort of module in your website that grabs urls from database?
 

kimikelku

Member
19
4
3
2020
145
Please tell me how you create embeds, manually or there is some sort of module in your website that grabs urls from database?
Not sure what is your question.
It depends on what software you use in your website, if its a wordpress, probably with the post editor, or creating a child page with the code, if its custom made its easy as copy/paste.
An integration of adding stuff to a database and showing data from it, its something diferent, that happens being de scene on every cms
 

Mucha

Well-Known Member
109
55
28
2019
191
Not sure what is your question.
It depends on what software you use in your website, if its a wordpress, probably with the post editor, or creating a child page with the code, if its custom made its easy as copy/paste.
An integration of adding stuff to a database and showing data from it, its something diferent, that happens being de scene on every cms
It's simple question man. If he has automatic solution that grabs url from database i will need to see the code to provide him with ready to go solution? Otherwise can give him code to implement in his iframes :nerd:
 

kimikelku

Member
19
4
3
2020
145
It's simple question man. If he has automatic solution that grabs url from database i will need to see the code to provide him with ready to go solution? Otherwise can give him code to implement in his iframes :nerd:
Ah ok, didnt understood at first.
 

electrify

Well-Known Member
332
65
28
2019
235
What you need is in here...

Javascript Teacher V1

And here is the code, just play around a bit to understand how it works.
Note: This will open the iframe everytime the user select a link from the drop menu.

Code:
<center>
<script>
   function Go(objCombo)
   {
    var strUrl=objCombo.options[objCombo.selectedIndex].value;
    if (strUrl.length < 2)
       return false;

    var arrTmp=strUrl.split("*");
    window.open(arrTmp[0], (arrTmp.length == 1)?"embed":"embed", "height=1000,width=1200");
   }
</script>
    <table><tr><td>
<select name="DropMenu"  onchange="Go(this);">
         <option value="#" selected>Select what you want!</option>
         <option value="http://example.com*">1) Example.com</option>
         <option value="http://javascript.com*">2) Javascript.com</option>
  </select>
</td></tr></table>
<br></center>
<iframe src="data:text/html;charset=utf-8,<html><body bgcolor='#fff'><br><br><br><center><p>Learn the basics.</p></center></body></html>" name='embed' frameborder='0' width='100%' height='370'></iframe>
 

ellaf

Well-Known Member
174
79
28
2020
120
What you need is in here...

Javascript Teacher V1

And here is the code, just play around a bit to understand how it works.
Note: This will open the iframe everytime the user select a link from the drop menu.

Code:
<center>
<script>
   function Go(objCombo)
   {
    var strUrl=objCombo.options[objCombo.selectedIndex].value;
    if (strUrl.length < 2)
       return false;

    var arrTmp=strUrl.split("*");
    window.open(arrTmp[0], (arrTmp.length == 1)?"embed":"embed", "height=1000,width=1200");
   }
</script>
    <table><tr><td>
<select name="DropMenu"  onchange="Go(this);">
         <option value="#" selected>Select what you want!</option>
         <option value="http://example.com*">1) Example.com</option>
         <option value="http://javascript.com*">2) Javascript.com</option>
  </select>
</td></tr></table>
<br></center>
<iframe src="data:text/html;charset=utf-8,<html><body bgcolor='#fff'><br><br><br><center><p>Learn the basics.</p></center></body></html>" name='embed' frameborder='0' width='100%' height='370'></iframe>
 
Last edited:

electrify

Well-Known Member
332
65
28
2019
235
Where i can post this code? function.php?
This is a Javascript code you can post on a html page and save as index.html or if you are using php put the code in one line and use...

Code:
echo '<html or javascript code goes here>';
Note: I'm using ' in the data uri in the iframe code so if you include echo you will get an error. Just remove
Code:
src="data:..."
 

UnknownGuy

Well-Known Member
103
38
28
2018
100
What you need is in here...

Javascript Teacher V1

And here is the code, just play around a bit to understand how it works.
Note: This will open the iframe everytime the user select a link from the drop menu.

Code:
<center>
<script>
   function Go(objCombo)
   {
    var strUrl=objCombo.options[objCombo.selectedIndex].value;
    if (strUrl.length < 2)
       return false;

    var arrTmp=strUrl.split("*");
    window.open(arrTmp[0], (arrTmp.length == 1)?"embed":"embed", "height=1000,width=1200");
   }
</script>
    <table><tr><td>
<select name="DropMenu"  onchange="Go(this);">
         <option value="#" selected>Select what you want!</option>
         <option value="http://example.com*">1) Example.com</option>
         <option value="http://javascript.com*">2) Javascript.com</option>
  </select>
</td></tr></table>
<br></center>
<iframe src="data:text/html;charset=utf-8,<html><body bgcolor='#fff'><br><br><br><center><p>Learn the basics.</p></center></body></html>" name='embed' frameborder='0' width='100%' height='370'></iframe>
implementing the code to all pages by hand will take too much time that it's almost impossible.

I'll just take a different approach; it works almost fine and less time consuming. Thanks for all your help :)
Post automatically merged:


Download the file and upload it to your server, than use:

not what i actually looked for but it' looks useful. It grabs links from 5 different hosts. I'll see about it. Thanks.
 
Top Bottom