Yii Framework Forum: Registerscript - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Registerscript

#1 User is offline   Trinh Duy Hung 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 65
  • Joined: 26-October 12

Posted 20 November 2012 - 05:49 AM

Helllo everyone!

My question related to this snippet:

Yii::app()->clientScript->registerScript('search', "
// toggle (show/hide) the search form (typically in your admin.php) when you click on Advanced Search
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
//Submit the contents of your search form, and updates the grid below accordingly.
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('hotel-grid', {
		data: $(this).serialize()
	});
	return false;
});
");

This code comes from the admin view of Project.

Could someone tell me where to find the documentation or code for the function:
$.fn.yiiGridView.update('hotel-grid', {
		data: $(this).serialize()
	});

$(this) refers to what?

Any suggestion would be appreciated!

Thanks!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users