Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Aug 2011
    Posts
    57
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation simple site/stupid problem

    hey up people!

    how are ya?

    i've build a (very) simple test site just to get smooth scrolling to work....

    http://gandhidesign.com/ootw/idea2.html

    click anywhere at the top and it's suppose to "smoothScroll" to the bottom and vice versa (click anywhere at the bottom should scroll to the top)

    you'll notice it doesn't work it jumps....

    everything works fine (ie it scrolls beautifully) when the site is offline BUT after uploading to my webspace the smooth scroll feature just doesn't work...

    i've tried 2 different ways of smooth scrolling BOTH work offline and then BOTH DON'T after being uploaded to my webspace....

    any help would be awesome!

    thank yoooou

    Gandhi

  • #2
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    Sounds like an issue with your resource paths. Did you keep the same folder hierarchy and remember to upload both the JS and CSS files?

    HTH
    Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #3
    Regular Coder
    Join Date
    Mar 2013
    Posts
    262
    Thanks
    4
    Thanked 67 Times in 67 Posts
    It doesn't seem like he uploaded the CSS or JS files.
    My signature :)

  • #4
    New Coder
    Join Date
    Aug 2011
    Posts
    57
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hey people,

    just read your posts, i did have the JS and CSS in a sub folder BUT the resource paths were definitely correct......... so i decided to place everything in the same folder (html, css, js)... and its working now........ any reason why this might have happened?....

    i've created sites before and would normally keep js and css in separate folders.... sames as having an image folder... the directories were definitely correct...

    just seems strange that it worked fine offline.... i always keep everything together... so i only have to upload the contents of 1 folder to get the site up and running...

    thank you for your help.... but if you could get me feed back on why the problem occurred that would be great.... like i said the resource paths were 100% correct...

    thank you again

    gandhi

  • #5
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    I think it's because one of your URLs had a space in the folder name. That doesn't always work out real well on a live server.

    To use certain special characters in a URL, you must encode them, or replace them with a specific code. The codes are made up of a percent sign (%) and then a two digit number. The code for a space is %20.

    For instance, if you have a folder called 'my folder', you would need to reference it as 'my%20folder' in your code. However, it is simply easier to avoid the space.

    For more see:
    http://www.blooberry.com/indexdot/ht...rlencoding.htm

    HTH
    Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION


  •  

    Tags for this Thread

    Posting Permissions

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