locked
Absolute Paths to Interactive Buttons RRS feed

  • Question

  • I am using the built-in interactive buttons in Expression Web. I am putting the buttons into an uneditable region of a DWT template. Problem is even after I save the template, and the save the buttons to a directory in my web site, Expression Web generates these extremely long absolute paths. It does not change the path to point to the directory in my web site where I saved the buttons.

    There is another problem that I think might be the cause of the first one. On another thread in this forum, it was said that Expression Web would generate absolute paths if you weren't working in a defined web site. Well, I am working in a web site. But I can't get Expression to point to the directory I want. I have created and recreated the site many times, and still can't get it to point to the correct directory. The path I want is F:\My Web Sites\Steven's Web Sites\. It shows as that in the Mange Sites dialog. But when I actually open the site, the Site View is showing me the contents of F:\My Web Sites\. No matter how many times I recreate it, it doesn't work right. I have restarted Expression. It doesn't make any difference. Other sites in other root directories work right. But not this one. I even tried drilling down into one of the subdirectories of my site. It doesn't make any difference. No matter what I do, I see F:\My Web Sites\ in the folder list and Site View when I open the site.

    So could these problems be related? And how do I solve them?

    Miraculously, the buttons work, even on the remote server. But I can't see how since they are pointed to an absolute directory on my local computer.

    The generated paths are super super long. They aren't just straightforward absolute paths. I'm getting something like this:

    <body onload="FP_preloadImgs(/*url*/'Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Images/Buttons/button6E.jpg',/*url*/'[R]file:/F:/My Web Sites/Steven's Website/Images/Buttons/button6F.jpg',/*url*/'[R]file:///F:/My Web Sites/Steven's Website/[R]file:/F:/My Web Sites/Steven's Website/[R]file:/F:/My Web Sites/Steven's Website/[R]file:/F:/My Web Sites/Steven's Website/[R]file:/F:/My Web Sites/Steven's Website/[R]file:/F:/My Web Sites/Steven's Website/[R]file:/F:/My Web Sites/Steven's Website/[R]file:/F:/My Web Sites/Steven's Website/[R]file:/F:/My Web Sites/Steven's Website/[R]file:/F:/My Web Sites/Steven's Website/[R]file:/F:/My Web Sites/Steven's Website/[R]file:/F:/My Web Sites/Steven's Website/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:

    It just goes on and on and on.

    Tuesday, December 20, 2011 7:51 PM

Answers

  • First, rename the folders you are using:
    Remove the spaces - replace with underlines or hyphens (spaces can, not always, cause odd effects in a local web, but should never be used in file or folder names in a published website - here spaces will cause problems.

    And, very important, remove the apostrophe from "Steven's".  This will definitely have an adverse effect on any javascript or other scripting that uses the path, such as:
    onload="FP_preloadImgs(/url/'Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Images/Buttons/button6E.jpg'  which will be interpreted as
    onload="FP_preloadImgs(/url/'Templates/[R]file:/F:/My Web Sites/Steven'
    plus a lot of parameters that cannot be parsed.

    To open the website, open F:\My Web Sites\ as a website in Expression Web.
    Find the folder  Stevens Website  (now renamed) in the folder list and right click it. Choose "Convert to web" in the context menu.
    Accept the warning, then double click the folder (which should now have a globe-on-folder icon) to open the website.


    Ron Symonds
    Microsoft MVP (Expression Web)

    www.rxs-enterprises.org/fp
    • Marked as answer by Elenchikos Tuesday, December 20, 2011 9:25 PM
    Tuesday, December 20, 2011 8:14 PM

All replies

  • First, rename the folders you are using:
    Remove the spaces - replace with underlines or hyphens (spaces can, not always, cause odd effects in a local web, but should never be used in file or folder names in a published website - here spaces will cause problems.

    And, very important, remove the apostrophe from "Steven's".  This will definitely have an adverse effect on any javascript or other scripting that uses the path, such as:
    onload="FP_preloadImgs(/url/'Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Templates/[R]file:/F:/My Web Sites/Steven's Website/Images/Buttons/button6E.jpg'  which will be interpreted as
    onload="FP_preloadImgs(/url/'Templates/[R]file:/F:/My Web Sites/Steven'
    plus a lot of parameters that cannot be parsed.

    To open the website, open F:\My Web Sites\ as a website in Expression Web.
    Find the folder  Stevens Website  (now renamed) in the folder list and right click it. Choose "Convert to web" in the context menu.
    Accept the warning, then double click the folder (which should now have a globe-on-folder icon) to open the website.


    Ron Symonds
    Microsoft MVP (Expression Web)

    www.rxs-enterprises.org/fp
    • Marked as answer by Elenchikos Tuesday, December 20, 2011 9:25 PM
    Tuesday, December 20, 2011 8:14 PM
  • I renamed my folders as you instructed and opened F:\MyWebsites\ (now renamed to eliminate spaces). When I right-click on StevensWebsites (now renamed), I get an option "Convert to Subsite." I just wanted to make sure that was the right option. I don't have an option called "Convert to web".
    Tuesday, December 20, 2011 8:37 PM
  • What should I do about the long paths which are still there after I followed all the instructions above - delete the buttons and all the code that refers to them and then recreate them again?
    Tuesday, December 20, 2011 8:43 PM
  • Thanks, it worked!
    Tuesday, December 20, 2011 9:25 PM