Files
yii/framework/web/js/source/jquery.yii.js
qiang.xue 662798d8a5
2008-09-28 12:03:53 +00:00

32 lines
644 B
JavaScript

/**
* jQuery Yii plugin file.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.yiiframework.com/
* @copyright Copyright &copy; 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
* @version $Id$
*/
;(function($) {
$.yii = {
version : '1.0',
submitForm : function (element, url) {
var f = $(element).parents('form')[0];
if (!f) {
f = document.createElement('form');
f.style.display = 'none';
element.parentNode.appendChild(f);
f.method = 'POST';
};
if (typeof url == 'string' && url != '') {
f.action = url;
};
f.submit();
}
};
})(jQuery);