Results 1 to 3 of 3

Thread: Ultimate Fade-in slideshow - relative to root or not?

  1. #1
    Join Date
    Feb 2008
    Posts
    133
    Thanks
    16
    Thanked 2 Times in 2 Posts

    Smile Ultimate Fade-in slideshow - relative to root or not?

    Ultimate Fade-in slideshow (v1.51)

    http://www.dynamicdrive.com/dynamici...nslideshow.htm

    Not really a problem as such, it may be a bug; not sure.
    Code:
    - ROOT (http://www.example.com/)
            - images (contains images)
            - inside images is /thm (contains thumb images)
            - includes =>
              (contain; banner.php, getpics.php, getpics2.php and random.php)
    Inside banner.php;
    Code:
    require_once('random.php');
    Inside random.php;
    Code:
    <script type="text/javascript">
    var fadeimages=new Array()
    </script>
    <script src="getpics.php" type="text/javascript"></script>
    <script type="text/javascript">
    var fadeimages2=new Array() //2nd array</script>
    <script src="getpics2.php" type="text/javascript"></script>
    The method above wont work,
    it has to be like this to work;
    Code:
    - ROOT (http://www.example.com/)
            - getpics.php, getpics2.php and random.php in the ROOT
            - images (contains images)
            - inside images is /thm (contains thumb images)
            - includes =>
              (contain; banner.php)

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,127
    Thanks
    44
    Thanked 3,228 Times in 3,189 Posts
    Blog Entries
    12

    Default

    Paths are always in effect for the page that they are on when parsed by the browser. Absolute paths may be used to avoid confusion when a relative path may end up appearing on two or more pages located in different folders, or if the page it will be parsed from isn't clear to the designer.

    The only exception I am aware of is the css file, where paths are relative to that file when parsed by the browser, similar to as if it were a page in the above mentioned. However, with certain proprietary IE filters, paths mentioned in relation to them default to the page again, so should always be stated in absolute form, which can also be used for any path in a css file to avoid confusion.

    Remember that when writing to a page with javascript or to any file with PHP, the code generated will always be relative to that page/file if javascript is used, and in most if not all cases in PHP as well, not relative to the resource file.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Feb 2008
    Posts
    133
    Thanks
    16
    Thanked 2 Times in 2 Posts

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •