CJUI and normal page loads

Hi, to all has anyone implemented the feature below.

Basically I have a login form working and I have used ajax link which loads the form from the login controller using CJUI dialog but I need also the form to work ie open the main default form as like normal page when user has disabled javascript or is disabled by default. Summary if javascript is enabled and the ajax link is clicked the popup login loads if the javascript is not enabled and the login link is clicked the whole login page opens.

Please help really in need as soon as possible.


has implemented the this feature just an example of the sites using it and are yii powered.


It’s pretty simple.

  • Create a CJuiDialog with the login form or whatever.

  • Create a link to be clicked on to open the dialog/forward the javascript disabled user.

  • Have the link have a url that points to the login URL.

  • Have the function for onclick on the link or attached as a click event handler to open the dialog return false so that if they have javascript enable the link only opens the dialog.

Code for the last point:

echo CHtml::link('Login', array('site/login'), array('onclick' => "js:$('#dialogid').dialog('open'); return false;"));

Let me know if you get stuck.

Thanks will give it a try and let you know.

Thanks Luke the dialog and both the normal form is loading. Thanks again for your quick help.