Results 1 to 3 of 3

Thread: Simple Controls Gallery Problems when moving folder from beta to root

  1. #1
    Join Date
    Apr 2009
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Simple Controls Gallery Problems when moving folder from beta to root

    1) Script Title: Simple Controls Gallery v1.3

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

    3) Describe problem: I'm building a blog section for a client. http://www.dynamicvfx.com/beta/blog.php and all had been going to plan until I moved the site from the beta folder to the root. http://www.dynamicvfx.com/blog.php I copied all the files and the folders (including the scripts) They're all in the correct relative positions as far as I can tell and I've checked the links in the html code but there's strange things going on.

    In Safari it shows broken images, and seems to be adding a prefix to the script and image <a ref but doesn't show anything in FF. Looking at the source code brings up exactly what I have in DW.

    At first I thought it must be because it's being used elsewhere but deleting the working files from the beta folder did nothing. I've tried using absolute URLs but that doesn't seem to help, I've tried moving files, renaming scripts, putting scripts into separate folders - everything I can think of!
    I've eventually hacked it and put links (for now) through to the working version, still in the beta folder. Though not ideal, I'm hoping this will tide me over until I can get help from one of you heroes.

    I'm really confused by this one. Normally fairly good at seeing issues like this but no-one's perfect eh

    I hope to have provided sufficient explanation but please hit me up for more if it will help. So, many thanks in advance.


    p.s. I'm also using another script on the page also from DD, called motiongallery but since it worked perfectly together when in the beta folder, I don't understand how it can be that - never know though...

  2. #2
    Join Date
    Aug 2004
    Posts
    10,140
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Wow this one certainly got me going for a while. The problem it turns out seems to simply be that you've manually modified the script to include the '../beta/Scripts' prefix to all images shown by the script, resulting in the broken images:

    Code:
    		var layerHTML=(imgelement[1])? '<a href="../beta/Scripts/'+imgelement[1]+'" target="'+imgelement[2]+'">\n' : '' //hyperlink slide?
    		layerHTML+='<img src="../beta/Scripts/'+imgelement[0]+'" style="border-width:0" />'
    I'm not sure why you did that, but you should revert it back to the original code:

    Code:
    		var layerHTML=(imgelement[1])? '<a href="'+imgelement[1]+'" target="'+imgelement[2]+'">\n' : '' //hyperlink slide?
    		layerHTML+='<img src="'+imgelement[0]+'" style="border-width:0" />'
    DD Admin

  3. The Following User Says Thank You to ddadmin For This Useful Post:

    JeremyDolan (04-24-2009)

  4. #3
    Join Date
    Apr 2009
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Talking

    Thanks so much!

    I've no idea why that happened, I certainly don't remember changing the script to prefix the images with anything but well spotted.

    I simply re-downloaded/uploaded simplegallery.js and it fixed it!

    Thanks again, DDadmin. and thanks DD, you're the most useful javascript site I've seen and in contention for the best site period.

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
  •