I can't get the value |
Good day sir, i've a question about get the value. First please kindly check my view
Code: <script type="text/javascript"> Then here is my controller Code: $shippername = strtolower($this->input->post('shippername')); explanation. I input the shippername field from the form then it'll show up the field fill up by the other data from database. But when i try to PHP Code: $shippername = $this->input->post('shippername'); only shippername have value. Sorry for bad english
Your main problem is here:
PHP Code: <div class="panel-body"> 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.
(01-16-2015, 12:17 PM)mwhitney Wrote: Your main problem is here: Man, thanks for remind me about the closing tag. It's working now |
Welcome Guest, Not a member yet? Register Sign In |