Welcome Guest, Not a member yet? Register   Sign In
No value from input->post
#5

[eluser]Shiju S S[/eluser]
I got it corrected on your help: Thanks. Two corrections were needed.
1. The base url was wrongly used
2. var field was not getting value.



Code:
[b]<$cript type="text/javascript" charset="utf-8">[/b]
var base_url = "&lt;?php echo base_url();?&gt;";
$(function()
    {   $( "#tags" ).autocomplete({
  source: function(req, add){
                
       $.ajax({
                    url: base_url + "frontpage/autocomplete",
                    dataType: 'json',
                    type: 'POST',
                   data: {fields:$("#tags").val()},
                    success: function(data){
                        add(data);
                    }
                });},
minLength: 0,
  select: function( event, ui )
                {
   log( ui.item ?
      "Selected: " + ui.item.value + " aka " + ui.item.id :
      "Nothing selected, input was " + this.value );
  }
  });
    });  
</$cript>

Thanks Once again


Messages In This Thread
No value from input->post - by El Forum - 02-22-2012, 10:18 PM
No value from input->post - by El Forum - 02-22-2012, 10:24 PM
No value from input->post - by El Forum - 02-23-2012, 04:07 AM
No value from input->post - by El Forum - 02-23-2012, 04:14 AM
No value from input->post - by El Forum - 02-23-2012, 06:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB