Wrox Programmer Forums
|
ASP Forms As of Oct 5, 2005, this forum is now locked. Please use "Classic ASP beginner" at http://p2p.wrox.com/forum.asp?FORUM_ID=54 or "Classic ASP Professional" http://p2p.wrox.com/forum.asp?FORUM_ID=56 instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Forms section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 10th, 2005, 10:14 AM
Authorized User
 
Join Date: Feb 2005
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kumarop
Default value in field at run time

Dear all,
     What is the best way to put value in one field in a form on run time, So that user can see some value already written in that field the moment page is loaded.
Let say I want to display current system date in filed called fromdate in the same form for example I can take time () from asp code, but how to put this into form's field in same page.

Regards
om prakash




om prakash kumar
__________________
om prakash kumar
 
Old April 10th, 2005, 11:41 PM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

suppose ur datevalue=date() or time whtever
then you have two ways

<body onload="LoadFunction()">
<form name="myform"><input type=text name="fromdate"></form>
</body>
<script>
function LoadFunction()
{
document.myform.fromdate.value='<%=datevalue%>'
}
</script>

or

<input type=text name="fromdate" value="<%=datevalue%>">

Hope this will help you

Cheers :)

vinod
 
Old April 11th, 2005, 01:24 AM
Authorized User
 
Join Date: Feb 2005
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kumarop
Default

thanks vinod, for Concept.

om prakash kumar





Similar Threads
Thread Thread Starter Forum Replies Last Post
run time polymorphism MunishBhatia C# 2005 5 December 12th, 2007 08:38 AM
Design-Time or Run-Time now ? ALGNET .NET Framework 2.0 1 July 31st, 2006 04:43 AM
Run time Help Dazzer96 Access VBA 2 May 3rd, 2006 07:03 AM
Adding new field to a database table in run time dotnet cat ASP.NET 1.0 and 1.1 Basics 1 October 6th, 2005 01:36 PM
Can I get Field Value from Report in run-time ? Sini Crystal Reports 0 June 30th, 2004 05:33 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.