Giter VIP home page Giter VIP logo

Comments (9)

siamon123 avatar siamon123 commented on July 21, 2024

This function located in includes/sql.php

/--------------------------------------------------------------/
/* Function for Finding all product name
/* Request coming from ajax.php for auto suggest
/--------------------------------------------------------------/
function find_product_by_title($product_name){
global $db;
$p_name = remove_junk($db->escape($product_name));
$sql = "SELECT name FROM products WHERE name like '%$p_name%' LIMIT 5";
$result = find_by_sql($sql);
return $result;
}

from warehouse-inventory-system.

gian123 avatar gian123 commented on July 21, 2024

Hi bro thank for your atenttion , I understant the fuction of the method
called " find_product_by_title" but my dude is about how the file
add_sale.php sends the parameter $_POST['product_name'] to ajax.php int
the next form the parameter "product_name" doesn't exist. but this form
send ti ajax.php this parameter. I will put in red.

id="sug-form">*

  •    <div class="form-group">*
    
  •      <div class="input-group">*
    
  •        <span class="input-group-btn">*
    
  •          <button type="submit" class="btn
    

    btn-primary">Buscar*

  •        </span>*
    
  •        <input type="text" id="sug_input" class="form-control"
    

    name="title" placeholder="Buscar por nombre de producto">*

  •     </div>*
    
  •     <div id="result" class="list-group"></div>*
    
  •    </div>*
    
  • *
  • *

<?php

  • // Auto suggetion*

  • $html = '';*

  • if(isset($_POST['product_name']) && strlen($_POST['product_name']))*

  • {*

  • $products = find_product_by_title($_POST['product_name']);*
    
  • if($products){*
    
  •    foreach ($products as $product):*
    
  •       $html .= "<li class=\"list-group-item\">";*
    
  •       $html .= $product['name'];*
    
  •       $html .= "</li>";*
    
  •     endforeach;*
    
  •  } else {*
    
  •    $html .= '<li onClick=\"fill(\''.addslashes().'\')\"
    

    class="list-group-item">';*

  •    $html .= 'No encontrado';*
    
  •    $html .= "</li>";*
    
  •  }*
    

Help me please,

Thank.

2016-06-07 15:36 GMT-05:00 Siamon Hasan [email protected]:

This function located in includes/sql.php

/--------------------------------------------------------------/
/* Function for Finding all product name
/* Request coming from ajax.php for auto suggest
/--------------------------------------------------------------/
function find_product_by_title($product_name){
global $db;
$p_name = remove_junk($db->escape($product_name));
$sql = "SELECT name FROM products WHERE name like '%$p_name%' LIMIT 5";
$result = find_by_sql($sql);
return $result;
}


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#13 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AEuDtawzTLV46VNzMHmvhfUiDHR5gVzJks5qJdZLgaJpZM4IwJ2n
.

from warehouse-inventory-system.

siamon123 avatar siamon123 commented on July 21, 2024

i'm retrieving data by jQuery, check out function.js file.

from warehouse-inventory-system.

gian123 avatar gian123 commented on July 21, 2024

Ok I understand, Thanks very much =)

2016-06-07 21:11 GMT-05:00 Siamon Hasan [email protected]:

i'm retrieving data by jQuery, check out function.js file.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#13 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AEuDtQjvxH84qwTEbAJvPXld2UaboEIJks5qJiS5gaJpZM4IwJ2n
.

from warehouse-inventory-system.

siamon123 avatar siamon123 commented on July 21, 2024

No problem!

from warehouse-inventory-system.

gian123 avatar gian123 commented on July 21, 2024

Hi , the really I staying many hours in this example because I need to
present this in my school this last week and please I need your help onlly
in this part becase I start to develop recently and I dont know javascript
in hight level.I need the next image in your source code.

[image: Imágenes integradas 1]

please help me only with this..

Thank you for your attention

Really thank you very much.

2016-06-07 23:12 GMT-05:00 Siamon Hasan [email protected]:

No problem!


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#13 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AEuDtUTbFf9l4VEW3u2vvrLeE-NjEAZsks5qJkFCgaJpZM4IwJ2n
.

from warehouse-inventory-system.

gian123 avatar gian123 commented on July 21, 2024

Can you help me bro?..I need know if you can help me.

Thanks

2016-06-08 0:41 GMT-05:00 jeanfranco gutierrez <
[email protected]>:

Hi , the really I staying many hours in this example because I need to
present this in my school this last week and please I need your help onlly
in this part becase I start to develop recently and I dont know javascript
in hight level.I need the next image in your source code.

[image: Imágenes integradas 1]

please help me only with this..

Thank you for your attention

Really thank you very much.

2016-06-07 23:12 GMT-05:00 Siamon Hasan [email protected]:

No problem!


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#13 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AEuDtUTbFf9l4VEW3u2vvrLeE-NjEAZsks5qJkFCgaJpZM4IwJ2n
.

from warehouse-inventory-system.

siamon123 avatar siamon123 commented on July 21, 2024

you mean this code

`function suggetion() {

     $('#sug_input').keyup(function(e) {

         var formData = {
             'product_name' : $('input[name=title]').val()
         };

         if(formData['product_name'].length >= 1){

           // process the form
           $.ajax({
               type        : 'POST',
               url         : 'ajax.php',
               data        : formData,
               dataType    : 'son',

               encode      : true
           })
               .done(function(data) {
                   //console.log(data);
                   $('#result').html(data).fadeIn();
                   $('#result li').click(function() {

                     $('#sug_input').val($(this).text());
                     $('#result').fadeOut(500);

                   });

                   $("#sug_input").blur(function(){
                     $("#result").fadeOut(500);
                   });

               });

         } else {

           $("#result").hide();

         };

         e.preventDefault();
     });

 }`

from warehouse-inventory-system.

gian123 avatar gian123 commented on July 21, 2024

Closet en tu culo

2016-10-13 12:48 GMT-05:00 Siamon Hasan [email protected]:

Closed #13
#13.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#13 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEuDtYJ14Q_vSLJcRjCNdms8zJcAv0nbks5qzm78gaJpZM4IwJ2n
.

from warehouse-inventory-system.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.