Web Design Forum  

Go Back   Web Design Forum > Web Software > Scripts

Like Tree1Likes
  • 1 Post By ronaldroe

Reply
 
LinkBack Thread Tools Display Modes
Old 05-02-2012, 03:33 PM   #1
Platinum Member
 
CaldwellYSR's Avatar
 
Join Date: Jun 2011
Location: Riverton, WY
Posts: 658
Send a message via AIM to CaldwellYSR Send a message via Skype™ to CaldwellYSR
Default Structure in JavaScript coding

Im trying (again) to learn my way through JavaScript. The first time I tried I was quickly overwhelmed because I had barely learned HTML && CSS at that point. Now I feel more comfortable and want to give it another swing. In the downtime between then and now I have taken an introductory programming class at school that focused on Java programming. I picked up on it very quickly because of how strict the data types and the structure of java code is.

I know JavaScript and java are completely different but the flexibility of JavaScript is really bothering me and making it so hard to learn. So what's the best or most common way to structure JavaScript code? How can I set up classes and actionlisteners similar to Java? Is it even possible?
CaldwellYSR is offline   Reply With Quote
Old 05-03-2012, 12:15 AM   #2
Diamond Member
 
Phreaddee's Avatar
 
Join Date: Feb 2011
Location: Newcastle, Australia
Posts: 1,819
Default

http://www.ecma-international.org/pu...s/Ecma-262.htm
Phreaddee is offline   Reply With Quote
Old 05-04-2012, 08:49 PM   #3
Diamond Member
 
ronaldroe's Avatar
 
Join Date: Jan 2011
Location: Oklahoma City, OK
Posts: 1,015
Send a message via Skype™ to ronaldroe
Default

I have the same problem. The only way I've been able to actually work with JS at the level I need to was to look at it as "find this, do that". From there, it was really just syntax.
Phreaddee likes this.
ronaldroe is offline   Reply With Quote
Old 05-30-2012, 03:12 PM   #4
Diamond Member
 
chrishirst's Avatar
 
Join Date: May 2012
Location: Blackpool
Posts: 1,280
Default

Quote:
Originally Posted by CaldwellYSR View Post
I know JavaScript and java are completely different but the flexibility of JavaScript is really bothering me and making it so hard to learn. So what's the best or most common way to structure JavaScript code? How can I set up classes and actionlisteners similar to Java? Is it even possible?
In javascript they are known as event listeners

and class constructors are similar to C++ constructors
__________________
When the mind is enlightened, the spirit is free and the body matters not.
chrishirst is offline   Reply With Quote
Old 06-08-2012, 08:41 AM   #5
Gold Member
 
leroy30's Avatar
 
Join Date: Mar 2010
Location: Auckland, New Zealand
Posts: 456
Default

Look into jquery. Once you grasp it you'll find it really useful and save a lot of common javascript tasks, namely object selection.

Last edited by leroy30; 06-15-2012 at 11:39 PM.
leroy30 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:24 AM.


Camera Forum - Computer Forum - Web Design Forum

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.