Skip to main content
Participating Frequently
Aug 24, 2015 3:31 PM UTC
Question

coldfusion

  I am new to coldfusion can someone clear my doubt please.I have a function Test_Func. I want to assign the parameter(input) value to a variable myname).Kindly help

function  Test_Func(input)

{


<cfset var myname= " ">

}

    This topic is closed to new replies. Start a new post to keep the conversation going.

    1 reply

    Dave Ferguson
    Participating Frequently
    Aug 24, 2015 4:00 PM UTC

    You are trying to combine script and tag based syntax.  This will not work.  Below would be the proper syntax based on your code. 

    function  Test_Func(input)

    {

    var myname= arguments.input;

    }

    You might want to take a look at Learn CF in a Week‌ .  That should get you on the right track to what you are trying to do.

    Translate