CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Should I put my own Javascript in Functions.js

Print topic Send  topic

Author Message
monu

Posts: 8
Posted: 10/26/2011, 9:18 AM

Hello Team,

I understand that by default client side Javascript code is inserted into the <head> section of the HTML of the page, and that's fine.

However, I have some complex functions which I want to re-use. I have tried putting these functions into the common Functions.js file. This works... but...

1) Is that the "correct" place to put common functions that I have written; and

2) If so, is there a feature in the IDE of CCS 4.3 that inserts functions into Functions.js, or should I just write them manually?

Many thanks,

Monu
View profile  Send private message
datadoit
Posted: 10/26/2011, 9:52 AM

Put your own functions into your own file and reference it when needed.
ie: MyFunctions.js
E43509

Posts: 283
Posted: 10/26/2011, 10:01 AM

Agree with datadoit.
I just add my .js files and include them
View profile  Send private message
monu

Posts: 8
Posted: 10/27/2011, 5:52 AM

Many thanks,

Monu
View profile  Send private message
monu

Posts: 8
Posted: 10/30/2011, 4:29 AM

One further question :)

Is there a way to enable my javascript file, e.g., myUtils.js, to show up in the IDE's project explorer?

Thanks,

Monu
View profile  Send private message
datadoit
Posted: 10/30/2011, 8:11 AM

Yes, from the Project Explorer choose the Files tab instead of the Pages
tab. There you can see any and all files for your project.

Now as a feature request, I would like to see something added to the IDE
that would look for files with similar page names residing under the
same folder path, but with different extensions automatically open up in
the IDE when choosing the .ccp page from the Pages tab in Project Explorer.

Example:
MyPage.ccp (the designer)
MyPage.html (the HTML)
MyPage.php (the code)
MyPage_Events.php (custom code)

All of the above open automatically already.

MyPage.ccs (my own custom styles for the page)
MyPage.js (my own custom javascript for the page)

If these exist, then open those automatically also.
monu

Posts: 8
Posted: 10/30/2011, 10:14 AM

Brilliant!

So easy when you know! O:)

Thanks,

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

Web Database

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.