Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

text field's initial value is a variable

Status
Not open for further replies.

mikemedia

Programmer
Apr 28, 2006
39
US
My form data is saved to a database.

Within the form is a table.
A named table cell <td> contains a JS document.write of today's date which is to be the time stamp.

Unfortunately I now realize that the contents of even 'named' cells aren't written to the dbase.
So I'm making a readonly text field whose init value is the 'variable' of today's date and time.

I cant seem to get the InitVal of the field to be a variable though. Suggestions??? Is it even possible?
 
Something else on the same topic...

All the "<input type=text" values are written to and read from the dbase correctly.

My named 'textarea' values are indeed written to the database exactly like the Input fields, but those values are not read e.g. <% Response.Write objRS("Notes") %>
All the other input fields are. Why not this one?
 
This does not seem to be the best forum for your question. Try forum333 for your server side problems and forum216 for Javascript issues.

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
Vrag's right about going elsewhere about this, but here's a parting shot:

I'd advise against doing your timestamp by putting a value into a field with Javascript. What happens if your user has JS switched off? What happens if they're in a different time zone and post a different date/time to yours? What happens if the date/time on their PC is just wrong?

If you want to time stamp your record, do it server-side in addition to whatever information you collect from the form. You'll have to ask the ASP forum how to do that though.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top