javascript - Ajax Request not submit PHP executed form -


i have following code below needs submitted using ajax request. form

<form action="genformexec.php" id="genform" method="post" enctype="multipart/form-data">       <label class="type" for="ccode">*your confirmation code series of numbers sent mail after payment verification</label>       <input class="half" type="text" name="ccode" id="ccode" placeholder="confirmation code">       <input class="half" type="email" name="uemail" id="uemail" placeholder="email address">       <input class="half" type="text" name="fname" id="fname" placeholder="first name">       <input class="half" type="text" name="lname" id="lname" placeholder="last name">       <input class="full" type="text" name="cname" id="cname" placeholder="company name">       <input class="full" type="text" name="crcnum" id="crcnum" placeholder="company rc/bn number">       <input class="full" type="text" name="uaddress" id="uaddress" placeholder="residential address">       <input class="full" type="text" name="caddress" id="caddress" placeholder="company address">       <textarea class="full" rows="7" name="briefdes" id="briefdes" placeholder="brief description company"></textarea>       <input class="half" type="text" name="uname" id="uname" placeholder="username">       <input class="half" type="text" name="uphone" id="uphone" placeholder="phone number">       <input class="half" type="text" name="pword" id="pword" placeholder="password">       <input class="half" type="text" name="cfpword" id="cfpword" placeholder="re-type password">       <div class="profimage"><img id="logo_prev" src=""></div><br>       <label for="profimages">upload company logo/profile picture</label><br><br>       <input type="file" onchange="logo_prev()" name="profimages" id="profimages">       <label class="type">select sectoral group(s)</label>       <div class="postlimit">       <p class="limittype">motor vehicle , miscellaneous assembly</p>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="boat/ship building">boat/ship building</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="automobile components">automobile components</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="electrical generators assemblers">electrical generators assemblers</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="miscellaneous machine , equipment">miscellaneous machine , equipment</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="bicycle">bicycle</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="motorcycle assemblers">motorcycle assemblers</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="horological">horological</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="motor vehicle assemblers">motor vehicle assemblers</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="boat/ship building, automobile components, electrical generators assemblers, miscellaneous machine , equipment, bicycle, motorcycle assemblers, horological, motor vehicle assemblers">all</div>       </div>       <div class="postlimit">       <p class="limittype">chemical , pharmaceuticals</p>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="paints, vanishes , allied products">paints, vanishes , allied products</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="industrial, medical , special gases">industrial, medical , special gases</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="soap , detergent">soap , detergent</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="agro-chemicals (fertilizers , pesticides)">agro-chemicals (fertilizers , pesticides)</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="pharmaceuticals">pharmaceuticals</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="safety matches">safety matches</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="dry cell battery">dry cell battery</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="gramophone records , musical tapes manufacturers">gramophone records , musical tapes manufacturers</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="petroleum products">petroleum products</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="candle manufactures">candle manufactures</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="printing ink manufactures">printing ink manufactures</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="toiletries , cosmetics">toiletries , cosmetics</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="basic industrial chemicals">basic industrial chemicals</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="automotive battery">automotive battery</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="resin manufacturers">resin manufacturers</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="ball point pen manufacturers">ball point pen manufacturers</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="paints, vanishes , allied products, industrial, medical , special gases, soap , detergent, agro-chemicals (fertilizers , pesticides), pharmaceuticals, safety matches, dry cell battery, gramophone records , musical tapes manufacturers, gramophone records , musical tapes manufacturers, petroleum products, candle manufactures, printing ink manufactures, toiletries , cosmetics, basic industrial chemicals, automotive battery, resin manufacturers, ball point pen manufacturers">all</div>       </div>       <div class="postlimit">       <p class="limittype">non-metallic mineral products</p>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="glass manufacturers">glass manufacturers</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="ceramics manufacturers">ceramics manufacturers</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="abestos manufacturers">abestos manufacturers</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="school chalks , crayons">school chalks , crayons</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="cement manufacturers">cement manufacturers</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="glass manufacturers, ceramics manufacturers, abestos manufacturers, school chalks , crayons, cement manufacturers">all</div>       </div>       <div class="postlimit">       <p class="limittype">wood , wood products including furniture</p>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="wood products , furniture (excluding metal furniture)">wood products , furniture (excluding metal furniture)</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="plywood , particle board manufacturers">plywood , particle board manufacturers</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="wood products , furniture (excluding metal furniture), plywood , particle board manufacturers">all</div>       </div>       <div class="postlimit">       <p class="limittype">basic metal, iron , steel , fabricated metal products</p>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="association of steel pipe manufacturers">association of steel pipe manufacturers</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="metal packaging manufacturers">metal packaging manufacturers</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="foundry">foundry</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="metal manufacturers , fabricators">metal manufacturers , fabricators</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="association of primary aluminium producers">association of primary aluminium producers</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="enamel wares manufacturers">enamel wares manufacturers</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="welding electrode manufacturers">welding electrode manufacturers</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="galvanised iron sheets mnaufacturers">galvanised iron sheets mnaufacturers</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="nail , wire manufacturers group">nail , wire manufacturers group</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="association of steel pipe manufacturers, metal packaging manufacturers, foundry, association of primary aluminium producers, enamel wares manufacturers, welding electrode manufacturers, metal manufacturers , fabricators, galvanised iron sheets mnaufacturers, nail , wire manufacturers group">all</div>       </div>       <div class="postlimit">       <p class="limittype">food, beverages , tobacco</p>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="beer">beer</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="starch , other miscellaneous food products">starch , other miscellaneous food products</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="flavouring">flavouring</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="soft drinks , carbonated water">soft drinks , carbonated water</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="flour , grain milling">flour , grain milling</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="meat , fish">meat , fish</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="tea, coffee , other beverages">tea, coffee , other beverages</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="dairy products">dairy products</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="tobacco">tobacco</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="biscuits , bakery products">biscuits , bakery products</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="sugar">sugar</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="distillery , blending of spirit">distillery , blending of spirit</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="cocoa, chocolate , sugar confectionery">cocoa, chocolate , sugar confectionery</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="vegetable , edible oil">vegetable , edible oil</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="poultry group">poultry group</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="beer, starch , other miscellaneous food products, flavouring, soft drinks , carbonated water, flour , grain milling, meat , fish, tea, coffee , other beverages, dairy products, tobacco, biscuits , bakery products, distillery , blending of spirit, cocoa, chocolate , sugar confectionery, vegetable , edible oil, poultry group">all</div>       </div>       <div class="postlimit">       <p class="limittype">textile, wearing appareal, carpet, leather/leather footwear sectoral group</p>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="textile , wearing apparel manufacturers">textile , wearing apparel manufacturers</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="leather products manufacturers">leather products manufacturers</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="carpet , rug manufacturers">carpet , rug manufacturers</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="footwear manufacturers">footwear manufacturers</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="flour , grain milling">flour , grain milling</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="cordage, rope , twine manufacturers">cordage, rope , twine manufacturers</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="textile , wearing apparel manufacturers, leather products manufacturers, carpet , rug manufacturers, footwear manufacturers, flour , grain milling, cordage, rope , twine manufacturers">all</div>       </div>       <div class="postlimit">       <p class="limittype">electrical , electronics sectoral group</p>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="electronics">electronics</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="refrigerators , airconditioning/domestic appliances">refrigerators , airconditioning/domestic appliances</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="electric bulb lamps, accessories , fittings">electric bulb lamps, accessories , fittings</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="cable , wire">cable , wire</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="electrical power control , distribution equipment">electrical power control , distribution equipment</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="electronics, refrigerators , airconditioning/domestic appliances, electric bulb lamps, accessories , fittings, cable , wire, electrical power control , distribution equipment">all</div>       </div>       <div class="postlimit">       <p class="limittype">pulp, paper , paper products, printing , publishing sectoral group</p>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="chemical , stationery manufacturers">chemical , stationery manufacturers</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="printing, publishing , packaging">printing, publishing , packaging</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="pulp, paper , paper products">pulp, paper , paper products</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="sanitary towels, napkins , diapers">sanitary towels, napkins , diapers</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="chemical , stationery manufacturers, printing, publishing , packaging, pulp, paper , paper products, sanitary towels, napkins , diapers">all</div>       </div>       <div class="postlimit">       <p class="limittype">domestic , industrial plastic, rubber , foam sectoral group</p>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="rubber products">rubber products</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="domestic , industrial plastics">domestic , industrial plastics</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="foam manufacturers">foam manufacturers</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="bags , suitcases manufacturers">bags , suitcases manufacturers</div>       <div class="checkin"><input type="checkbox" name="postvalue[]" value="rubber products, printing, domestic , industrial plastics, foam manufacturers, bags , suitcases manufacturers">all</div>       </div><br><br><br><br><br><br><br>       <label class="type" for="regas">you registering as:</label>       <input type="text" class="full readonly" readonly name="regas" id="regas" value="manufacturer">       <label class="type" for="package">package type:</label>       <input type="text" class="full readonly" readonly name="package" id="package" value="gold">       <input type="submit" name="regsubmit" id="regsubmit" value="submit">   </form> 

this ajax request

$("#genform").submit(function(e) { e.preventdefault(); $.ajax({     type: "post", //or "get", if want     url: "genformexec.php",     data: $(this).serializearray(),      datatype: "json",      success: function(response) {         $('.responsealert').html(response);     },     error: function(response) {         //function called if request failed     } }); }); 

but issue when submit form, doesn't submit database , doesn't respond when check developer tool xhr status 200 ok. please wrong?

check getting in response. may caused due object form of response. try check in console , modify according it.


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -