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: 73
  • 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

#2 User is offline   chandran 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 495
  • Joined: 08-October 12
  • Location:Austria

Posted 19 May 2014 - 03:18 AM

Hi,
this refers to form ..'hotel-grid'
Thanks
chandran nepolean

My own extension:
http://www.yiiframew...sion/ejqueryte/

My wiki
http://www.yiiframew...checkboxcolumn/

If it work dont hesitate to click +1 button
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