Javascript code for validating textarea


13-Apr-2018 13:32

javascript code for validating textarea-6

Cam2cam live sex chat

First we use the open method and send our data String to and then we send it.Next, we get the response Text and since we’re just sending a string, if the it’s successful, an empty string is returned.Next, add this (all the code goes inside the anonymous function): Since we want this to work in IE8, we have to write our click event a bit different.

javascript code for validating textarea-50

dating membrii prieteni profile

Now we use another for loop to create the string that we’ll pass to our PHP file.We can then check to see if that’s what was returned and if it was, tell our user that they were successful otherwise, we can tell them something went wrong.We used the GET method because when using Ajax, POST is only needed when you’re sending a larger chunk of info, we’re sending a pretty simple string, so we can just use GET.I’m a big fan of client side validation because, a) I’m a front-end guy and b) since I use Ajax to send the content to the server, I don’t really want to go to the trouble of checking it on the server and sending it back.

javascript code for validating textarea-33

Extreme hard sex dating

Up until recently, I used j Query to validate the content of a form but one day I noticed on a couple of sites I’d built that I was only using j Query on the contact page.

Then I took a look at the code realized I was using j Query for two things, to select things in the DOM and to use Ajax to send to the information to my php mailing file.