Thanks. This does work... sort of. The value is being wrtten to the label
onclick, but the data is not surviving the trip to the server for some
reason. If I unhide the label, I can see it flash the date and then
disappear when the page is served by the server. Any server side code sees
the label as empty.
It would seem intuitive that if the label held data before being posted, it
should be seen by the server. There is obviously something fundatmental that
I'm missing here.
"Michael Kolias" <mi***@alspaconsulting.com> wrote in message
news:aJ******************************@speakeasy.ne t...
Server Side Code, In the Page_Load sub add this:
yourSubmitButton.Attributes.Add("onclick", "registerUploadTime();")
Client Side Code, Inside the head tag add this:
<script type="text/javascript">
function registerUploadTime()
{
document.getElementById('lblUploadStartTime').inne rText = Date();
}
</script>
"Chip" <ch**@intradata.com> wrote in message
news:ep**************@TK2MSFTNGP03.phx.gbl...I need to time a file upload using the 1.X HTML upload control. So I need
the time the upload started, which is problematic since no page processing
takes place until after the file is uploaded. Is there a way to write to
the form (lblUploadStartTime) before the upload begins using Javascript --
using the OnClick of the Submit button? I'm not experienced with JS, so if
there is a way to do this please let me know the JS syntax.