Welcome Guest, Not a member yet? Register   Sign In
I can't get the value
#3

(This post was last modified: 01-18-2015, 06:58 PM by bobykurniawan.)

(01-16-2015, 12:17 PM)mwhitney Wrote: Your main problem is here:

PHP Code:
<div class="panel-body">
 
   <div class="form-group">
 
       <form role="form" method="post" action "<?=base_url();?>home/siprocess">
 
           <labelName : </label>
 
           <input type='text' onkeyup="shipper()" name='shippername' id='shippername' class="autocomplete form-control" />
 
   </div>
 
   <span id='Info'>
 
   </span>
</
div

Even though it doesn't look like it, because you don't close your form tag anywhere in the code you provided, #Info, where you appear to be placing the result of your AJAX call to the controller, is probably going to be outside of your form in most browsers. Since the form can't leave the enclosing div without creating invalid HTML, most browsers will insert a closing form tag before the closing div tag, which occurs before the #Info span opens. If you do close your form tag somewhere after the code you've included here, it's likely that the browser has still inserted the closing tag and is (mostly) ignoring the closing tag you provided in your view.

You should be able to confirm this by using the developer tools for your browser to inspect the rendered HTML. Sometimes "View Source" will also show you where the closing form tag has been inserted.

Man, thanks for remind me about the closing tag. It's working now
Reply


Messages In This Thread
I can't get the value - by bobykurniawan - 01-15-2015, 08:26 PM
RE: I can't get the value - by mwhitney - 01-16-2015, 12:17 PM
RE: I can't get the value - by bobykurniawan - 01-18-2015, 06:47 PM



Theme © iAndrew 2016 - Forum software by © MyBB