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.
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.