Pinochet
Posts: 13
|
Posted: 04/15/2004, 4:17 PM |
|
I made the code below in the event below and get the error below???
Code works fine outside of CCS???
Function Page_OnInitializeView() 'Page_OnInitializeView @1-8612B06E
'Custom Code @3-73254650
' -------------------------
dim z
z = x(1)
function x (y) <<<----Error points here
x = y + 1
end function
response.write z
' -------------------------
'End Custom Code
End Function 'Close Page_OnInitializeView @1-54C34B28
Error Type:
Microsoft VBScript compilation (0x800A03EA)
Syntax error
/prod/App_Requests/Testing_events.asp, line 26
_________________
don't worry it doesn't mean anything anyway |
|
|
peterr
Posts: 5971
|
Posted: 04/15/2004, 4:38 PM |
|
Pinochet,
If you look closely at the above code, you will see that it starts with:
"Function Page_OnInitializeView()"
Therefore you are trying to define a function within a function, which is causing the problem.
You may move your custom function definition into Common.asp, or put it between the events (for example above "Function Page_OnInitializeView()".
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
Pinochet
Posts: 13
|
Posted: 04/15/2004, 5:32 PM |
|
Great, thanks. I knew you couldn't do that but didn't even notice I was doing that. Doh!
Tried your suggestion and it worked fine.
Thanks again.
_________________
don't worry it doesn't mean anything anyway |
|
|
|