skip to Main Content

How to check if data returned from ajax as json is empty object or not – Jquery ajax

I have set this script for checking if the email address exists in the DB or not: function checkemail(){ var e = document.getElementById("email").value; if(e != ""){ document.getElementById("emailstatus").innerHTML = 'checking ...'; $.ajax({ type:'get', url:'{!! URL::to('checkEmailExists') !!}', data:{'email':e}, success:function(data){ // console.log(data); if(Object.keys(data).length…

VIEW QUESTION

How can I check if 2 Contact Form 7 checkbox inputs are checked or not, with the use of Jquery? – WordPress

To begin with this is my HTML: <p> <span class="wpcf7-form-control-wrap checkbox-770"> <span class="wpcf7-form-control wpcf7-checkbox" id="Personal"> <span class="wpcf7-list-item first last"> <label> <input type="checkbox" name="checkbox-770[]" value="buisness"> <span class="wpcf7-list-item-label">buisness </span> </label> </span> </span> </span> <br> <span class="wpcf7-form-control-wrap checkbox-771"> <span class="wpcf7-form-control wpcf7-checkbox" id="buisness"> <span…

VIEW QUESTION
Back To Top
Search