Yii Framework Forum: Problem In Understanding Cjuidialog - Yii Framework Forum

Jump to content

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

Problem In Understanding Cjuidialog Rate Topic: -----

#1 User is offline   Sukhwinder 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 51
  • Joined: 27-October 09

Posted 16 January 2013 - 11:36 AM

I am working on this wiki http://www.yiiframew...eate-new-model/
here a JS function addClassroom() is given, I have following Doubts :

in the line
'data'=> "js:$(this).serialize()",

since the function is not assigned to any object, how "this" will refer to the form object?

In the line :
$('#dialogClassroom div.divForForm form').submit(addClassroom);

.submit() require a function as argument, why it is not written like .submit(addClassroom()) instead?
I am not able to understand the sequence of events, why the function addClassroom() is called again within itself?

In the line
'onclick'=>"{addClassroom(); $('#dialogClassroom').dialog('open');}"));?>

when the AJAX link is clicked , addClassroom() is executed and dialog is opened simultaneously or first addClassroom() will be executed and then dialog will be opened?

Thanks in advance
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