2 Replies Latest reply on Mar 16, 2010 7:56 AM by Ballydunn

    Javascript problem

    Ballydunn

      This is a redo of a previous thread which I totally screwed up.

       

      Question:

      Running Mac Leopard Server, CS3. Created a simple Flash slideshow using the Modern Photo Slideshow Template. Placed into DW page as dynamic Flash element. Slideshow is 2 photos, and uses manual buttons only. When viewed in DW preview only the first frame shows and buttons don't work (when viewed in Flash preview, it works as expected). When viewed in browser, nothing shows (although the space is visible), unless I turn off Javascript in the browser; then the first frame shows but nothing else works.

       

      Ned Murphy replied:

      If turning off the javascript makes the file at least appear, then that part of the problem likely means the AC_RunActiveContent.js file is not where it needs to be (if it is not coded directly into the html page).  In the head of your html page should be some indication of where that file needs to be (if it is not coded into the head section directly).  Turning off javascript is forcing the <noscript> section to load the file.

       

      Response:

      There are 2 files (AC_RunActiveContent.js(2008) and AC_ActiveX.js(2009)) at the location specified in the Head; I'm obviously missing something. Any suggestions appreciated.

        • 1. Re: Javascript problem
          Ballydunn Level 1

          In addition to the info about the Head content, the following is in the body (note that the 'noscript' works but the 'javascript' version doesn't):

           

          <div align="center">
          <script type="text/javascript">
          AC_FL_RunContent( 'codebase','photos/<?php echo $row_rsDispatches2['Image']; ?>','width','450','height','350','src','photos/<?php echo $row_rsDispatches2['Image']; ?>','loop','false','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','play','false','movie','photos/<?php echo $row_rsDispatches2['Image']; ?>' ); //end AC code
          </script>
          <noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="photos/<?php echo $row_rsDispatches2['Image']; ?>" width="450" height="350">
            <param name="movie" value="photos/<?php echo $row_rsDispatches2['Image']; ?>" />
            <param name="LOOP" value="false" /><param name="PLAY" value="false" />
            <embed src="photos/<?php echo $row_rsDispatches2['Image']; ?>" width="450" height="350" loop="false" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" play="false"></embed>
          </object>
                  </noscript></div>
          

           

          Any help appreciated.

          • 2. Re: Javascript problem
            Ballydunn Level 1

            Given the lack of response from the forum, I continued to hack at this one until it finally gave, and am now offering the solution to the foum.

             

            As seen in the code above, the original slideshow action is contained inside an "object" tag enclosed in a "noscript" tag. This "noscript" version worked fine in any browser if javascript was turned off in the browser. This led me to delete both the javascript code as well as the "noscript" wrapping the "object" tag - and my slideshow worked fine in all browsers.

             

            The problem appears to be Dreamweaver; in order to allow some versions of Internet Exploder to view the slideshow, it enclosed the "object" tag in the "noscript" code and then added the javascript - which unfortunately doesn't work (at least not in my configuration). So after wasting a lot of time trying to make the javascript work, I changed the focus of the problem and found the solution in the Help documents under "Converting active content" (which describes the issue in detail).

             

            After turning off this "feature" in the Preferences, a line of code can be added to any page containing this problem, that will trick Exploder into processing the code (Commands menu > Insert Mark of the Web).

             

            Regards to the Forum