This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have following code in Html,Js and JSP followed by weird out put of jsp, can some kindly let me know whats wrong with any of the file? ====== ===== ============ ======== HTML ========= ======== ========
All desirable things in life are either illegal, banned, expensive or married to someone else !!!
Joined: Feb 10, 2001
okay,did some rnd and found the pattern of this weird behavior, serialize method is converting each char of parameter and value in to one separate request parameter value pair. i kept only one input with name term and value as praful, so instead of passing it as term=praful it is passed as
Your issue is with the data parameter that you are passing to the load() method:
That param is expected to be an object hash of the parameters to send with the request. The serialize() method returns a query string of the params (which is useful when setting the post body of request, but not here), so the string is being parsed into its separate characters for sending as the prams. Not what you want.
You want to use the serializeArray() method which returns an object hash suitable for use with load():