Jump to content

sungpeng

Members
  • Posts

    290
  • Joined

  • Last visited

Posts posted by sungpeng

  1. No not working also.

    <script type='text/javascript'>
    $(window).load(function(){
    $('input[name="searchbox"]').on('change', function() {
       var val = $(this).val(),         
    var dataString='varal='+ val;    
    alert (dataString);
    });
    });
    <input type="text" name="searchbox">
  2. Is it possible to change it to a search box text instead of a checkbox ? It seemed not working.

    $(window).load(function(){
    $('input[name="searchbox"]').on('change', function() {
       var val = $(this).val(),         
    var dataString='var='+ val;  
    alert ('dataString');
    
    
    <input type="text" name="searchbox">
  3. First an input box form. When key in the letter, it will search the database and fetch result in a small dialogue box beside the input box. The result fetched is not display on the page itself but a small rectangle box beside the input box form. I need the small rectangle box. Like if you key in the input box on some page, some data will appear on a small pop up box of your past data that you have key in somewhere.

  4. I successfully send the checkboxValue to the checking1.php page but for the isCheckboxChecked, how am i going to send it over to checking1.php as well ? If i echo the $results at checking1.php they will give me an Array wording output.

    var dataString='sendcheck='+ checkboxValue;
  5. Not working also, the alert box never pop up as well.

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js">
    <script type="text/javascript">
    $('input[name="checking"]').on('change', function() {
       var checkboxValue= $(this).val(),   
           isCheckboxChecked = $(this).is(':checked') ? 'yes' : 'no';
    alert (checkboxValue);
     $.ajax({
    type:"post",
    url:"checking1.php",
    data:dataString,
    });
    }
    </script>
    
    
    <input type='checkbox' name='checking' value='90'  />
  6. Being trying but don't seem to work.

    $('input[name="checking[]"]').on('change', function() {
       var checkboxValue = $(this).val(),   
           isCheckboxChecked = $(this).is(':checked') ? 'yes' : 'no';
       alert (isCheckboxChecked);
     $.ajax({
    code here 
    
    });
    }
    <input type='checkbox' id='checking[]' value='4' onchange='chk(this.value)' />
  7. How can i pass the "checked or not checked" with the "value" to ajax together ?

    $(document).ready(function(){
    if ($(this).is(':not(:checked)')){
    var checkboxValue = $(this).val();
    $.ajax({
    type:"post",
    url:"checking1.php",
    });
    }
    
    <input type='checkbox' id='tickcheck' value='4' onchange='chk(this.value)' />
     

     

×
×
  • 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.