Skip navigation
ionara17
Currently Being Moderated

Javascript does not work when I move files to another drive

Apr 19, 2013 8:09 AM

Tags: #files #javascript #move #drive

I have a website that as an imbedded swf file created in Flash Builder. The html has a javascript code that controls the size of a table. Depending on how big the table is the website''s height increases or decreases. However this javascript only works when the files are in the D drive and when I ran the webpage from inside Dreamweaver. If I copy the files to another drive, the javascript does not work anymore if not inside D drive. It used to work before but  not. I got the data directly from the production server to make sure I was not making any major changes. The code in the production server works.  I have no idea why it is doing this. Can you guys offer any help? I've tried many things and nothing works. Thanks.

 

Here is the html:

 

 

 

 

      

 

<!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"  lang="en-US">

 

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Texas Forestry Economic Impact</title>

<style type="text/css">

 

 

<script type="text/javascript">

function updateSwfSize(myHeight, myWidth)

    {

    var flexibleGorillaSwf = swfobject.getObjectById("FlashID");

    flexibleGorillaSwf.height = myHeight;

    flexibleGorillaSwf.width = myWidth;

 

    }

 

 

</script>

 

 

<script type="text/javascript" src="swfobject.js">

 

</script>

<script type="text/javascript">

swfobject.registerObject("FlashID", "10.0.0");

</script>

 

</head>

 

<body id="body" >

 

 

<div class="container">

 

<table width="100%" border="0" cellpadding="0" cellspacing="0">

       <tr>

      <td bgcolor="#6f8d5c">

    <img src="assets/banner_maroon.png" width="960" height="120" usemap="#map-1" alt="Texas Forest Service " style="border:none;"/>

 

    <map name="map-1" id="imagemap">

    <area shape="rect" coords="26,5,139,115" href="About.html" alt="Link to Texas Forest Sector Economic Impact Home"/>    

    <area shape="rect" coords="142,3,582,27" href="About.html" alt="Link to Texas Forest Sector Economic Impact Home"/>

    <area shape="rect"  coords="159,27,324,46" href="EcoImpactTX.html" alt="Link to Texas Forest Sector Economic Impact Summary Tool" />

    <area shape="rect"  coords="755,47,1201,200" href= "http://txforestservice.tamu.edu/main/default.aspx" alt="Link to Texas Forest Service Website" />

     </map>

     </td>

  </tr>

      <tr>

    <td height="31" bgcolor="#6f8d5c"><a href="http://www.texasforestinfo.com">TexasForestInfo.com</a>  -  <a href="About.html"  >About</a>  -  <a href="Highlights.html">Highlights</a>  -  <a href="EcoImpactTX.html" target="_self"><span style="font-size:medium; font-weight:bold">Summary Tool</span></a>  -  <a href="Maps.html" target="_self">Maps</a>  -  <a href="Trends.html" target="_self">Trends</a>  -  <a href="Reports.html" target="_self">Download Reports</a>  -  <a href="FAQs.html" target="_self">FAQs</a>  -  <a href="ContactUs.html" target="_self"> Contact Us</a>  -  <a href="http://txforestservice.tamu.edu/main/default.aspx">TFS Home</a></td>

  </tr>

   <tr>

    <td height = "0" bgcolor="#FFFFFF"> </td>

  </tr>

</table>

<p><span style="font-size:x-large; color:#000">Summary Tool </span> <span style="font-style:italic">(click one of the buttons below to start)</span></p>

 

<div class="swfcontainer">

  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="930" height="1000" id="FlashID" title="map" >

    <param name="movie" value="New_ecoimpact_april25th_newPDF.swf" />

    <param name="quality" value="high" />

    <param name="swfversion" value="6.0.65.0" />

    <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don't want users to see the prompt. -->

    <param name="expressinstall" value="Scripts/expressInstall.swf" />

    <param name="SCALE" value="exactfit" />

 

    <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->

    <!--[if !IE]>-->

    <object name="FlashID" data="New_ecoimpact_april25th_newPDF.swf" type="application/x-shockwave-flash" width="930" height="1000" pluginspage="http://www.adobe.com/go/getflashplayer" >

      <!--<![endif]-->

      <param name="quality" value="high" />

      <param name="swfversion" value="6.0.65.0" />

      <param name="expressinstall" value="Scripts/expressInstall.swf" />

      <param name="SCALE" value="exactfit" />

 

      <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->

      <div>

        <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>

        <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.g if" alt="Get Adobe Flash player" width="112" height="33" /></a></p>

        </div>

      <!--[if !IE]>-->

      </object>

    <!--<![endif]-->

  </object>

 

</div>

<p><!-- end .content --></p>

<div class="footer">

  <table width="100%" border="0" cellpadding="0" cellspacing="0">

  <tr>

       <td width="0" height="31" bgcolor="#6f8d5c" ><a href="http://www.texasforestinfo.com"><span style="color:#FFF">TexasForestInfo.com</span></a>  -  <a href="About.html" >About</a>  -  <a href="Highlights.html"><span style="color:#FFF">Highlights</span></a>  -  <a href="EcoImpactTX.html"  target="_self"><span  style="color:#FFF; font-size:medium; font-weight:bold;" >Summary Tool</span></a>  -  <a href="Maps.html" target="_self"><span  style="color:#FFF;">Maps</span></a>  -  <a href="Trends.html" target="_self"><span  style="color:#FFF; " >Trends</span></a>  -  <a href="Reports.html" target="_self"><span  style="color:#FFF; ">Download Reports</span></a>  -  <a href="FAQs.html" target="_self"><span  style="color:#FFF">FAQs</span></a>  -  <a href="ContactUs.html" target="_self"> <span  style="color:#FFF">Contact Us</span></a>  -  <a href="http://txforestservice.tamu.edu/main/default.aspx"><span  style="color:#FFF">TFS Home</span></a></td>

  </tr>

</table>

</div>

<div class="footer2">

<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">

  <td width="108" style="padding-top:5px; "  > </td>

        <td width="750" style="line-height: 16px; padding-top: 5px; text-align: center; color:#666; padding-left:12px; padding-bottom:5px">

          Copyright © 2012 Texas  Texas A&amp;M Forest Service. All rights reserved. <br />

            <a href='http://tfsweb.tamu.edu/main/article.aspx?id=6698' target='_blank' style="color:#666; padding-left:12px; ">Accessibilty, Site Policies & Public Notices</a>

 

 

        </td>

        <td width="102" style="text-align: right; padding-right: 22px"> </td>

</table>

</div>

</div>

 

 

 

</body>

</html>

 
Replies
  • Currently Being Moderated
    Apr 19, 2013 8:12 AM   in reply to ionara17

    I see a reference to "swfobject.js" did you also copy that file over and place it in the same directory as the page itself?

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 19, 2013 8:27 AM   in reply to ionara17

    There's nothing in your code that is looking at the previous drive from what I can see. Everything appears to be document relative or absolute paths. If everything was copied over, and kept in an identical directory structure, there's no reason it shouldn't work.

     

    If you moved any files into or out of folders that aren't exact duplicates of what's on the original drive, it would break though.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 19, 2013 8:33 AM   in reply to ionara17

    If it were me, I would copy the entire site folder from one drive onto the other. Then in DW, I would update the Site Definition to point to my newly copied folder on the new drive.

     

    If I were moving my site from one drive to a new drive and didn't plan on touching the old copy again.

     

    What is it that you're trying to do exactly?

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 19, 2013 10:04 AM   in reply to ionara17

    This isn't making a lot of sense.

     

    Are your original D drive files showing that file://D... style link in their source?

     

    When you copied from D to P, did you use DW to make the copies, or did you use your OS?

     

    If you used DW, don't.

     

    Copy the files outside DW, then make a new site file and set the new folder on P as the "Where on this computer do you want to store your files".

     

    As long as your links in the original files are not absolute paths to the hard drive they're on (you want document relative links) there should be no issue.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 19, 2013 10:48 AM   in reply to ionara17

    In DW go to Site > New Site

     

    The first screen should ask for the site name and the Local Site Folder. Enter whatever name you like and browse to the newly copied folder. Pay very close attention to where you browse here. Make sure you browse to the folder on the correct drive. This could be why it wasn't working, you may have inadvertantly had the path set to the D drive instead of the P drive.

     

    If the drive path is set to P, and there are no file://D... style links in the copied pages, there is literally no way DW could possibly add in the file://D... to your links.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 19, 2013 10:48 AM   in reply to ionara17

    Site > New Site > Advanced.   See screenshot:

    DW-CS6-LocalSiteFolderDef.jpg

     

     

    Nancy O.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 19, 2013 11:04 AM   in reply to ionara17

    OK. Let's start from scratch.

     

    1. From outsite DW, copy the site folder (named?) to the new drive

     

    2. Then from DW, go to Site > New Site

     

    3. Add a Site Name

     

    4. Click the folder icon to the right of the Local Site Folder text area and browse to the newly copied folder from step 1 (make sure the path is to the P drive version, not the D drive version)

     

    5. Click Save. You can add FTP and everything else later (with Site > Manage Sites), we just want to get the site where it belongs without accidentally getting the D drive involved.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 19, 2013 12:07 PM   in reply to ionara17

    I'm completely stumped.

     

    That just doesn't make any sense.

     

    If all of the site's files are in one folder and that folder is copied to a new drive from the OS, I have no idea how a new site in DW could possibly know to add in the file://D: to the links.

     

    Maybe try clearing the DW Cache file first, then go through the copy/new site process again...

     

    http://forums.adobe.com/thread/494811

     

    After that, I'm completely out of ideas.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 19, 2013 12:15 PM   in reply to Jon Fritz II

    It's not uncommon for SWF files to contain absolute paths to supporting files.  This probably occurred when the Flash project was created.  If you can't open the SWF files and edit those paths manually, you may need to re-create the Flash project on your new drive.

     

     

    Nancy O.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 19, 2013 1:35 PM   in reply to ionara17

    When you copy the files to P from D, can you open them in a browser (don't use DW at all)?

     

    Open a browser then choose File > Open and browse to one of the newly copied files on D:.

     

    Let's take DW out of the equasion and see if there's an HD/OS/Drive issue.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 19, 2013 1:51 PM   in reply to ionara17

    Sounds like your P drive is read only.

     

     

    Nancy O. 

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 19, 2013 2:14 PM   in reply to ionara17

    Weird, so you have 4 identical copies of your site and it only works on two of your four drives?

     

    I wonder if this could this be a user account/permissions issue?

     

    Can you create a new admin level user account on that machine and try the copy/open thing again (don't use the files already copied)?

     

    I might be way off base, but I've honestly never seen anything like this before, especially if it's working on D: and S: but not your C: and P: drives.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 22, 2013 11:37 AM   in reply to ionara17

    You're not  using file check-in / check-out or subversion are you?

     

     

    Nancy O.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points