Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jquery : Unable to pass vallue to the servlet

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

i am unable to pass a feilds value to my servlet



inside the servlet its always null , please help .
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34401
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, have you run an alert() to confirm the field has a value.

Also, I usually see people use data: and name/value pairs. Is it legal to make your own top level property? Here's an example of the format I'm used to seeing.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks madam .
 
Nikhil Wanpal
Greenhorn
Posts: 11
Eclipse IDE Firefox Browser jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ravi Kiran Va wrote: cityName:document.getElementById('cityName').value


I dont think you can create new params to send data to server. You can use your keys but that is inside the 'data' as a url string or in JSON.
like data: {key:value},

check this out: http://api.jquery.com/jQuery.ajax/#sending-data-to-server
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic