I didn't use Prototype.js before, when I use jquery, I can get an element value like $("#inputA").val();
Is there an equivalent method in prototype like this? I use $("inputA").getAttribute('value');
, which is very verbose.
views:
65answers:
4
A:
$F('elementId')
is one way. That's problematic for radio buttons. I haven't used Prototype in a while however so maybe there's something new.
Pointy
2010-04-27 13:42:44
Does prototype has a jquery like wrapper object? what does $F("inputA"); return ?
ZZcat
2010-04-27 13:49:43
"Returns the current value of a form control. A string is returned for most controls; only multiple select boxes return an array of values. The global shortcut for this method is $F()."
Marek Karbarz
2010-04-27 14:17:38
A:
document.getElementById("inputA").value
is like magic: it works in EVERY framework.
Tim Down
2010-04-27 14:16:53