Home how to send values to a sevlet from a html updated by javascript
Reply: 1

how to send values to a sevlet from a html updated by javascript

Suhad Mendis
1#
Suhad Mendis Published in 2017-09-14 09:16:36Z
<form method="post" action="../SubCategory">
 <div id="destinationFields">
   //after the page loaded i will drag and drop some divs fromsourceFields by jquery plugin
 </div>
<button type="submit" id="button">Add</button>
</form>

 <div id="sourceFields">

   <div>
   <label class="control-label"  id="label" for="Name">size:</label>
   <input type="hidden" value="1" name="labelValue" />
  </div>

   <div>
   <label class="control-label"  id="label" for="Name">Brand :</label>
   <input type="hidden" value="2" name="labelValue" />
  </div>

   <div>
   <label class="control-label"  id="label" for="Name">width:</label>
   <input type="hidden" value="3" name="labelValue" />
  </div>

 </div>

this is how the page is loading, there are some elements(divs) out of the form (you can see that in sourceFields)

i will drag and drop it into destinationFields but after i press submit and check in the sevlet the changes are not done (i think it means the actual html is not changing)

Anup pandey
2#
Anup pandey Reply to 2017-09-14 09:22:25Z

Using Ajax call . For more detail visit given url:- http://www.programming-free.com/2012/08/ajax-with-jsp-and-servlet-using-jquery.html

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.300118 second(s) , Gzip On .

© 2016 Powered by cudou.com design MATCHINFO