jQuery Form Problems -


i using jquery plugin. need changing type of form "create user" form different type. here link original: (view source towards bottom)

code struggling with

"insert purchase": function () {   var bvalid = true;   allfields.removeclass("ui-state-error");   bvalid = bvalid && checkregexp(total_price, /([0-9])/, "total_price may consist of  0-9");   bvalid = bvalid && checkregexp(item_cost, /([0-9])/, "item_cost field allow :  0-9");   bvalid = bvalid && checkregexp(tax, /([0-9])/, "tax field allow :  0-9");   if (bvalid) {     $("#users tbody").append("<tr>" +       "<td>" + total_price.val() + "</td>" +       "<td>" + item_cost.val() + "</td>" +       "<td>" + tax.val() + "</td>" +       "</tr>");     $(this).dialog("close");   } }, cancel: function () {   $(this).dialog("close"); } }, 

but more specifically, middle section:

if(bvalid) ...... $(this).dialog ("close"); 

bvalid boolean. if of regex expressions renders false, bvalid false.

in if statement bvalid tested on state

if( bvalid == true ) {         // add data table in document        // , close dialog       $(this).dialog ("close"); } 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -