Multiple AJAX functions -
I am trying to add an AJAX function to a script that essentially does 2 things:
Step 1: Determine whether it is necessary for users to search or create a new step 2: Based on selection 1, it will either go to the selected script (it works in part) or a new function (That part does not work, even then). Now, I know that the second function works entirely because I used to call it directly in anchor tag and there was no problem with it, so I want to know how I am trying to all, this function itself Understands Here's what I've done so far:
function changecm () {var txt = 'Select an option to continue: & lt; Br> & Lt; Input type = "radio" name = "type" id = "type" value = "search" style = "font-size: 22px;" & Gt; & Lt; Br> & Lt; Input type = "radio" name = "type" id = "type" value = "create" style = "font-size: 22px;" & Gt; '; $ .prompt (txt, {buttons: {confirm: true, cancel: wrong}, submit: function (v, m, f) {var flag = true; if (v) {} return flag;}, callback: Function (v, m, f) {if (v) {var type = f.type; if (type == 'create') {$ .post ('changecm', {type: type}, function (data) $ ("Div # Customer"). Html (Data);});} and {function (changecmnow);}}}}); , to limit the number of your last name or telephone number to the customer: & lt; Br> & Lt; Input type = "text" name = "conditions" id = "rule" style = "font-size: 22px; width: 400px;" & Gt; '; $ .prompt (txt, {buttons: {confirm: true, cancel: wrong}, submit: function (v, m, f) {var flag = true; if (v) {} return flag;}, callback: Function (v, m, f) {if (v) {var terms = f.terms; $ .post ('changecm', {terms: terms}, function (data) {$ ("div # customer"). Html (Data);});}}});
}
If you want to call the function, Why not just
else {changecmnow (); }
Comments
Post a Comment