you have two input fields (3rd and 4th) where name attribute is "name3" and the
first 2 input fields need to have id tags
> Hi All,
>
> I am trying to merge three textfield values (month,day and year for
> DOB)into one and trying to store in a session. Javascript is a client
> side variable and I am unable to store it to session variable . Can
> anyone help me with this?
>
> See below is the code I am trying to do and I also used hidden fields
> to display the date but it could not work.
>
> <script language="javascript">
>
> function datecheck()
> {
> if(document.form1.name1.value!='' && document.form1.name2.value!='' &&
> document.form1.name3.value!='')
>
> {
>
> var dd= document.form1.name1.value;
>
> var mm = document.form1.name2.value;
>
> var yyyy = document.form1.name3.value;
>
> var dat = (mm+'/'+dd+'/'+yyyy);
>
> document.getElementById("id_name").setAttribute("value",dat);
>
> <!--- alert(dat); --->
>
> }
>
> }
> <!---
> function autotab(original,destination)
>
> {
>
> if (original.getAttribute && original.value.length==original.
> getAttribute("maxlength"))
>
> destination.focus() ;
>
> } --->
>
> <cfform name="form1">
>
> <input name="name1" value="" type="text" maxlength=2>/
> <input name="name2" value="" type="text" maxlength=2>/
> <input name="name3" value="" type="text" id="name3" maxlength=4
> onBlur="datecheck()">
> <input type="hidden" name="name3" id="id_name" value="">
> <cfinput name="Submit" value="Submit" type="Submit">
> </cfform>
>
> <cfif isDefined('form.Submit')>
>
> <cfset str="#form.name3#">
> <cfdump var="#str#">
> </cfif>
>
> Thanks in Advance ...
> Priya
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321289
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4