Solved

retrieve all textbox values

Posted on 2014-07-23
5
130 Views
Last Modified: 2014-07-23
type in empty textbox and the submit to get info. 
the jsonobject only retrieves the last 2 value of the text box. I would like to get all of them.

Open in new window


http://jsfiddle.net/sevensnake/Nbr7Y/5/
0
Comment
Question by:sevensnake77
  • 3
  • 2
5 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 40214598
Map the values back

http://jsfiddle.net/Nbr7Y/6/

    JSONObject.Threshold = $('[id^=Threshold]').map(function () {
        return this.value
    }).get()

    JSONObject.sec = $('[id^=SecureType]').map(function () {
        return this.value
    }).get()

Open in new window

0
 
LVL 9

Author Comment

by:sevensnake77
ID: 40214762
not sure how to deserialization of an array.
is there anyway to pass it.
name : value, name:value, name: value?
0
 
LVL 9

Author Comment

by:sevensnake77
ID: 40215193
Ok but if a text box is blank i do not want that value to even become a string.
0
 
LVL 9

Author Closing Comment

by:sevensnake77
ID: 40215200
thanks
0
 
LVL 58

Expert Comment

by:Gary
ID: 40215710
You had a couple of questions, I guess all sorted since you have accepted the comment?
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Summernote and form validation 10 44
Responsive CSS question 2 42
jQuery CSS Scroll Issue 3 35
Bootstap Icons 3 22
There are a couple ways to attach a JavaScript function to dynamically created elements. You can make a new script for each element as it’s created or you can use delegation. Delegation allows a single script that is added at page creation to mat…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now