Registerscript

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!

Hi,

this refers to form …[color=#008800][size=2]‘hotel-grid’[/size][/color]