Declared variables not showingup at insert expression

Declared variables not showingup at insert expression

Hi,

I have two custom functions within the application
DaysRemaining(duedate) --> does the  duedate - TodayDate. (Works great)
CustomAlert(days) ---> if 0-3 days then "extreme alert", if 3-10 days .. etc etc (again works great)

In my HTML view, I am calling these two functions in this manner.



If Profile_Status(field) == "completed"
    {Alert="Great Job"}
else
     {days_pending=DaysRemaining(Profile_Duedate) --- >So far so good
        Alert=CustomAlert(<days>) ---> The problem is here.



At Alert=CustomAlert(<days>) , I am unable to substitue with the local variable, days_pending. I get the error messsage that the variable is not declared.

Please advice,
Regards.


Deepa