5 Replies Latest reply: May 3, 2009 8:28 AM by MurraySummers RSS

    while executing ObjectTag in flash.htm, a javascript error occurred

    Irishlad67 Community Member

      I'm attempting to place a SWF file in an editable region on a page created from a template.  I get the error: While executing ObjectTag in flash.htm, a javascript error occurred.  I saw on another sight that someone found the problem which was editable regions remove the head tag information.  But I do not know how to enter this info.  I tried just putting  a </head> and a head and body tag in code view inside the name region but this did not work. Any help would be appreciated.

        • 1. Re: while executing ObjectTag in flash.htm, a javascript error occurred
          MurraySummers ACP/MVPs

          The page is looking for a javascript file that has not been uploaded.  Did you upload the Scripts folder in your local site?

           

          Please do not try to modify your code until you understand a bit more about the code.  The 'solution' you found has nothing to do with your problem.

          • 2. Re: while executing ObjectTag in flash.htm, a javascript error occurred
            Irishlad67 Community Member

            I haven't uploaded it yet, only previewing it.  I get the error when trying to place the swf in the editable region, not when trying to view it online.  I have a regular page not from a template that works just fine, its only in editable regions. But yes I have the scripts folder with the Expressinstall.swf and swfobject_modified.js files that were added when I successfully put the first working swf on the page.

            • 3. Re: while executing ObjectTag in flash.htm, a javascript error occurred
              MurraySummers ACP/MVPs

              I haven't uploaded it yet, only previewing it.  I get the error when trying to place the swf in the editable region, not when trying to view it online.  I have a regular page not from a template that works just fine, its only in editable regions. But yes I have the scripts folder with the Expressinstall.swf and swfobject_modified.js files that were added when I successfully put the first working swf on the page.

               

              I guess we'll need to see your page and its code then.  Please paste the code into a reply here.  Or better, go ahead and upload it somewhere (with dependent files) and give us a link.

              • 4. Re: while executing ObjectTag in flash.htm, a javascript error occurred
                Irishlad67 Community Member

                Main.dwt

                 

                <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                <html xmlns="http://www.w3.org/1999/xhtml">
                <head>
                <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                <title>Untitled Document</title>
                <style type="text/css">
                <!--
                body {
                 background-color: #00C;
                 margin-left: 0px;
                 margin-top: 0px;
                 margin-right: 0px;
                 margin-bottom: 0px;
                }
                #container {
                 background-color: #FFF;
                 width: 900px;
                 margin-right: auto;
                 margin-left: auto;
                }
                #flashbanner {
                 background-color: #FFF;
                 height: 350px;
                 width: 900px;
                }
                #title {
                 background-color: #FFF;
                 height: 35px;
                 width: 900px;
                }
                #navtop {
                 background-color: #FFF;
                 height: 100px;
                 width: 900px;
                }
                #spacer1 {
                 background-color: #00C;
                 height: 20px;
                 width: 900px;
                }
                #navleft {
                 background-color: #FFF;
                 float: left;
                 height: 1200px;
                 width: 250px;
                 border-right-width: medium;
                 border-right-style: solid;
                 border-right-color: #00C;
                }
                #mainbody {
                 background-color: #FFF;
                 height: 1200px;
                 width: 646px;
                 float: left;
                }
                #spacer2 {
                 background-color: #00C;
                 height: 20px;
                 width: 900px;
                 clear: both;
                }
                #navbottom {
                 background-color: #FFF;
                 height: 100px;
                 width: 900px;
                }
                #spacer3 {
                 background-color: #00C;
                 height: 20px;
                 width: 900px;
                }
                -->
                </style></head>
                <body>
                <div id="container"><!-- TemplateBeginEditable name="flashbanner" -->
                  <div id="flashbanner">flashbanner</div>
                <!-- TemplateEndEditable --><!-- TemplateBeginEditable name="title" -->
                <div id="title">title</div>
                <!-- TemplateEndEditable -->
                <div id="navtop">nav top</div>
                  <div id="spacer1"></div>
                  <div id="navleft">nav left</div>
                  <!-- TemplateBeginEditable name="mainbody" -->
                  <div id="mainbody">mainbody</div>
                  <!-- TemplateEndEditable -->
                  <div id="spacer2"></div>
                  <div id="navbottom">nav bottom</div>
                  <div id="spacer3"></div>
                container</div>
                </body>
                </html>
                
                

                 

                Index.htm

                 

                <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/main.dwt" codeOutsideHTMLIsLocked="false" -->
                <head>
                <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                <title>Untitled Document</title>
                <style type="text/css">
                <!--
                body {
                 background-color: #00C;
                 margin-left: 0px;
                 margin-top: 0px;
                 margin-right: 0px;
                 margin-bottom: 0px;
                }
                #container {
                 background-color: #FFF;
                 width: 900px;
                 margin-right: auto;
                 margin-left: auto;
                }
                #flashbanner {
                 background-color: #FFF;
                 height: 350px;
                 width: 900px;
                }
                #title {
                 background-color: #FFF;
                 height: 35px;
                 width: 900px;
                }
                #navtop {
                 background-color: #FFF;
                 height: 100px;
                 width: 900px;
                }
                #spacer1 {
                 background-color: #00C;
                 height: 20px;
                 width: 900px;
                }
                #navleft {
                 background-color: #FFF;
                 float: left;
                 height: 1200px;
                 width: 250px;
                 border-right-width: medium;
                 border-right-style: solid;
                 border-right-color: #00C;
                }
                #mainbody {
                 background-color: #FFF;
                 height: 1200px;
                 width: 646px;
                 float: left;
                }
                #spacer2 {
                 background-color: #00C;
                 height: 20px;
                 width: 900px;
                 clear: both;
                }
                #navbottom {
                 background-color: #FFF;
                 height: 100px;
                 width: 900px;
                }
                #spacer3 {
                 background-color: #00C;
                 height: 20px;
                 width: 900px;
                }
                -->
                </style></head>
                <body>
                <div id="container"><!-- InstanceBeginEditable name="flashbanner" -->
                  <div id="flashbanner">flashbanner</div>
                <!-- InstanceEndEditable --><!-- InstanceBeginEditable name="title" -->
                <div id="title">title</div>
                <!-- InstanceEndEditable -->
                <div id="navtop">nav top</div>
                  <div id="spacer1"></div>
                  <div id="navleft">nav left</div>
                  <!-- InstanceBeginEditable name="mainbody" -->
                  <div id="mainbody">mainbody</div>
                  <!-- InstanceEndEditable -->
                  <div id="spacer2"></div>
                  <div id="navbottom">nav bottom</div>
                  <div id="spacer3"></div>
                container</div>
                </body>
                <!-- InstanceEnd --></html>
                
                
                • 5. Re: while executing ObjectTag in flash.htm, a javascript error occurred
                  MurraySummers ACP/MVPs

                  hank you.  A problem with your Template page is immediately apparent.  The Template was not created properly.  Note that there are two missing editable regions in the head of the page:

                   

                  1. A region called "doctitle" that wraps the <title></title> tags.
                  2. A region called "head" that is placed above the </head> tag.

                   

                  Do this -

                   

                  Create a new page (Basic HTML).

                  Use FILE | Save as Template....

                  Look at the code in the head region of the page, particularly the editable

                  region around the <title> tag, and the other editable region in the head

                  called "head".

                  Make your template file look like that.

                   

                  Always use FILE | Save as Template when you create your templates and you

                  won't have this problem again.

                   

                  When you save your modified Template file, and allow it to update your child pages, then you should try the Flash insertion again.