I did have code that did work, but I needed to modify it
http://jsfiddle.net/bthorn/xbs5c41b
THEN I was told that I needed to change from input to label (span)
NOW this code does not work even though I changed from
http://jsfiddle.net/bthorn/xbs5c41b/1/
.find("input")
to
.find("span")
Notice the code line that I commented out
function setDateTimeOn(elm) {
var formattedDate = GetCurrentDateTime(); //get formatted date
$(elm) //clicked button
.parent("td") // container td
.next() // next td
//.find("input") // find child input
.find("span")
.val(formattedDate); //set date
}
HTML
<table>
<tr>
<td style="width:5px;">
<input type="button" id="GridView1__ctl2_AddButton0" name="GridView1:_ctl2:AddButton0" value="On" class="btn-blue" onclick="setDateTimeOn(this)">
</td>
<td style="width:150px;">
<!-- <input id="GridView1__ctl2_txtStormTimeOn" type="text" name="GridView1:_ctl2:txtStormTimeOn" value="">-->
<span id="GridView1__ctl2_lblStormTimeOn"></span>
</td>
</tr>
Can ".find() not work on span?