Jump to content

gristoi

Members
  • Posts

    840
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by gristoi

  1. the call to the click is event driven, when you click on something a series of events bubble up through the component ( their native behaviours) when you use javascript to intercept these events you have to override their default behaviour.; so a button being what it is, if you click on it and it is ,for example, a button in a form, then if you return false it will stop the button from submitting the form. 

     

    With this in mind you will see a lot of logic saying .... if field a in form is empty ... then stop button from completing its click event.... otherwise continue with the submit ( return true )


  2. $query = "SELECT exp_weblog_data.field_id_5, exp_weblog_titles.title, field_id_57
    FROM exp_weblog_data inner join  exp_weblog_titles ON exp_weblog_data.id = exp_weblog_titles.entry_id
    WHERE  exp_weblog_data.field_id_5
    LIKE '%". $param ."%'
    LIMIT 10";
  3. $db = new DBConnection();
    $fetchItems = new dbHandler($db, 'exp_weblog_titles');
    $param = htmlspecialchars($_GET["term"]);
    $items = $fetchItems->getResultsByTerm($param, 'title', 10);

    term = the where in the query, 'title' if the column you want, table is set in the construct of the handler

  4. i am not going to look through your entire code, but a few warning flags are a. you are contemplating using globals and b. you are not using __construct().

     

    Looking though your setup you are declaring new instances of nest. i would advise you look at 2 things - Dependency Injection  and the IoC container 

  5. you need to listen to the click event of the remove button. something like this:

    $('.remove').click(function(e){
      e.preventDefault();
      var me = $(this);
      var customer-id = me.data('customer-id');
      $.ajax({
       'url': 'processing/delete-playlist-items.php',
       'async': false,
        data: {
           customer-id: customer-id
    
         }, 
        success: function (response) {
     
            // use something like  me.getParent('td').fadeOut(); or something similar to remove the row
        }
      });
    
    });
    
    

    it would be a lot easier for the scope of the event if you added the data attributes you want to send to the anchor, then you can implement what i put there for you :). hope it helps

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.