Embedded video and error message

  • DesktopboB, 14th Feb 2012 4:31 pm

    HTML-Kit Tools 20120202
    Well, I've run up against another head scratcher.
    I'm documenting all I did to try to find a solution, but am still coming up empty.
    The page is up and running online, the code validates and, best of all, the client is happy (!), so there is no need to worry about what code I used, but what I need is a solution to what Tools is doing.

    A client contacted me and wanted a YouTube video embedded in a web page.
    I went to the page for the video and copied the appropriate embed code and pasted it itnto the page I was constructing.
    Switch to the preview window of Tools and then I get a script error message...something about line 1 and word 1 with 'video' undefined.
    Takes around 50+ clicks of "yes" to get the window to go away (would have hit no, but wanted to see what the page was going to display). (Note: just tried the "no" and the message won't go away either).
    Realized that the iframe YouTube wants me to use is more HTML 5 compatible and that my version of Tools is not the current version.
    Hasten back to the other computer which has the latest Tools.
    Open the page in question and there is no problem.
    Back to the other computer where I install the latest Tools update.
    Re-open the page and get the same error message.
    In all cases, however, the video displays and plays correctly once the error box is clicked into oblivion.
    However, when the page is closed, the error message comes up once again and won't go away until the clicking has been done.

    No error messages appear when previewing in either IE or Firefox, the page displays fine on the web and the client has tried the page out on a couple of mobile devices and there is no problem there.
    The page also validates with the W3C.
    Will also add that both computers are running up to date XP.

    So, here's my question(s):
    The computer where I encounter the problem is running the page from the local hard drive, while the computer with no problem is accessing the page remotely from my home network. Is this what's causing the difference in the preview between the two machines?
    If so, is there a setting I can change for the preview of local files within Windows?
    Is this a problem with the preview function of Tools itself?

    Thanks,
    boB

    • Dave P, 14th Feb 2012 5:48 pm

      DesktopboB wrote:

      HTML-Kit Tools 20120202
      Well, I've run up against another head scratcher.
      I'm documenting all I did to try to find a solution, but am still coming up empty.
      The page is up and running online, the code validates and, best of all, the client is happy (!), so there is no need to worry about what code I used, but what I need is a solution to what Tools is doing.

      A client contacted me and wanted a YouTube video embedded in a web page.
      I went to the page for the video and copied the appropriate embed code and pasted it itnto the page I was constructing.
      Switch to the preview window of Tools and then I get a script error message...something about line 1 and word 1 with 'video' undefined.
      Takes around 50+ clicks of "yes" to get the window to go away (would have hit no, but wanted to see what the page was going to display). (Note: just tried the "no" and the message won't go away either).
      Realized that the iframe YouTube wants me to use is more HTML 5 compatible and that my version of Tools is not the current version.
      Hasten back to the other computer which has the latest Tools.
      Open the page in question and there is no problem.
      Back to the other computer where I install the latest Tools update.
      Re-open the page and get the same error message.
      In all cases, however, the video displays and plays correctly once the error box is clicked into oblivion.
      However, when the page is closed, the error message comes up once again and won't go away until the clicking has been done.

      No error messages appear when previewing in either IE or Firefox, the page displays fine on the web and the client has tried the page out on a couple of mobile devices and there is no problem there.
      The page also validates with the W3C.
      Will also add that both computers are running up to date XP.

      So, here's my question(s):
      The computer where I encounter the problem is running the page from the local hard drive, while the computer with no problem is accessing the page remotely from my home network. Is this what's causing the difference in the preview between the two machines?
      If so, is there a setting I can change for the preview of local files within Windows?
      Is this a problem with the preview function of Tools itself?

      Thanks,
      boB
      Do you have an old version of IE installed on the old computer? Tools
      used IE to preview. The iframe links that YouTube creates are not HTML
      5 specific, so I don't think that's the problem. I have IE9 installed
      on my computer and have no problem previewing embedded YouTube vids. I
      work a lot on musicians' web sites so I ember a lot of YouTube vids.
      Dave Pyles

      • Dave P, 14th Feb 2012 6:45 pm

        Dave Pyles wrote:

        DesktopboB wrote:

        HTML-Kit Tools 20120202
        Well, I've run up against another head scratcher.
        I'm documenting all I did to try to find a solution, but am still
        coming up empty.
        The page is up and running online, the code validates and, best of
        all, the client is happy (!), so there is no need to worry about what
        code I used, but what I need is a solution to what Tools is doing.

        A client contacted me and wanted a YouTube video embedded in a web page.
        I went to the page for the video and copied the appropriate embed code
        and pasted it itnto the page I was constructing.
        Switch to the preview window of Tools and then I get a script error
        message...something about line 1 and word 1 with 'video' undefined.
        Takes around 50+ clicks of "yes" to get the window to go away (would
        have hit no, but wanted to see what the page was going to display).
        (Note: just tried the "no" and the message won't go away either).
        Realized that the iframe YouTube wants me to use is more HTML 5
        compatible and that my version of Tools is not the current version.
        Hasten back to the other computer which has the latest Tools.
        Open the page in question and there is no problem.
        Back to the other computer where I install the latest Tools update.
        Re-open the page and get the same error message.
        In all cases, however, the video displays and plays correctly once the
        error box is clicked into oblivion.
        However, when the page is closed, the error message comes up once
        again and won't go away until the clicking has been done.

        No error messages appear when previewing in either IE or Firefox, the
        page displays fine on the web and the client has tried the page out on
        a couple of mobile devices and there is no problem there.
        The page also validates with the W3C.
        Will also add that both computers are running up to date XP.

        So, here's my question(s):
        The computer where I encounter the problem is running the page from
        the local hard drive, while the computer with no problem is accessing
        the page remotely from my home network. Is this what's causing the
        difference in the preview between the two machines?
        If so, is there a setting I can change for the preview of local files
        within Windows?
        Is this a problem with the preview function of Tools itself?

        Thanks,
        boB
        Do you have an old version of IE installed on the old computer? Tools
        used IE to preview. The iframe links that YouTube creates are not HTML 5
        specific, so I don't think that's the problem. I have IE9 installed on
        my computer and have no problem previewing embedded YouTube vids. I work
        a lot on musicians' web sites so I ember a lot of YouTube vids.
        Dave Pyles

        OK, I'm going to try again with out the typos:

        Do you have an old version of IE installed on the computer that's giving
        you the problem? Tools uses IE to preview. The iframe links that
        YouTube creates are not HTML 5 specific, so I don't think that's the
        problem. I have IE9 installed on my computer and have no problem
        previewing embedded YouTube vids. I work a lot on musicians' web sites
        so I embed a lot of YouTube vids.
        Dave Pyles

        • DesktopboB, 15th Feb 2012 11:20 am

          Dave,
          IE8 on both machines.

          Any other ideas?

          Don't you hate typos....LOL!

          boB

          • Dave P, 15th Feb 2012 11:38 am

            DesktopboB wrote:

            Dave,
            IE8 on both machines.

            Any other ideas?

            Don't you hate typos....LOL!

            boB
            No other ideas. -Dave

            • Dave P, 15th Feb 2012 11:41 am

              Dave Pyles wrote:

              DesktopboB wrote:

              Dave,
              IE8 on both machines.

              Any other ideas?

              Don't you hate typos....LOL!

              boB
              No other ideas. -Dave
              Copy and paste one of your embed codes into a message here so I can see
              exactly what you are putting into your pages. It might give me some clues.

              Dave Pyles

              • DesktopboB, 16th Feb 2012 4:39 pm

                Dave,
                Here's the code.
                I've edited the tag, since I'm not sure what would happen if I put this into the boards...you might end up with the video and no code...hehe!

                Took off the opening "greater than" and the closing "less than" (or the other way around, I can never remember which is called which).

                iframe width="540" height="304" src="http://www.youtube.com/embed/VideoID?rel=0" frameborder="0" ></iframe
                

                Other than that, this is exactly how the code was delivered by YouTube.

                I will stress again, I have valid w3c validation, the page displays correctly in both IE8 and Firefox 10 and even displays correctly in Tools once the error message gets closed down.

                All I'm really trying to find out is how to get the error message from coming up when previewing in Tools.

                My guess, after a bit more thinking, is that it has something to do with how IE reacts to displaying local files, but I'm not totally sure.

                Thanks again.

                boB

                • Dave P, 16th Feb 2012 5:08 pm

                  DesktopboB wrote:

                  Dave,
                  Here's the code.
                  I've edited the tag, since I'm not sure what would happen if I put this into the boards...you might end up with the video and no code...hehe!

                  Took off the opening "greater than" and the closing "less than" (or the other way around, I can never remember which is called which).
                  iframe width="540" height="304" src="http://www.youtube.com/embed/VideoID?rel=0" frameborder="0"></iframe

                  Other than that, this is exactly how the code was delivered by YouTube.

                  I will stress again, I have valid w3c validation, the page displays correctly in both IE8 and Firefox 10 and even displays correctly in Tools once the error message gets closed down.

                  All I'm really trying to find out is how to get the error message from coming up when previewing in Tools.

                  My guess, after a bit more thinking, is that it has something to do with how IE reacts to displaying local files, but I'm not totally sure.

                  Thanks again.

                  boB

                  That's a nice piece of music. Try this one:

                  <iframe width="560" height="315"
                  src="http://www.youtube.com/embed/VideoID" frameborder="0"
                  allowfullscreen></iframe>
                  

                  Dave Pyles

                  • DesktopboB, 17th Feb 2012 11:32 am

                    Dave,
                    I realize the video can be linked, but could you please remove the video from the boards, as it does, technically, belong to a client?

                    Thanks,
                    boB

                    • HTML-Kit Support, 17th Feb 2012 12:16 pm

                      On 2/17/2012 11:32 AM, DesktopboB wrote:

                      Dave,
                      I realize the video can be linked, but could you please remove the
                      video from the boards, as it does, technically, belong to a client?

                      Thanks,
                      boB

                      Hi boB,

                      As you may know, this is a newsgroup + web forum. Newsgroup posts are
                      downloaded to local computers so there's nothing we can do about those
                      posts. The YouTube video ID was removed from web forum posts.

                      Please don't forget that these are public newsgroups/forums. Please
                      don't post things that you don't want everyone to see.

                      Chami

                      • Dave P, 17th Feb 2012 1:01 pm

                        HTML-Kit Support wrote:

                        On 2/17/2012 11:32 AM, DesktopboB wrote:

                        Dave,
                        I realize the video can be linked, but could you please remove the
                        video from the boards, as it does, technically, belong to a client?

                        Thanks,
                        boB

                        Hi boB,

                        As you may know, this is a newsgroup + web forum. Newsgroup posts are
                        downloaded to local computers so there's nothing we can do about those
                        posts. The YouTube video ID was removed from web forum posts.

                        Please don't forget that these are public newsgroups/forums. Please
                        don't post things that you don't want everyone to see.

                        Chami
                        Bob,

                        Did the link work for you?
                        Dave Pyles

                        • DesktopboB, 20th Feb 2012 11:49 am

                          Chami and Dave,
                          Please understand I am not in the least upset, nor did I have a problem with the code being put on the boards here, otherwise, I wouldn't have posted it.
                          What I didn't want to see was the video itself being linked from here, since seeing the video itself didn't solve the problem--I already know that it can be viewed on the web.

                          The reason for posting the code was to attempt to delve into the basic problem, which I will restate here and it the only issue that needs to be addressed:

                          1) The above code was pasted into a page being edited in Tools.
                          2) When the page was previewed, a Windows Script Error message comes up.
                          3) This error message does not come up when the page is previewed in an external browser (IE8, current Firefox, current Safari).
                          4) The message does not come up when the page is Previewed in Tools on a remote computer through my home network.
                          5) The message only appears in when it is Previewed in the current version of Tools as a local file.

                          What is it in the code that is causing the error message???
                          Is it a problem in Tools??

                          That's what I need to know.

                          Happy President's Day!!

                          boB

                          • Dave P, 20th Feb 2012 1:41 pm

                            DesktopboB wrote:

                            Chami and Dave,
                            Please understand I am not in the least upset, nor did I have a problem with the code being put on the boards here, otherwise, I wouldn't have posted it.
                            What I didn't want to see was the video itself being linked from here, since seeing the video itself didn't solve the problem--I already know that it can be viewed on the web.

                            The reason for posting the code was to attempt to delve into the basic problem, which I will restate here and it the only issue that needs to be addressed:

                            1) The above code was pasted into a page being edited in Tools.
                            2) When the page was previewed, a Windows Script Error message comes up.
                            3) This error message does not come up when the page is previewed in an external browser (IE8, current Firefox, current Safari).
                            4) The message does not come up when the page is Previewed in Tools on a remote computer through my home network.
                            5) The message only appears in when it is Previewed in the current version of Tools as a local file.

                            What is it in the code that is causing the error message???
                            Is it a problem in Tools??

                            That's what I need to know.

                            Happy President's Day!!

                            boB
                            Are you sure it was the iframe tag that was causing the error message to
                            be thrown? In my experience I have had bad javascript on a page to
                            cause the IE browser in Tools to throw error messages, but never an
                            iframe tag with nothing but HTML attributes in it.

                            I just tried your tag in the Tools preview (using a different VideoID
                            but the same tag and attributes) and I get no error message in the Tools
                            preview.

                            Just for an experiment try putting the offending iframe tag into a page
                            by itself and see whether you still get the error. (Make sure you use
                            the same DOC TYPE.)

                            When IE throws a script error it shows the URL of the script causing the
                            error. Is the script URL something at Youtube or somewhere else?
                            Dave Pyles

                            • DesktopboB, 21st Feb 2012 5:48 pm

                              Dave,
                              Did the copy and paste...same error.

                              Digging a little deeper, I find that the error is as follows:

                              Internet Explorer Script Error
                              An error has occurred in the script on this page
                              Line: 1
                              Char: 1
                              Error 'video' is undefined
                              Code: 0

                              Now, in the back of my mind, I recall that Chami addressed this issue somewhere in the past as a problem with getting IE to play nicely with Tools.

                              So, Chami, is this a problem with IE and Tools?

                              And, if so, is there a way to change a setting or two to fix the problem?

                              Thanks,
                              boB

                              • HTML-Kit Support, 21st Feb 2012 6:19 pm

                                On 2/21/2012 5:48 PM, DesktopboB wrote:

                                Dave,
                                Did the copy and paste...same error.

                                Digging a little deeper, I find that the error is as follows:

                                Internet Explorer Script Error
                                An error has occurred in the script on this page
                                Line: 1
                                Char: 1
                                Error 'video' is undefined
                                Code: 0

                                Now, in the back of my mind, I recall that Chami addressed this issue
                                somewhere in the past as a problem with getting IE to play nicely
                                with Tools.

                                So, Chami, is this a problem with IE and Tools?

                                And, if so, is there a way to change a setting or two to fix the
                                problem?

                                Thanks,
                                boB

                                Hi boB,

                                You shouldn't have to change any settings, but do you have IE9 installed
                                on your system? Some iframe-ed content use crazy amount of scripting
                                which makes it difficult to track down issues like this. If you have IE
                                9 though, it should be able to display HTML5 video tags natively.

                                You can also use Extended Preview option on the top right hand corner of
                                the menu bar to test your pages in any browser/device.

                                Chami

Advertisements