Jump to content

HTML help please

91Chris

Hello. I found this example on the internet and I would like to use it in my own project. it works as it should, but how would I set a default source? Ie, If I wanted "Charlie 1" to automatically load when I visit the page, how would I do that? At the moment nothing loads until I select one.

<!-- Note that the target needs to be set to the name of the frame --><p><a href="http://www.youtube.com/embed/Q5im0Ssyyus" target="someFrame">Charlie 1</a></p><p><a href="http://www.youtube.com/embed/QFCSXr6qnv4" target="someFrame">Charlie 2</a></p><p><a href="http://www.youtube.com/embed/eaCCkfjPm0o" target="someFrame">Charlie 3</a></p><iframe name="someFrame" width="560" height="315"></iframe>

Any help is appreciated.

Total noob by the way. I'm just figuring stuff out as I go along.

 

Chris.

You guys are crazy. You know you guys are self-destructive. There's a funny farm somewhere and it's got your names written all over it. But I'm gettin' outta here.

Link to comment
Share on other sites

Link to post
Share on other sites

?autoplay=1

At the end of the first link perhaps?

 

Or do you mean:

 

<iframe title="YouTube video player" class="youtube-player" type="text/html" width="640" height="390" src="http://www.youtube.com/embed/Q5im0Ssyyus?autoplay=1"frameborder="0" allowFullScreen></iframe>
CPU Intel Core i7-4790K Motherboard ASUS Saberthooth Z97 Mark1 RAM Corsair Dominator Platinum 16GB @ 2133MHZ GPU 2 X MSI GeForce GTX GTX 980TI GAMING 6G SLI Case Phantex Enthoo Evolv ATX Storage Samsung 840 Pro Series 256GB / Western Digital Caviar Black 2TB PSU Corsair RM1000i Display Asus 4K PB287Q Cooling Noctua NF-A14 FLX & NF-F12 PWM /Thermaltake Water 3.0 Ultimate 360mm Keyboard Corsair K70 Mouse ROCCAT Kone XTD Sound Card Asus Xonar STX

Link to comment
Share on other sites

Link to post
Share on other sites

Hello. If you put the HTML code into a file and load it in a web browser you can see that the "box" is empty, nothing has loaded, but when you click one of the "links" it loads up a video. What I want is to load one by default, so when I visit the page there is already one loaded.

 

I am not going to be using videos, I will be loading HTML files instead. So I would like my "Home" page to load by default. Then other pages will be loaded by pressing buttons/links in my navigation bar.

You guys are crazy. You know you guys are self-destructive. There's a funny farm somewhere and it's got your names written all over it. But I'm gettin' outta here.

Link to comment
Share on other sites

Link to post
Share on other sites

Hello. If you put the HTML code into a file and load it in a web browser you can see that the "box" is empty, nothing has loaded, but when you click one of the "links" it loads up a video. What I want is to load one by default, so when I visit the page there is already one loaded.

 

I am not going to be using videos, I will be loading HTML files instead. So I would like my "Home" page to load by default. Then other pages will be loaded by pressing buttons/links in my navigation bar.

as suggested by the other gentleman, just slap the url of the video you want in the src attribute of the iframe

Link to comment
Share on other sites

Link to post
Share on other sites

as suggested by the other gentleman, just slap the url of the video you want in the src attribute of the iframe

 

Ok I will have a play around.

 

While I'm here though, do you know any way of telling the iframe to auto adjust it's size to fit the content? The content is local but can only be reached via the web as the hosting provider doesn't support ssl on a free account.

 

Thanks,

Chris.

You guys are crazy. You know you guys are self-destructive. There's a funny farm somewhere and it's got your names written all over it. But I'm gettin' outta here.

Link to comment
Share on other sites

Link to post
Share on other sites

Ok I will have a play around.

 

While I'm here though, do you know any way of telling the iframe to auto adjust it's size to fit the content? The content is local but can only be reached via the web as the hosting provider doesn't support ssl on a free account.

 

Thanks,

Chris.

i don't think it's possible, because the content is supposed to resize itself to fit the window, and not vice versa

and the iframe should behave like a window

Link to comment
Share on other sites

Link to post
Share on other sites

i don't think it's possible, because the content is supposed to resize itself to fit the window, and not vice versa

