ASP评级系统不会评级? - 为什么?

时间:2012-04-18 18:08:52

标签: javascript asp-classic rating rating-system

我正在使用此评级系统:http://www.chrishardy.co.uk/asp/scripts/accessible-star-ratings/

问题在于,现在一切都已准备好并且可以使用,我不能给任何明星。

查看此页面以了解我的意思:http://bit.ly/HQgxQq

我希望你能帮忙:)。

1 个答案:

答案 0 :(得分:0)

我收到了这个错误:

POST http://klasse.aabc.dk/rating/rpc.asp?rating=5&url=/ve-aspnet/akemver1/test.asp 404 (Not Found) 

我假设您尚未上传“rpc.asp”文件。您必须上传所有文件才能使一切正常。请检查您是否已将“rpc.asp”上载到与其余文件相同的目录中。

我发现/等级错误...我得到了:

http://klasse.aabc.dk/ve-aspnet/akemver1/rating/rpc.asp?rating=4&url=/ve-aspnet/akemver1/test.asp

不抛出404错误。这意味着你的虚拟路径错了吗?

我建议你这样做:

  1. 解包.zip

  2. 更新“common.asp”的第30行

    ...
    Const NEAREST_HALF = false
    Const RATING_DIR = "ve-aspnet/akemver1/rating" 'This is line 30, you must edit it.
    
    '--- Database connection string ----------------------------------------------
    dim sConnectionString
    '-----------------------------------------------------------------------------
    ...
    
  3. 修改rating.css并使其如下所示:

    .starlight {
        color: #e00;
    }
    #star-rating ul {
        list-style: none;
        margin: 3px;
        padding: 0px;
        width: 150px;
        height: 30px;
        position: relative;
        background: url(/ve-aspnet/akemver1/rating/rating.gif) top left repeat-x;
    }
    #star-rating li {
        padding: 0px;
        margin: 0px;
        /*\*/
        float: left;
        /* */
    }
    #star-rating li.current-rating {
        background: url(/ve-aspnet/akemver1/rating/rating.gif) left bottom;
        position: absolute;
        height: 30px;
        display: block;
        text-indent: -9000px;
        z-index: 1;
    }
    #star-rating li a {
        display: block;
        width: 30px;
        height: 30px;
        text-decoration: none;
        text-indent: -9000px;
        z-index: 20;
        position: absolute;
        padding: 0px;
        background-image: none;
    }
    #star-rating li a:hover {
        background: url(ve-aspnet/akemver1/rating/rating.gif) left center;
        z-index: 1;
        left: 0px;
    }
    #star-rating a.star-1 {
        left: 0px;
    }
    #star-rating a.star-1:hover {
        width: 30px;
    }
    #star-rating a.star-2 {
        left: 30px;
    }
    #star-rating a.star-2:hover {
        width: 60px;
    }
    #star-rating a.star-3 {
        left: 60px;
    }
    #star-rating a.star-3:hover {
        width: 90px;
    }
    #star-rating a.star-4 {
        left: 90px;
    }
    #star-rating a.star-4:hover {
        width: 120px;
    }
    #star-rating a.star-5 {
        left: 120px;
    }
    #star-rating a.star-5:hover {
        width: 150px;
    }
    
  4. 将整个.zip(编辑,当然!)上传到/ ve-aspnet / akemver1 / rating

  5. 让test.asp包含以下代码:

    <html>
    <head>
    <script type="text/javascript" src="/ve-aspnet/akemver1/rating/rating.js"></script>
    <link type="text/css" rel="stylesheet" href="/ve-aspnet/akemver1/rating/rating.css" />
    </head>
    <body>
    <h3>This is a test...</h3>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam imperdiet varius magna, non molestie libero porttitor a. Fusce vel lorem at nisl egestas placerat eget non mauris. Fusce consequat tortor id nunc blandit id pretium libero egestas. Mauris egestas, nulla sed consequat congue, enim nibh ullamcorper nisl, id aliquam lectus urna ac nibh. Nunc in dolor justo, eu lacinia dolor. Donec velit augue, facilisis at interdum vel, sagittis id urna. Maecenas blandit mollis augue, sit amet ultrices mauris aliquam vitae. Nullam eu magna urna. Sed bibendum nunc ut nunc molestie ullamcorper. Vivamus ut erat ultrices elit tincidunt viverra id sed ligula. In in lorem arcu. Pellentesque varius mi egestas est vehicula vitae posuere arcu pharetra. Phasellus sodales ullamcorper bibendum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum consequat justo eu arcu pharetra porttitor. Etiam condimentum lacus a dui blandit cursus eu in lorem.</p>
    <!--#include virtual="/ve-aspnet/akemver1/rating/rating.asp"-->
    </body>
    </html>
    
  6. 将test.asp上传到“/ ve-aspnet / akemver1”

  7. 应该有效:D

  8. 修改 再想一想,您可以将.zip的全部内容放在“/ rating”