Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 137
  • Last Modified:

retrieve all textbox values

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
Seven price
Asked:
Seven price
  • 3
  • 2
1 Solution
 
GaryCommented:
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
 
Seven priceFull StackAuthor Commented:
not sure how to deserialization of an array.
is there anyway to pass it.
name : value, name:value, name: value?
0
 
Seven priceFull StackAuthor Commented:
Ok but if a text box is blank i do not want that value to even become a string.
0
 
Seven priceFull StackAuthor Commented:
thanks
0
 
GaryCommented:
You had a couple of questions, I guess all sorted since you have accepted the comment?
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now