Hello,
I have 2 divs. first is to accept some values and second is to display the output on the basis of inputs in div1.
The form is working fine.
My requirement is, on submitting (button in div1) , div1 should move to left side and div 2 should display the result adjacent to div1 .
My JQuery code is shifting the div1 to left but data is not posting to the controller .
in the view
echo form_open('flights_cont/view_flight_details', array( 'id' => 'myform'));?>
<script type="text/javascript">
$(function()
{
$('#myform').submit(function(e)
{
e.preventDefault();
var dataString = $("#myform").serialize();
$.ajax
({
type:"POST",
url:"<?php echo 'view_flight_details'?>",
data: dataString
});
$( "#submain" ).css('margin-left','10px');
});
});