Voten lukt niet

Gestart doorAdmir2 reacties41 weergaven

3 berichten · pagina 1 van 1

Admir

Lid · Topicstarter

Berichten
1.950
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik heb een Vote script in me site gebouwt maar eerst wou die wel voten en nou opeens niet meer. Heb een nieuwe test artiest gemaakt een daar wou die ook niet.

Bijv:
http://straat-power.nl/index.php?p=rap&rap=72
Daar lukt t stemmen niet,

Dit is me Js script:

$(document).ready(function() {
    

    $("[id^=rating_]").hover(function() {


        rid = $(this).attr("id").split("_")[1];
        $("#rating_"+rid).children("[class^=star_]").children(img).hover(function() {

            $("#rating_"+rid).children("[class^=star_]").children(img).removeClass("hover");

            /* The hovered item number */
            var hovered = $(this).parent().attr("class").split("_")[1];
    
            while(hovered > 0) {
                $("#rating_"+rid).children(".star_"+hovered).children(img).addClass("hover");
                hovered--;
            }

        });
    });

    $("[id^=rating_]").children("[class^=star_]").click(function() {

        
        var current_star = $(this).attr("class").split("_")[1];
        var rid = $(this).parent().attr("id").split("_")[1];

        $(#rating_+rid).load(send.php, {rating: current_star, id: rid});

    });




});


En dit is het php code:

[COLOR= #0000BB]<?php
$query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM artiesten WHERE id = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]rap[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]

[URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700])) {[/COLOR]
    [COLOR= #0000BB]$rating[/COLOR] [COLOR= #007700]= (int)[/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR]rating[COLOR= #007700]];[/COLOR]
    ?>

<link rel="stylesheet" type="text/css" href="style1.css">


<script type="text/javascript" src="http://www.straat-power.nl/jquery.js"></script>
<script type="text/javascript" src="http://www.straat-power.nl/script.js"></script>
    <br /><div class="floatleft">
        <div id="rating_[COLOR= #0000BB]<?[/COLOR]php [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR]id[COLOR= #007700]];[/COLOR] ?>">
<b>Stemmen op [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$show2[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]artiesten[/COLOR][COLOR= #007700]][/COLOR] ?>!<b/><br />
            <span class="star_1"><img src="http://www.straat-power.nl/star_blank.png" alt="" [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$rating[/COLOR] [COLOR= #007700]>[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]) {[/COLOR] [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"class=hover"[/COLOR][COLOR= #007700]; }[/COLOR] ?> /></span>
            <span class="star_2"><img src="http://www.straat-power.nl/star_blank.png" alt="" [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$rating[/COLOR] [COLOR= #007700]>[/COLOR] [COLOR= #0000BB]1.5[/COLOR][COLOR= #007700]) {[/COLOR] [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"class=hover"[/COLOR][COLOR= #007700]; }[/COLOR] ?> /></span>
            <span class="star_3"><img src="http://www.straat-power.nl/star_blank.png" alt="" [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$rating[/COLOR] [COLOR= #007700]>[/COLOR] [COLOR= #0000BB]2.5[/COLOR][COLOR= #007700]) {[/COLOR] [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"class=hover"[/COLOR][COLOR= #007700]; }[/COLOR] ?> /></span>
            <span class="star_4"><img src="http://www.straat-power.nl/star_blank.png" alt="" [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$rating[/COLOR] [COLOR= #007700]>[/COLOR] [COLOR= #0000BB]3.5[/COLOR][COLOR= #007700]) {[/COLOR] [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"class=hover"[/COLOR][COLOR= #007700]; }[/COLOR] ?> /></span>
            <span class="star_5"><img src="http://www.straat-power.nl/star_blank.png" alt="" [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$rating[/COLOR] [COLOR= #007700]>[/COLOR] [COLOR= #0000BB]4.5[/COLOR][COLOR= #007700]) {[/COLOR] [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"class=hover"[/COLOR][COLOR= #007700]; }[/COLOR] ?> /></span>
        </div>
    </div>
    
    <br />    (Rated <strong>[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$rating[/COLOR][COLOR= #007700];[/COLOR] ?></strong> Stars)
                [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$show2[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]artiesten[/COLOR][COLOR= #007700]][/COLOR] ?> heeft [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]total_rating[/COLOR][COLOR= #007700]][/COLOR] ?> Punten, en er is [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]total_ratings[/COLOR][COLOR= #007700]][/COLOR] ?> Gestemt.
                
    

    <div class="clearleft">&nbsp;</div>
    [COLOR= #0000BB]<?php[/COLOR]    
[COLOR= #007700]}[/COLOR]

?>
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Heb je JQUERY ge include?
0
Berichten
8.602
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
@Nielsie, als je naar het script kijkt staat het er toch emo
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren