CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Creating functions causes a syntax error!!!???

Print topic Send  topic

Author Message
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
View profile  Send private message
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
View profile  Send private message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.