Results 1 to 3 of 3

Thread: Slideshow

  1. #1
    Join Date
    Jun 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Slideshow

    1) Script Title: Drop In Slideshow

    2) Script URL (on DD):

    3) Describe problem:

    I am a new to scripting and hence I have been experiencing some problems when trying to get the script working.

    I have downloaded the above script and inserted the first element of the script into the <HEAD> section as stated and the second element into the <Body>.

    Below is the code I have applied

    <HEAD>

    <script type="text/javascript" src="http://www.xsitetest.com/dropinslideshow.js">

    /***********************************************
    * Drop-in Slideshow Script- Dynamic Drive (www.dynamicdrive.com)
    * This notice must stay intact for legal use.
    * Visit http://www.dynamicdrive.com/ for full source code
    ***********************************************/

    </script>


    <Body>

    <script type="text/javascript">

    //Define Image Array. Syntax: ["image_path", "url_destination", "url_target"]
    var myimages=new Array()
    myimages[0]=["/Images/image1.jpg", http://www.xsitetest.com/Chrustmaster.html, "_Blank"]
    myimages[1]=["/Images/Rat.jpg", http://www.xsitetest.com/Chrustmaster.html, "_Blank"]
    myimages[2]=["photo3.jpg", "http://www.javascriptkit.com", "_new"]

    //Create new drop-in slideshow
    //Syntax: new dropinslideshow(image_array, slideshow_width, slideshow_height, delay_before_rotation)
    new dropinslideshow(myimages, 200, 250, 3000)

    </script>

    As you can see I have changed the source in the HEAD section to reflect my site etc. Please note this is merely a test site but i wanted to test this against a site before promoting to one of my soon to go live sites.

    My questions are:-

    1) As you can see from the <Body> code against the myimages... I have basically created an Images folder on the root of my drive etc and referenced my site and the specific page ont he site i want the slideshow to appear, however I do not know if this is how the images shoudl be referenced.

    Should they be in a particular folder or referenced in a particular way such C:\Images\.... etc, as I am unclear as to how they shoudl be referenced.

    2) I have also downloaded the dropinslideshow.js as instructed via the site, however again i am unsure as to where this should sit. I have currently placed this into the same folder as the images e.g. Images folder ont he root, however again I am uncertain as to where this should be located for it to work.

    Can anyone offer some insight on the above to helpa very frustrated individual.

    Many thanks

    Stuart

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    You forgot the link to the script on DD - is it this one?: http://www.dynamicdrive.com/dynamici...ropitslide.htm

    (please always provide the link - asking for help but also asking for us to go hunting for stuff on your behalf reduces the likelihood of a reply)

    1) - When online, Images (or javascript and css files) should be reference as an absolute link ('http://www.xsitetest.com/Images/image1.jpg') OR as a relative link ('/Images/image1.jpg') and must be in the location specified by the script. If you're working on your computer and not connected to the internet, you'll need to use relative links only. Also remember to upload the images to your server and check that file names match your code. At the moment, none of your referenced images appear to be uploaded to the locations you specified, which are as follows;
    http://www.xsitetest.com/Images/image1.jpg
    http://www.xsitetest.com/Images/Rat.jpg or
    http://www.xsitetest.com/photo3.jpg

    The URLs that you have used in the images arrays need to be encased in quotes - so;
    Code:
    myimages[0]=["/Images/image1.jpg", "http://www.xsitetest.com/Chrustmaster.html", "_Blank"]
    rather than;
    Code:
    myimages[0]=["/Images/image1.jpg", http://www.xsitetest.com/Chrustmaster.html, "_Blank"]
    Also, I think you are confused as to what the URL is for - that is a hyperlink option that will allow the user to click an image and be taked to the referenced page. In your arrays, the visitor will click the first 2 images and be taken to your http://www.xsitetest.com/Chrustmaster.html page. The 3rd image will take them to http://www.javascriptkit.com. This URL isnt to make the slideshow appear on the referenced page, which is how your post appears to read.

    2) - The javascript file must also be in the location you reference via the script call in the HEAD, either using an absolute or relative link. You have used http://www.xsitetest.com/dropinslideshow.js - this path is pointing to the root of your website and not in the 'Images' folder as you suggested. The script should be uploaded to the root of your site to match this existing path but you could change it to http://www.xsitetest.com/Images/dropinslideshow.js and upload it to your 'Images' folder instead.

    Hope that helps
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  3. #3
    Join Date
    Jun 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Beverley,

    Firstly many thanks for the information, and you're right I did confuse the options.

    Secondly apologies for not including the link to the script I'll post in future.

    Having just tried what you have suggested it works fine and I can now see the end results.

    Thanks for you prompt repsonse.

    Stuart

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
  •