Hi,
I am basically trying to create an ajax edit form.
This is the edit link code
<?= $this->Js->link('Edit',
array('controller' => 'employees', 'action' =>
'personal_details_edit',$employee['Employee']['id']),
array(
'update' => '#personal_details_update',
'evalScripts' => true,
'before' => $this->Js->get('#busy-indicator')->effect('fadeIn',
array('buffer' => false)),
'complete' => $this->Js->get('#busy-indicator')->effect('fadeOut',
array('buffer' => false)),
)
);
echo $this->Js->writeBuffer();
?>
And this is the ajax form code which gets loaded after clicking the above
edit link.
<?
//serialize the form element to submit
$data = $this->Js->get('#employee_personal_edit')->serializeForm(
array(
'isForm' => true,
'inline' => true)
);
// Submit the serialize data on submit click
$this->Js->get('#employee_personal_edit')->event(
'submit',
$this->Js->request(
array('action' => 'personal_details_edit'),
array(
'update' => '#personal_details_update', // element to
update
// after form submission
'data' => $data,
'async' => true,
'dataExpression'=>true,
'method' => 'POST',
)
)
);
echo $this->Js->writeBuffer();
?>
The form submit is working in Chrome, IE, Safari but not working in Firefox
and Opera.When I click form submit in Firefox nothing happens(no
XMLHTTPRequest is being sent).
If i access the form link directly(without loading via ajax edit link)its
working normally in Firefox.
How to fix it?Any help is appreciated. :)
--
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.