Results 1 to 7 of 7

Thread: Drop In Slide Show

  1. #1
    Join Date
    Mar 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Drop In Slide Show

    1) Script Title: Drop In Slide Show

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...ropitslide.htm

    3) Describe problem: I don't understand the following:

    //Define Image Array. Syntax: ["image_path" (is this where my images are located????), "url_destination" (what does this mean? would I put my url of the page that i want the script to appear on, i.e. www.stacygrant.com/index?), "url_target" I have no idea what this means, could you give me an example?]
    var myimages=new Array()
    myimages[0]=["photo1.jpg", "", ""] what goes inside of these blank quotes?
    myimages[1]=["photo2.jpg", "http://www.dynamicdrive.com", ""] what goes inside of this blank quote
    myimages[2]=["photo3.jpg", "http://www.javascriptkit.com", "_new"] does anything go before the underscore and new?

  2. #2
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    "image_path" (is this where my images are located????),
    YES

    "url_destination" (what does this mean? would I put my url of the page that i want the script to appear on, i.e. www.stacygrant.com/index?),
    YES the page you want it to appear on

    "url_target" I have no idea what this means,
    this is asking if you are using an iframe... the target="__FRAME_(url_target)_ID__" is where that would be placed


    myimages[0]=["photo1.jpg", "", ""] what goes inside of these blank quotes?
    myimages[1]=["photo2.jpg", "http://www.dynamicdrive.com", ""] what goes inside of this blank quote
    myimages[2]=["photo3.jpg", "http://www.javascriptkit.com", "_new"] does anything go before the underscore and new?
    those are the 3 ways of calling the function... the last one is complete, and no _new refers to a brand new page

    _top = this page(global) eg... breaks out of any frame
    _blank = new page
    _self = this page(local) eg... will parse inside an iframe
    _parent = :-/ brain cramp...

    those are 4 that are given by the method, however if you create a frame / inline frame you can give it a name (<iframe name="__">) then by which you can use anything you wish as the target... By default if you specify a name of a target and it is not one of the global 4 or one specified inside the page, the default is _top.
    Last edited by boogyman; 03-30-2007 at 08:17 PM.

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,133
    Thanks
    44
    Thanked 3,231 Times in 3,192 Posts
    Blog Entries
    12

    Default

    You got a lot of that right pissa.

    One thing you got wrong was:

    "url_destination"

    That is the URL of a page that you would like to load as a link for that image - like, if you click on the image.

    If all you want is the basic slide show, just leave the second two array items blank:

    Code:
    myimages[0]=["photo1.jpg", "", ""]
    If you want the image linked, provide the url_destination:

    Code:
    myimages[1]=["photo2.jpg", "http://www.dynamicdrive.com", ""]
    If you want to target a frame, a new window or anything other than the page itself, use a target for that link:

    Code:
    myimages[2]=["photo3.jpg", "http://www.javascriptkit.com", "_new"]
    You had this right (except for the brain cramp and that garbage about __FRAME_(url_target)_ID__ ):

    Possible values for the third item (target) on each line:
    name = name of a frame, window or iframe
    _top = this page(global) eg... breaks out of any frame
    _blank = new page
    _self = this page(local) eg... will parse inside an iframe
    _parent = the page immediately containing this page, if any, or if not, same as _self

    Targets are meaningless unless a link is supplied in the second item on the line.
    - John
    ________________________

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

  4. #4
    Join Date
    Mar 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default still getting an error

    I'm getting this error now:
    Line 506
    Error 'dropinslideshow' is undefined

    I downloaded the js script to my hard drive and clicked on it, but I didn't see anything happen.

    I cleaned up the syntax..this is what i have now for a simple slide show:
    You'll see the image location is very long, but that is what I was told to put in. I'm also using the server space on register.com if that makes a difference. It's a 5 page website with templates, but it has open space for coding.

    Any more hints are very much appreciated.

    stacy

    <script type="text/javascript" src="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><script type="text/javascript">

    //Define Image Array. Syntax: ["image_path", "url_destination", "url_target"]
    var myimages=new Array()
    myimages[0]=["http://www.stacygrant.com/db1/00013/stacygrant.com/_uimages/M.Jacobswithball1small.jpg", "", ""]
    myimages[1]=["http://www.stacygrant.com/db1/00013/stacygrant.com/_uimages/journeylead.jpg", "", ""]
    myimages[2]=["http://www.stacygrant.com/db1/00013/stacygrant.com/_uimages/playinaction.jpg", "", ""]

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

    </script>

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,133
    Thanks
    44
    Thanked 3,231 Times in 3,192 Posts
    Blog Entries
    12

    Default

    Your code is basically OK but, one part goes in the head and one part goes in the body. Also, the dimensions (highlighted red) should match the the largest width and largest height:

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <script type="text/javascript" src="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>
    </head>
    <body>
    <script type="text/javascript">
    
    //Define Image Array. Syntax: ["image_path", "url_destination", "url_target"]
    var myimages=new Array()
    myimages[0]=["http://www.stacygrant.com/db1/00013/stacygrant.com/_uimages/M.Jacobswithball1small.jpg", "", ""]
    myimages[1]=["http://www.stacygrant.com/db1/00013/stacygrant.com/_uimages/journeylead.jpg", "", ""]
    myimages[2]=["http://www.stacygrant.com/db1/00013/stacygrant.com/_uimages/playinaction.jpg", "", ""]
    
    //Create new drop-in slideshow
    //Syntax: new dropinslideshow(image_array, slideshow_width, slideshow_height, delay_before_rotation)
    new dropinslideshow(myimages, 432, 432, 3000)
    
    </script>
    </body>
    </html>
    Finally, you must download the dropinslideshow.js file (as you say you have), and place it in the same folder as your page.
    - John
    ________________________

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

  6. #6
    Join Date
    Sep 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I also get this error. I use FrontPage (using the code view). Is there something I should be aware when using FP? Maybe some script conflict?
    Thank you
    Edgar

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,133
    Thanks
    44
    Thanked 3,231 Times in 3,192 Posts
    Blog Entries
    12

    Default

    Well, you might be able to configure FP so as to allow you to insert code like this without it mangling it so much. Read the manual or Google for help on that. Another alternative, and what I recommend in all cases like this, is to get your page looking like you want using FP but without any scripts. Save a copy of that somewhere to work on later if the need arises. Next open the page in notepad or simple text (make sure word wrap is turned off in either of these) and add the scripts in according to the installation instructions, including any customization you've added. Never load this version of the page into FP ever again. To preview it locally, use the browser. To upload it, use FTP (preferred) or your host's online uploading tool.

    Here is trick I ran across* that should stop FP from changing scripts but, since I do not use FP, I haven't tested it:

    In a text editor open the page whose code you wish to preserve.

    At the beginning of the section of code you wish to prevent FrontPage from modifying, add the following line of code:

    Code:
    <!--webbot bot="HTMLMarkup" startspan --> 
    At the end of the code section, add the following line of code:

    Code:
    <!--webbot bot="HTMLMarkup" endspan --> 
    Save the changes to the file. The next time the file is opened in FrontPage, FrontPage will not attempt to alter the code between the two HTMLMarkup tags. You still need to put the script into the page with a text editor.

    *Posted in these forums by usace-lrc and perhaps others.
    - John
    ________________________

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

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
  •