ExpertConnect - Mentoring & Discussions

You can join mentoring & discussions for Free Ask Question, Give Answer, Discuss IT Problems, Learn, and Grow

2017-10-20 14:24:55 15

HTML

Hypertext Markup Language is the standard markup language for creating web pages and web applications. With Cascading Style Sheets and JavaScript, it forms a triad of cornerstone technologies for the World Wide Web.

Topic menu

2018-03-22 14:42:36 1
Profile picture of Lindsay  Graham
Posted: Mar 22, 2018

I want to POST form data on server, but I am unable to find how to get Form fields in ajax post. A small code can be very helpful.

Comment (1) ·  Like (1)
Profile picture of Wajih Qidwai

Wajih Qidwai Mar 22, 2018

Hi, below is a code snippet , which contains datatype to read form data and send it to server:
$.ajax({ url: ‘/YourServiceUrlHere’,
type: ‘POST’,
timeout: 12000,
dataType: ‘text’,
data: { firstName: YourForm.fname.value,
lastName: myForm.lname.value }
).done(…
)

Like

Write a new comment...
Ready to post? select an option: