J
john
Condition:
A Timesheet entry page with 2 weeks displayed in a Datalist control.
What I need to do is associate a single Memo textbox back to the clicked,
Time entered Textbox with javascript.
I have 16 textboxes per row, with a bound hiddenfield for each of those for
the memo to be stored in for that day's column field, per project row. What
I do not know how to do is on the "onblur" event of the Memo textbox write
back to the hiddenfield what is written into the Memo.
Because there are many rows, and each row has a unique ClientID, I'm not
sure how to get the row number from javascript, as it not a selected row,
just a clicked Textbox on the Time entered textbox of a row.
I can pass it the original TextBox clicked day ID, but how do I get or pass
it the row number. I've tried using the ClientID Method as below but the
build fails.
I basically need to get the Datalist Row number or pass it thru to the
function from just a TextBox Click without a PostBack, just JavaScript.
The hiddenfields Id's are Hm1 thru Hm16
<script language="javascript" type="text/javascript">
Var txtday
function Memut()
{
document.getElementById("<%= Hm2.ClientID %>").value =
document.getElementById("DataListTime_ctl04_txtMemo").value
}
// This is hardcode way of sending the stored Memo to the Memo textbox for
review or editing thru an onfocus event of the textbox, but the ctl01 part
needs to part variable also to represent the row number of the textbox I
clicked (ctl01, ctl02, ctl03, etc).
function Memo1_IN(dayID)
{
txtday = dayID // Always Live Variable for use in Memut if Needed
document.getElementById("DataListTime_ctl04_txtMemo").value =
document.getElementById("DataListTime_ctl01_Hm2").value
}
</script>
Thanks
John
A Timesheet entry page with 2 weeks displayed in a Datalist control.
What I need to do is associate a single Memo textbox back to the clicked,
Time entered Textbox with javascript.
I have 16 textboxes per row, with a bound hiddenfield for each of those for
the memo to be stored in for that day's column field, per project row. What
I do not know how to do is on the "onblur" event of the Memo textbox write
back to the hiddenfield what is written into the Memo.
Because there are many rows, and each row has a unique ClientID, I'm not
sure how to get the row number from javascript, as it not a selected row,
just a clicked Textbox on the Time entered textbox of a row.
I can pass it the original TextBox clicked day ID, but how do I get or pass
it the row number. I've tried using the ClientID Method as below but the
build fails.
I basically need to get the Datalist Row number or pass it thru to the
function from just a TextBox Click without a PostBack, just JavaScript.
The hiddenfields Id's are Hm1 thru Hm16
<script language="javascript" type="text/javascript">
Var txtday
function Memut()
{
document.getElementById("<%= Hm2.ClientID %>").value =
document.getElementById("DataListTime_ctl04_txtMemo").value
}
// This is hardcode way of sending the stored Memo to the Memo textbox for
review or editing thru an onfocus event of the textbox, but the ctl01 part
needs to part variable also to represent the row number of the textbox I
clicked (ctl01, ctl02, ctl03, etc).
function Memo1_IN(dayID)
{
txtday = dayID // Always Live Variable for use in Memut if Needed
document.getElementById("DataListTime_ctl04_txtMemo").value =
document.getElementById("DataListTime_ctl01_Hm2").value
}
</script>
Thanks
John