Script Includes - name must start with a capital letter?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2011 10:08 PM
Can someone please confrim or deny the fact that the name of a script include/GlideAjax must start with a capital letter?
I've been trying to get the below GlideAjax to work for a while now and just discovered this fact
//script include name = Asdf
var Asdf = Class.create();
Asdf.prototype = Object.extendsObject(AbstractAjaxProcessor, {
confirmOrgChanges: function() {
. . . .
//WORKS
//script include name = asdf
var asdf = Class.create();
asdf.prototype = Object.extendsObject(AbstractAjaxProcessor, {
confirmOrgChanges: function() {
. . . .
//DOES NOT WORK
This is really annoying. . . is there a reason for this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2011 07:41 AM
It is a common naming convention that a class starts with a capital letter. See all of the other examples in the OOB Script Includes as well as the HelloWorld example in the Wiki. This keeps a visual segregation from "normal" variables that should start with a lowercase letter.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2011 05:27 PM
AFAIK it's not a mandatory convention in javascript, perhaps mention of this requirement should be included on the GlideAjax and Script Includes wiki pages.
tony.fugere

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2011 06:42 PM
ninnesr
Precisely why I chose the word common, not mandatory... 🙂
ninnesr
I agree, send a PM to one of these three folks to request for Wiki enhancements:
wally.marx
joe.employee
guy.yedwab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2011 07:48 PM
tony.fugere
😄 Yup (I guess if I followed the norm, I wouldn't have encountered this problem :P) I was just highlighting the fact that SN has made it madatory.
Thanks for the names, I'll send off a PM