Blog Comments

  1. molendijk's Avatar
    Quote Originally Posted by mapleleaf
    In reading the article on iframe pixel precision, the light came on and it worked for all browser type that I am testing the web site with; namely not using the viewport variables BUT using 100% for the width and the height. WOW, alll browsers work.
    I'm glad this helped you out.
    ===
    Tot ziens, Arie.
  2. mapleleaf's Avatar
    This is my first post here in the forums and will not be my last!

    This is a great article, iframe pixel precision and it solved an issue that I had.

    In the developing of a web site and using dhtmlwindow, I wanted to use a variable for the viewport of the browsers(I am testing the web site with IE8, FF3.6.8/4.0b4,Opera 10.61, chrome 7.0, avant and Maxthon), it did not work when passing the viewport variables to the function.
    Well it did work on some but not all browser. This had me stumped and I knew the solution is a simple one; too often the simple solutions escape.
    Every page on the web site is W3C validated for xhtml1.1, CSS3, WCAGv2 AAA and section 508 BUT this really stumped me.

    I decided to register at DD having gone a multiple number of times over the years to DD for reference etc.

    In reading the article on iframe pixel precision, the light came on and it worked for all browser type that I am testing the web site with; namely not using the viewport variables BUT using 100% for the width and the height. WOW, alll browsers work.

    Here is how I use the dhtmlwindow function:

    dhtmlwindow.open("ajaxbox", "iframe", ""+a+"", ""+b+"", "width=100%,height=100%,resize=0");

    which btw does also work at the resolutions of 1024x768 and 1280x1024 that I am optimizing the web site for.

    Bedankt

    btw, I was on the beta team in the development of JavaScript by Netscape 1995-1998; becmae their JavaScript Developer's Champion in 1997; moderator for the developer and user javascriot forums AND had the 1st FAQ on JavaScript on the internet on Netscape's web site in 1997.

    tot ziens
  3. molendijk's Avatar
    It's better to post your question here.
    ===
    Arie.
  4. molendijk's Avatar
    No, it's not: this thread is not about the embeddable player, but about the chromeless player.
    ===
    Arie.
  5. molendijk's Avatar
    Quote Originally Posted by jscheuer1
    I was just using this code in an actual job. Not the chopped stuff, but the valid cross browser tag. I discovered that these highlighted parts don't really seem to be required:
    Code:
    <!--[if IE]>
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" style="position:absolute;left:20%; top:20%; height:80%;width:80%">
    <![endif]-->
    <!--[if !IE]><!-->
    <object type="application/x-shockwave-flash" style="position:absolute;left:20%; top:20%; height:80%;width:80%" data="http://swf.tubechop.com/tubechop.swf?vurl=rw1j0NsIIeE&amp;start=164&amp;end=199&amp;cid=28051" >
    <!--<![endif]-->
    <param name="movie" value="http://swf.tubechop.com/tubechop.swf?vurl=rw1j0NsIIeE&amp;start=164&amp;end=199&amp;cid=28051" >
    <param name="allowFullScreen" value="true" >
    <param name="wmode" value="transparent" >
    </object>
    Thanks! You seem to be right there!
    Quote Originally Posted by jscheuer1
    Oh, and another thing, I think this is a TOS violation.
    But then the whole service provided by http://tubechop.com is a violation of the TouTube TOS!(?).
    ===
    Arie.
  6. molendijk's Avatar
    I'll react to the last two comments (by jscheuer) as soon as I can. At this moment, I'm an indirect victim of the ash cloud.
    ===
    Arie.
  7. jscheuer1's Avatar
    I think this is a violation of the YouTube TOS:

    You agree not to access User Submissions (defined below) or YouTube Content through any technology or means other than the video playback pages of the Website itself, the YouTube Embeddable Player, or other explicitly authorized means YouTube may designate.

    If you use the YouTube Embeddable Player on your website, you must include a prominent link back to the YouTube website on the pages containing the Embeddable Player and you may not modify, build upon, or block any portion of the Embeddable Player in any way.
  8. jscheuer1's Avatar
    Oh, and another thing, I think this is a TOS violation. From the YouTube TOS:

    You agree not to access User Submissions (defined below) or YouTube Content through any technology or means other than the video playback pages of the Website itself, the YouTube Embeddable Player, or other explicitly authorized means YouTube may designate.

    If you use the YouTube Embeddable Player on your website, you must include a prominent link back to the YouTube website on the pages containing the Embeddable Player and you may not modify, build upon, or block any portion of the Embeddable Player in any way.
  9. jscheuer1's Avatar
    I was just using this code in an actual job. Not the chopped stuff, but the valid cross browser tag. I discovered that these highlighted parts don't really seem to be required:

    Code:
    <!--[if IE]>
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" style="position:absolute;left:20%; top:20%; height:80%;width:80%">
    <![endif]-->
    <!--[if !IE]><!-->
    <object type="application/x-shockwave-flash" style="position:absolute;left:20%; top:20%; height:80%;width:80%" data="http://swf.tubechop.com/tubechop.swf?vurl=rw1j0NsIIeE&amp;start=164&amp;end=199&amp;cid=28051" >
    <!--<![endif]-->
    <param name="movie" value="http://swf.tubechop.com/tubechop.swf?vurl=rw1j0NsIIeE&amp;start=164&amp;end=199&amp;cid=28051" >
    <param name="allowFullScreen" value="true" >
    <param name="wmode" value="transparent" >
    </object>
    They're for getting it to work in IE while at the same time not making others barf, right? Well without them it worked fine in IE (5.5 thru 8), Opera (10), Firefox (3), Chrome (4), and Safari (4 Win).

    Additionally, if Flash wasn't installed in IE, and you use those highlighted parts, you end up with a stray fragment of a comment, something like:

    <!--<![endif]
    showing up on the page.
  10. molendijk's Avatar
    I'm afraid I didn't explain very well what I had in mind.
    If we have something like this:
    Code:
    <head>
    <script type="text/javascript">
    function HttpRequest(url){
    var pageRequest = false //variable to hold ajax object
    /*@cc_on
    @if (@_jscript_version >= 5)
    try {
    pageRequest = new ActiveXObject("Msxml2.XMLHTTP")
    }
    catch (e){
    try {
    pageRequest = new ActiveXObject("Microsoft.XMLHTTP")
    }
    catch (e2){
    pageRequest = false
    }
    }
    @end
    @*/
    
    if (!pageRequest && typeof XMLHttpRequest != 'undefined')
    pageRequest = new XMLHttpRequest()
    
    if (pageRequest){ //if pageRequest is not false
    pageRequest.open('GET', url, false) //get page synchronously
    pageRequest.send(null)
    
    document.write(pageRequest.responseText);
    }
    }
    </script>
    
    </head>
    
    <body>
    
    <a href="javascript:void(0)" onclick = "document.getElementById('external').style.display = 'block'">external page</a> 
    
    <div id="external"  style="display:none;"><script type = "text/javascript">HttpRequest("external.html")</script></div>
    
    </body>
    then clicking on the link (faking an update of the page) gives us the text of the external page PLUS its code. So there's no need to add the script to the (main) page using the DOM.
    (In spite of this, if the external file is a HTML-menu depending partially on javascript, then it may not work well in IE if the menu contains a mixture of internal and external scripts. The workaround is to make all scripts (in the menu) external).
    We would only have to add the script to the main page if we used another inclusion method, like innerHTML or appendChild.
    ===
    Arie
  11. jscheuer1's Avatar
    I don't think so. My suggestion is:

    1. Make the script external (what you are doing anyway).
    2. Add the script to the page using the DOM.
  12. molendijk's Avatar
    If one is going to make one's scripts external anyway, one may simply create a DOM script tag, name the external script as its src attribute, and append the tag to the document.
    That would be (almost) the same thing as (i) making the scripts external; (ii) removing them from the file we want to insert into the encompassing page (to avoid conflicts) and then (iii) putting them directly in the (encompassing) page. So that would mean that some extra steps should be made, since I only do (i). Right? (or wrong?).
    ===
    Arie.
  13. jscheuer1's Avatar
    Ideally the responseXML, not the responseText should be used with AJAX. However, IE handles this poorly if at all. One may convert the responseText to an XML document of sorts, but you still are dealing with a string.

    It's not document.write that is the real problem here, the innerHTML property has many of the same issues. Neither method would be required if the responseXML could reliably be used in IE. It is reliance upon the responseText that forces us to use string methods. The responseText is a string.

    If one is going to make one's scripts external anyway, one may simply create a DOM script tag, name the external script as its src attribute, and append the tag to the document. Scripts may be executed concurrent with/upon AJAX import in several ways. The one you mention is perhaps the least desirable. Another method is the jQuery .live() method. Yet another is to use event listeners/attachments in such a way as to ensure that imported content will react as desired without having to invoke a new initialization of the script each time new content for it arrives.
  14. molendijk's Avatar
    I think it's YouTiube's fault, since it never happens on DailyMotion and sometimes only on YouTube.
    I developed the thing a little bit further here. In the (main-)menu, scroll down and click on Bach/Loussier: Air on the G-string . Its a DailyMotion-video. You'll see there's no problem there.

    Thanks for the comment.
    ===
    Arie.
  15. Schmoopy's Avatar
    It's a good idea, since I come across this sort of thing all the time. The only thing is, after pausing the video and then pressing play again, it either seems to restart from the beginning, or just sort of freeze.
    Don't know if this is the fault of the youtube video or the options that you changed.
    But when viewing the video directly, it doesn't seem to happen.
  16. molendijk's Avatar
    I put the <param name="flashvars" value="autoplay=true" > in the demo.
    ===
    Arie.
  17. smansakra's Avatar
    i like what you write here
  18. molendijk's Avatar
    I found out how we can force chopped video's to start playing automatically. Just add:
    Code:
    <param name="flashvars" value="autoplay=true" >
    (It's not in the demo).
    ===
    Arie.
    Updated 10-02-2009 at 12:05 PM by molendijk (Added a feature to chopped video's)
  19. molendijk's Avatar
    John, you're right about the title. I should have chosen something like HTML 4.01 Strict Video Include & Chopping Parts from YouTube video's.
    Anyhow, the point of my code is precisely that we don't need the embed tag for including video's. That's why I put the WC3HTML4.01-icon in the demo.
    ===
    Arie.
  20. jscheuer1's Avatar
    Poor choice of title. Although I know you probably didn't mean it like that, the embed tag is not valid in HTML 4.01 Strict.
Page 2 of 3 FirstFirst 123 LastLast