aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Jquery : Unable to pass vallue to the servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Jquery : Unable to pass vallue to the servlet " Watch "Jquery : Unable to pass vallue to the servlet " New topic
Author

Jquery : Unable to pass vallue to the servlet

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi ,

i am unable to pass a feilds value to my servlet



inside the servlet its always null , please help .


Save India From Corruption - Anna Hazare.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30293
    
150

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

thanks madam .
Nikhil Wanpal
Greenhorn

Joined: Apr 16, 2010
Posts: 11

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jquery : Unable to pass vallue to the servlet