and the iframe should behave like a window

 

It's definitely possible from what I've read, the problem is I cant find a way to do it with a file/page that's isn't local (or cant be obtained locally). There must be a way of loading the page "in the background" to "measure" it, then applying those values dynamicaly. No?

 

Cheers,

Chris.

You guys are crazy. You know you guys are self-destructive. There's a funny farm somewhere and it's got your names written all over it. But I'm gettin' outta here.

Link to comment
Share on other sites

Link to post
Share on other sites

It's definitely possible from what I've read, the problem is I cant find a way to do it with a file/page that's isn't local (or cant be obtained locally). There must be a way of loading the page "in the background" to "measure" it, then applying those values dynamicaly. No?

 

Cheers,

Chris.

i can't see how that could be done, because web pages don't have a "size", they try to stretch and adapt to the browser, depending on rules described by the designer

so nope, i can't help you here sorry

 

and you can't access pages cross-domain because of a security limitation: basically, if that was allowed, all the lamers would screw around with your logins

i read somewhere that there is a workaround for that, but i don't know what it is and i don't know if it actually exists

browser extensions, on the other side, allow you to access any domain if you ask the use for permission when installing the extension, so maybe you can do something with that, but it's clearly a whole different thing

Link to comment
Share on other sites

Link to post
Share on other sites

Even though I've spent a good bit of time web developing/ programming, I have never embedded a YouTube video in my projects.

My point is: 30 seconds to 1 minute of Google-ing and testing on W3Schools helped me give you your answer...

CPU Intel Core i7-4790K Motherboard ASUS Saberthooth Z97 Mark1 RAM Corsair Dominator Platinum 16GB @ 2133MHZ GPU 2 X MSI GeForce GTX GTX 980TI GAMING 6G SLI Case Phantex Enthoo Evolv ATX Storage Samsung 840 Pro Series 256GB / Western Digital Caviar Black 2TB PSU Corsair RM1000i Display Asus 4K PB287Q Cooling Noctua NF-A14 FLX & NF-F12 PWM /Thermaltake Water 3.0 Ultimate 360mm Keyboard Corsair K70 Mouse ROCCAT Kone XTD Sound Card Asus Xonar STX

Link to comment
Share on other sites

Link to post
Share on other sites

i can't see how that could be done, because web pages don't have a "size", they try to stretch and adapt to the browser, depending on rules described by the designer

so nope, i can't help you here sorry

 

and you can't access pages cross-domain because of a security limitation: basically, if that was allowed, all the lamers would screw around with your logins

i read somewhere that there is a workaround for that, but i don't know what it is and i don't know if it actually exists

browser extensions, on the other side, allow you to access any domain if you ask the use for permission when installing the extension, so maybe you can do something with that, but it's clearly a whole different thing

 

This is one of the many places where I read about auto adjusting the size. I started learning about HTML and what not 2 days ago, so it makes little sense to me.

 

http://www.scottdizzle.com/viewtopic.php?f=11&t=846

 

 

Even though I've spent a good bit of time web developing/ programming, I have never embedded a YouTube video in my projects.

My point is: 30 seconds to 1 minute of Google-ing and testing on W3Schools helped me give you your answer...

 

I have achieved what I wanted a different way now. Thanks.

You guys are crazy. You know you guys are self-destructive. There's a funny farm somewhere and it's got your names written all over it. But I'm gettin' outta here.

Link to comment
Share on other sites

Link to post
Share on other sites

I have achieved what I wanted a different way now. Thanks.

You're welcome.

CPU Intel Core i7-4790K Motherboard ASUS Saberthooth Z97 Mark1 RAM Corsair Dominator Platinum 16GB @ 2133MHZ GPU 2 X MSI GeForce GTX GTX 980TI GAMING 6G SLI Case Phantex Enthoo Evolv ATX Storage Samsung 840 Pro Series 256GB / Western Digital Caviar Black 2TB PSU Corsair RM1000i Display Asus 4K PB287Q Cooling Noctua NF-A14 FLX & NF-F12 PWM /Thermaltake Water 3.0 Ultimate 360mm Keyboard Corsair K70 Mouse ROCCAT Kone XTD Sound Card Asus Xonar STX

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×