I want to use zaccaria’s Dialog and javascript function (see it here) for other actions as well. So I need to be able to send the relevant action name to the function. Something like:
I got the Create action working (obviously, because that is the wiki).
Now I want to use the same functionality for the CGridView’s ‘update’ buttons.
So I need to pass the url and PK to the javascript function.
I’ve spoken with zaccaria and he suggests generating the url outside the javascript function (in the link or in the CGridView) and then referring to it inside the function with javascript such as “div.find(‘a.createLink’).attr(‘href’);”. So you don’t “pass” it to the function like I tried to do.
I belief, this approach boils down to the same thing you are saying.