Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Function does not return value. 1

Status
Not open for further replies.

Gatorajc

MIS
Mar 1, 2002
423
0
0
US
I have been looking at this to long. Must be something simple I am doing wrong. Can anyone tell me why this is not returning a value.


BillStatus = SetStatus()


<%
'----------------------------- FUNCTION TO SET STATUS ACCORDING TO DATE ----------------------------------
Function SetStatus()

IF Date > "1/1/2004" AND Date < "4/1/2004" Then
BillStatus = "H"
else
BillStatus = "N"
End if

End Function
%>

I know it calls the function because if I do a response.write BillStatus it will show output something.

Thanks in advance

AJ
[americanflag]

Do you feel lucky?


 
Is the function call server-side? You can't call a server-side function from the client-side.

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

zen.gif
 
Sorry no its on the server side also. It looks like this


<%
BillStatus = SetStatus()
%>

AJ
[americanflag]

Do you feel lucky?


 
TYPO!!!

Code:
Function SetStatus()

    IF Date > "1/1/2004" AND Date < "4/1/2004" Then
        [b]SetStatus[/b] = "H"
    else
        [b]SetStatus[/b] = "N"
    End if

End Function

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

zen.gif
 
Knew it was something simple thanks

AJ
[americanflag]

Do you feel lucky?


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top