PDA

View Full Version : But I don't want it in a new window!


turtle
2007-04-30, 23:12
I was given a link to this O'Reilly page (http://digitalmedia.oreilly.com/pub/a/oreilly/digitalmedia/2006/09/29/two-slick-quicktime-tricks.html?page=2) so I could embed some QT movies into my blog. Now I just realized that is forces my video to open in a new tab/window instead of where the placeholder is. Can I get some help from the gurus here with this?

<div id="movieplayer" style="display:none" align="center">
<script language="JavaScript" type="text/javascript">
<!-- Hide script from sad old browsers
QT_WriteOBJECT_XHTML('/pics/snow070407.mov',
'320', '256', '');
// -->
</script>
</div>

<div id="trigger" style="display:block" align="center">
<a href="/pics/snow070407.mov" target="_blank" onclick="javascript:document.getElementById('movieplayer'). style.display='block';document.getElementById('tri gger').style.display='none';return
false">
<img src="/pics/snow070407.png" alt="Click to Play" width="320" height="256" border="0" /></a>
</div>
This is the exact code from my WordPress post (http://tonysphoto.kellyinternationalinc.com/2007/04/07/its-snowing/). Any help is appreciated.

scratt
2007-04-30, 23:37
I am so lazy with html as I am such a DW baby, but I think you need to change the target to something other than "_blank".

Checking now..

Try this source...

http://www.htmlcodetutorial.com/linking/_A_TARGET.html

I am not great on how Javascript behaves etc. but it seems to me you want to try changing the _blank to _self, or just get rid of the target command altogether.

As an aside... There are some nice little plugins for WordPress which allow you to drop the video into entries, and will deal with loads of different formats, and let you format them using controls in the page creation section when you make a post up.

PKIDelirium
2007-04-30, 23:56
Just get rid of target="_blank" and it won't make a new window anymore.

turtle
2007-04-30, 23:59
None of those target"_... changes helped. Either it overwrites the whole screen or creates a new window. It works on the O'Reilly page like I want it too. (The one on near the bottom.)

I'm sure there are some great plug-ins for WordPress, I'm more doing this to help me learn to code though. If I can learn to code it, then I can appreciate the plug-ins better.

scratt
2007-05-01, 01:02
There is a simple way to embed a .mov into a web page, but that doesn't allow you to have the picture there to click on first. Would that be a good compromise, or do you need this to work as shown above?

What you may find is that on the O'Reilly page that they are using frames, or something along those lines. The target command then directs things to specific areas on the page, and will not then re-load the rest.

As I said I am horribly lazy at html so I should just but out at this point.
Over to someone who is more of a code monkey on this....

turtle
2007-05-01, 09:16
I guess I don't *NEED* it to work like that. I just seems really cool. A better way to present your video. Frames might be the answer (from what little I know). I guess for now I'll look into a plug-in for WordPress, but I was really wanting to get this one working, I like it.

Thanks for your help though scratt and PKIDelirium.

washington mac user
2007-05-21, 01:01
Here is an outline we got from class:

you could set onclick to call a method in a js file and then write this:

var object = document.createElement("object");
object.type = "application/x-shockwave-flash";
object.data = "http://www.youtube.com/v/PZUTleBwiiw";
object.style.width = "425px";
object.style.height = "350px";
document.getElementById("videoarea").appendChild(object);

That was for creating it in javascript and this is for HTML:

<object width="320" height="240"
type="video/quicktime"
data="examples/multimedia/win98.mov">
<param name="autoplay" value="true">
<param name="controller" value="true">
</object>

I dont' know if that will help but thats what we did in class

turtle
2007-05-21, 09:39
Thanks, I'll have to give it a try in a bit.

drewprops
2007-05-21, 10:37
Turtle, I cannot recommend PodPress highly enough. It's a FANTASTIC plugin that handles ALL SORTS of files and will play them inline in your website. It's the plugin that I use on the pirate website (http://www.piratepalooza.com/) (which I'm currently flogging over in AO... I mean in General Discussion)... I think you've already gone over there to look at the vids. After you set up your filepath to where you keep your video files it handles the rest.... really quite FANTASTIC plugin. Try it out!!

http://www.mightyseek.com/podpress


.

turtle
2007-05-21, 13:50
Ok, I'll give in and use PodPress from now on. Yeah, it looks good on your site Drew. I don't like the tag it puts on the bottom of my site though, how do I remove it? I noticed you don't have that tag. See my blog link in my signature.

drewprops
2007-05-21, 14:08
Errrrrm, I remember Dan added that promo for himself in one of the earlier releases, but he also provided a means of not using it... can't remember if you have to strip a line out of the PHP or if it's a customization item for the plug-in.... super busy now but can look in on this thread later to see if you found it.... I think it's in the docs... maybe?