Quantcast
Channel: Adobe Community: Message List - ColdFusion
Viewing all articles
Browse latest Browse all 21760

Re: Pass variable in Dateadd() function

$
0
0

Yes

 

 

<cfset txt_expiration = 180>

<cfset yearAhead = DateAdd("d", txt_expiration, now())>

 

This works. But in my case i am calling txt_expiration value from a sql query through js script as follows

 

<SCRIPT>

        <cfwddx action="cfml2js" input="#qry_category#" topLevelVariable="qj">

       

        function fnselectcat()

        {

           

                if(qj.getField(i,"cat_id") == document.frm.sel_category.value)

                    {

                       

                        document.frm.txt_expiration.value = qj.getField(i,"CAT_EXPIRATION");

                    }

                   

           

        }

    </SCRIPT>

 

how to fetch the "txt_expiration" value from script and pass it into the date funtion ??


Viewing all articles
Browse latest Browse all 21760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>