2011年1月31日 星期一

解決jQuery Editable 回上一頁時,選單資料錯亂!

jed(jquery-jec Editable combobox for jQuery )的預設參數如下表,當 使用預設值時,如果使用者用瀏覽器的「上一頁」返回時,則原來選單中的資料都會被移一筆,而造成資料錯誤,只要在設定
$(function () {
$('#cbonam_pros').jec({'position':999});
});

強迫position預設值為999,就會將手動輸入設定在最後一筆,就不會影響原來選單的選項結果了!
Type Name Description Default value Added in
int position index of editable option to be inserted in select 0 1.2
bool ignoreOptGroups ignores option groups when placing editable option if set to true false 1.3
int maxLength max input length 255 1.3
string array classes additional classes to be added [] 1.2
object styles additional CSS properties to be set {} 1.2
string array optionClasses additional classes to be added to editable option element [] 1.2
object optionStyles additional CSS properties to be set for editable option element {} 1.2
bool triggerChangeEvent triggers change event on select everytime user types if set to true false 1.3
bool focusOnNewOption moves focus to newly created option element if set to true false 1.2
bool useExistingOptions uses selected <option> text as a base for editable option if set to true, otherwise editable option base is empty string false 1.2
array ignoredKeys ignored key codes, values in array can be either a {min: MIN_VALUE, max: MAX_VALUE} , {exact: VALUE} value or integers [] 1.2
array acceptedKeys accepted key codes, values in array can be either a {min: MIN_VALUE, max: MAX_VALUE} , {exact: VALUE} value or integers [{min:32, max:126}, {min:191, max:382}] 1.2

沒有留言:

張貼留言