Hi Gurvinder.
If I view the source of the page, the section i'm interested in is enclosed in an html tag <fieldset id="Demo4">
So I'm presuming it's some kind of element that we can get the values from?
Main Topics
Browse All TopicsI've been following the demo at
http://www.webreference.co
Specifically the part where you can drag and drop items between fieldsets.
I'd like to extend that to send the contents of the fieldset on clicking a button.
The part I'm having trouble with is what javascript code would I use to return the value of specific <fieldset> so that I can submit them somewhere?
Obviously since you can drag and drop between the fieldsets, I need to have submitted what's in the fieldsets after they've been dragged and dropped!
Thanks.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
fieldset is a way of grouping the related elements in a form
See http://www.w3schools.com/t
Regarding the original problem,
If you just want the contents of the fieldset, then it should be straightforward, since you can just get the contents of any html element using javascript (something like elementById.Value).
If you want the contents of the related elements inside the fieldset, then you have to achieve this by naming the internal elements in such a way that you can retrieve their value by just giving the name of the fieldset. For example, if the fieldset name is fs1, then the textboxes inside the field set will be fs1txt1, fs1txt2 etc.
Let me know if this helped you
You can check the parent node of the div element that you are dragging.
Use the following link as reference
http://www.java2s.com/Tuto
Ok sounds good. I'm really bad at javascript, so what function would I need to write that on submission would go to the div with an id of "DragContainer4" and "DragContainer5" and return the elements? I tried using
var output = DragContainer4.getElements
but when I alert(output) i get [object].
which is presumably because it's an array?
how would I actually see what's in the array? ie convert to string?
thanks!
You don't need to directly get the object of the DragContainer here because that is not being dragged here. Instead, you need to get the Object of div with class 'DragBox' ie for example Item22.
After dragging Item22 you need to check the new parent node of Item22.
Using
var parentObject = document.body.getElementsB
you will get the name of the parent.
Once you have got this Id, you know the final location of the box that you have dragged.
Business Accounts
Answer for Membership
by: gurvinder372Posted on 2009-11-04 at 20:46:35ID: 25746848
chtru: I couldn't find the word 'fieldset' on the web-page whose link you have provided. Could you explain, what exactly do you mean by the 'fieldset'?