Hey guys I'm currenlty working on something and I want if I click a textbox element the value of it. the only problem is that it doesn't have an ID.
my html code:
<ul id="textbox">
<li><input type="text" value="test1" name="chosen" disabled="disabled" /></li>
<li><input type="text" value="test2" name="chosen" disabled="disabled" /></li>
<li><input type="text" value="test3" name="chosen" disabled="disabled" /></li>
<li><input type="text" value="test4" name="chosen" disabled="disabled" /></li>
</ul>
my mootools code:
window.addEvent('domready', function() {
var el = $('textbox');
});
If I click the first textbox I want to alert test1. If I click the second one I want to alert test2
I was thinking of adding ID's to the textboxes, but the textboxes are variable...
Thanks in advance..