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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

return value from function

Status
Not open for further replies.

davidste

Programmer
Joined
Mar 7, 2004
Messages
15
Location
GB
I want to create a function that I can call to set the style of a web page. Basically if the cookie equals medium then use a style sheet with medium text sizes and so on.

So far I have

function requestCookie (cookie)

dim pageStyle

pageStyle = request.cookies("" & cookie & "")

if pageStyle = "" then
pageStyle = "medium"
end if

requestCookie = pageStyle

end function

I call this using

style = requestCookie ("page_style")

When I call the function I get the following error

Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'requestCookie'
/Default.asp, line 7

any help would be greatly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top