Stuck with rating script

Discussion in 'HTML & Website Design' started by Webgold, Jun 11, 2010.

  1. #1
    Hi

    I am using a rating script and I can get it to work on folders 1 levels deep:

    (www. mysite.com/ videos/ video1)

    but when it goes to 2 levels deep it won't work?

    (www. mysite.com/ videos/ 2010/ video1)

    It is something to with the javascript line:

    I used a full address line but that doesn't work either.

    Any ideas?
     
    Webgold, Jun 11, 2010 IP
  2. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #2
    ../ means move back one directory. If it worked for /videos/video1 then I assume the script is in /videos/rating.
    That line would not work for /videos/2010/video1 because the script would have to be in videos/2010/rating.

    Strange that the full path didn't work, what did you actually use for that?
     
    Cash Nebula, Jun 12, 2010 IP
  3. -M-A-R-K-

    -M-A-R-K- Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If you want to go 2 levels deep, use this;

    <script type="text/javascript" src="../../rating/rating.js"></script>  
    Code (markup):
     
    -M-A-R-K-, Jun 12, 2010 IP
  4. Webgold

    Webgold Peon

    Messages:
    193
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hi thanks for the help

    When I used the full path I used
    But that doesn't work and I don't know why?
     
    Webgold, Jun 12, 2010 IP
  5. -M-A-R-K-

    -M-A-R-K- Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Try this

    <script type="text/javascript" src='<%=ResolveUrl("~/rating.js")%>'></script>
    Code (markup):
     
    -M-A-R-K-, Jun 12, 2010 IP
  6. Webgold

    Webgold Peon

    Messages:
    193
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thanks Mark that does work, but it works slightly differently to the other pages, when I vote it reloads the page instead of just staying where it is and registering the vote.

    Plus when it reloads the google ads disappear, I can only assume it must be a problem with the script.

    Thanks again though
     
    Webgold, Jun 13, 2010 IP