SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    May 2007
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    AJAX and Scriptalous

    Hello!

    I have a bit of a problem. The thing is that I am using both Ajax and scriptalous when I am going to drag something. Well, the Ajax works but not the scriptalous Drag and Drop. (I cant move it).

    getlev.php
    PHP Code:
    <?php
    header
    ("Content-Type: php/javascript; charset=iso-8859-1");

    $conn mysql_connect('***''***''***');
    mysql_select_db('***');

    if(
    $_GET['lev'] == '-') {
        
    $value "";
    } else {
        
    $value "WHERE produkt_lev = '".$_GET['lev']."'";
    }
    $sql_products "SELECT * FROM privab_produkter $value";
    $result_products mysql_query($sql_products) or die(mysql_error());

    // Om inte det inte finns några produkter hos leventratören
    if(mysql_num_rows($result_products) == 0) {
        echo 
    "<span class='small'>Det finns inga produkter hos denna leventratör!</span>";
    } else {
        
    $num mysql_num_rows($result_products);
        
        
    // Om det är fler än 1
        
    if($num 1) {
            echo 
    "<span class='small'>Hittade $num produkter</span>";        
        } else {
            echo 
    "<span class='small'>Hittade $num produkt</span>";
        }
        
        while(
    $products mysql_fetch_array($result_products)) {
            echo 
    "<p><img src=\"".$products['produkt_img']."\" alt=\"\" title=\"".$products['produkt_namn']."\" id=\"product_".$products['id']."\" class=\"product\" />";
            echo 
    "<script language='javascript' type='text/javascript'>
            new Draggable('product_"
    .$products['id']."', {revert: true});
            </script>"
    ;    
        }
    }
    ?>
    Where can the problem be?

    QarP
    Last edited by QarP; May 6, 2007 at 03:31. Reason: Just a better description.

  2. #2
    SitePoint Member
    Join Date
    May 2007
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyone?

  3. #3
    SitePoint Member
    Join Date
    May 2007
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Really need some help with this. =/


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
  •