Moderators: Derry, Goldie, Harpo
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Honorary 'Aussie' Mechanic
Picture of postyr
Posted
In SS Pro, please get rid of the leading capital letters of objects, geometry, I-Frames etc.

I realize that there must be a very good reason for this, but for the life of me, I can’t understand what that is.

Maybe somebody can explain that for me.

The reason I mention this is that it becomes very frustrating when writing code.

Even after renaming an object, the new name is still preceded with an ‘O’ or whatever.

It becomes even more frustrating when working with form items.

If you rename a form to “myForm”, the ID has an ‘O’ placed in front (OmyForm) yet the name has no preceding letters, and is “myForm”

The same applies to the forms extra elements.

The code I am writing at the moment refers to 30 different elements on a page. Some text, some images, and some form items.

Once I get it right (very close), the page will need to be copied and repeated many many times. And then, I will have to adjust the object and name references every time. Probably not a real issue, as I will only need to change the ending numerals to affect the change.

However, it is still frustrating when writing the original code.

Cheers,
Terry
 
Posts: 1164 | Location: Australia | Registered: April 17, 2007Reply With QuoteEdit or Delete MessageReport This Post
Guru 'Geezer' Mechanic
Picture of larryd
Posted Hide Post
One of the problems of javascript is that variables can have a global scope. The same is true with HTML DOM id and class names. Capital letters preceding a name help to keep that name unique. You also need to remember that there is a difference between the id name and the value of the name attribute and that the two are not interchangeable. The addition of a preceding capital letter helps keep this straight.
 
Posts: 5140 | Registered: December 03, 2006Reply With QuoteEdit or Delete MessageReport This Post
Honorary 'Aussie' Mechanic
Picture of postyr
Posted Hide Post
Thanks for your reply Larry.

I think I understand.
 
Posts: 1164 | Location: Australia | Registered: April 17, 2007Reply With QuoteEdit or Delete MessageReport This Post
  Powered by Eve Community  
 


™ & © 1998 - 2008, Virtual Mechanics Inc. All rights reserved.