Results 1 to 4 of 4

Thread: "Jump to Top" script problem

  1. #1
    Join Date
    Apr 2007
    Location
    Detroit area
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post "Jump to Top" script problem

    1) CODE TITLE: Jump to Top Link script

    2) AUTHOR NAME/NOTES: Dynamic Drive

    3) DESCRIPTION: Blue "Back to Top" floats in bottom R of page

    4) URL TO CODE: http://www.dynamicdrive.com/dynamicindex5/jumptop.htm

    Hi, I have posted the code to the page and up to the site. The "BACK TO TOP", when clicked, gives a page with the text "The system cannot find the file specified." on the url http://gyebags.com/javascript:window.scrollTo(0,0)

    Relevant pages:
    http://gyebags.com/bags.html
    and
    http://gyebags.com/js/jumptop.js

    I have corrected the code on the page to direct to /js/jumptop.js

    Thank you for any help.

    Paul

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

    Default

    There are a couple of errors on your page. Firstly, the code in red below:

    Code:
    <script type="text/javascript">
    <!--
    <script type="text/javascript" src="jquery-1.2.2.pack.js">
    <script type="text/javascript" src="ddaccordion.js">
    They should not be inside the outermost script tag. Modify the above to:

    Code:
    <script type="text/javascript" src="jquery-1.2.2.pack.js"></script>
    <script type="text/javascript" src="ddaccordion.js"></script>
    <script type="text/javascript">
    <!--
    Secondly, inside jumpto.js, you need to modify the line below:

    Code:
    crosslogo.innerHTML='<a href="../'+logolink+'">'+displayed+'</a>'
    to:

    Code:
    crosslogo.innerHTML='<a href="'+logolink+'">'+displayed+'</a>'

  3. #3
    Join Date
    Aug 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Jump to top Link With an image?

    Hi all!

    I use Jump to top Link script, it works fine but i want to modify the code for an image. I want to use an image instead of using a text to show the top link. I tried several times but it did not work.
    how can i change the text with an image? Any idea?

    The text code is like this.

    var displayed="<nobr><b>[Top]</b></nobr>"

    I attached the image.

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

    Default

    cyberx, in the future, please start your own thread when asking a question. To your question, simply replace the text with an image tag:

    Code:
    var displayed="<nobr><img src='myimage.gif' /></nobr>"
    Make sure the quotation marks surrounding the image path are single quotes!
    DD Admin

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
  •