Load a view |
[eluser]GrootBaas[/eluser]
Hi there, Any help would be very much appreciated ... In my controller I load a form like this ... Code: function index() { From within this form, I use AJAX like this ... Code: var contract_no = $('.trSelected td:nth-child(2) div').text(); In the Update logs function within the controller, I call another form like this ... Code: function update_logs() { The new from is not loaded (nothing happens), but in my message logs, it says that ... Quote:DEBUG - 2008-10-16 18:38:40 --> File loaded: C:/WebAus/ifleetiii/system/application/views/default/content/log/log_detail.php Could somebody please help me?
[eluser]Dready[/eluser]
Hello, first of all, for debugging things like ajax, I suggest you use the "httpfox" firefox addon, it's simple and really cool. Now, in your ajax call, you don't do nothing with the html the server returns, I suggest you add the success option, something like : Code: $.ajax({ Does it work better ?
[eluser]GrootBaas[/eluser]
Hi, thanks for your suggestion. The AJAX is working fine. No problem there... I think my issue is whitin the form... Do i need something like Code: <?=form_open('quotes/submit_order');?> in my forms? In both of them?
[eluser]GrootBaas[/eluser]
Hi Guys, I am still very much stuck at this point. Could anybody please spear some time for me? Regards, Me.
[eluser]GrootBaas[/eluser]
It seems to work with a button. Does that mean that AJAX does not submit the form?
[eluser]GrootBaas[/eluser]
How can I do the same with my ajax call ... Code: var contract_no = $('.trSelected td:nth-child(2) div').text(); as what I do with this button ... Code: <?=form_submit(array('id' => 'button', 'name' =>'btn_order', 'value' => 'test')); ?> There must be a difference, i just dont know ...
[eluser]GrootBaas[/eluser]
Hey guys, I solved it ... All i had to do was to add this in my form HTML ... Code: <form name="get_password" method="post" action="logs/update_logs"> Code: document.get_password.submit(); The rest (Ajax and CI) stayed the same. Can anybody explain to me why a web form need to be explicitly submitted.
[eluser]narkaT[/eluser]
you haven't solved the problem, you just worked around it your're probably misunderstanding the concept of AJAX. like Dready said, when the ajax-request is complete you'll have to do something with the result in order to see any changes. ps: Most frameworks prefer an object instead of a parameter-string when dealing with ajax: Quote:$.ajax({ |
Welcome Guest, Not a member yet? Register Sign In |