gmaestro
gmaestro

Reputation: 339

Get value from input field

Here I have:

 var row = table.getSelection()[0].row;
console.log(data.getValue(row,0));
 console.log((data.getValue(row,0)).val());

and I get:

<input class="span2 form-control" id="pocetak1" size="16" type="text" value="2013-04-01" readonly>

Uncaught TypeError: Object <input class="span2 form-control" id="pocetak1" size="16" type="text" value="2013-04-01" readonly> has no method 'val' 

How I can get value from data.getValue(row,0) ???

Upvotes: 0

Views: 46

Answers (1)

Travis J
Travis J

Reputation: 82337

val is part of the jQuery API. The native element only exposes .value. Using .value on an input element in javascript will give you its value.

Upvotes: 3

Related Questions