Open gavinreid2004 opened 9 years ago
How to assign asp.net control to default fieldSelector to ":input:not(input[type=submit]):not(input[type=button]):not(button)"
Can you help me....
when setting up areYouSure you can pass the options object in with fieldSelector property set to the value you want. For example $('#myform').areYouSure({ 'addRemoveFieldsMarksDirty': true , fieldSelector: ':input:not(input[type=submit]):not(input[type=button]):not(button)'});
Thanks for your reply.
I want to bind click event with this input [Html/asp.net] control ..
$('#frmRegBegin').areYouSure({ 'message': 'Your profile details are not saved!', 'addRemoveFieldsMarksDirty': true, 'fieldSelector': "input:not(input[type=submit] [value=submit] [id=Submit1] [onclick=callme()]):not(input[type=button][id=Button1])" });
function callme()
{
//do saving changes.
}
I tried its throws error: "JavaScript runtime error: Syntax error, unrecognized expression: input:not(input[type=submit] [value=submit] [id=Submit1] [onclick=callme()]):not(input[type=button][id=Button1])"
in my code my field selector starts with a : ":input:not(....
How to avoid to display "Leave on the page" , "stay on the page"
I had an issue when I set addRemoveFieldsMarksDirty to true in IE 11. I had button tag on the for and this was being included in the ays-orig-field-count which caused the warning to be shown/not shown inappropriately. Changing the default fieldSelector to ":input:not(input[type=submit]):not(input[type=button]):not(button)" resolved the issue.