I'm working with one controller and one view. In my controller i am using a renderPartial function to render my "search" view. In my "search" view i have a respective script (using registerScript function) that works for search data with ajax. But the javascript code does not appear in the source code (browser). If i create another view and call the function renderPartial inside this view and point to the "search" view, the javascript code appears. Someone know why i can't see my javascript code (and the function doens't work) when i'm using the function renderPartial inside the controller and the registerScript in the view?
Page 1 of 1
Problem With Renderpartial + Registerscript
#2
Posted 06 February 2013 - 11:22 AM
Dear Friend
Did you call the function in the following way?
Did you call the function in the following way?
$this->renderPartial("yourView",$data,false,true);//the last parameter "true" ensures that view is rendered along with scripts.
#3
Posted 06 February 2013 - 11:45 AM
seenivasan, on 06 February 2013 - 11:22 AM, said:
Dear Friend
Did you call the function in the following way?
Did you call the function in the following way?
$this->renderPartial("yourView",$data,false,true);//the last parameter "true" ensures that view is rendered along with scripts.
Yes, The last param, should be true which is by default a false.
Share this topic:
Page 1 of 1

Help














