Jump to content


Photo

few questions on javascript


  • Please log in to reply
3 replies to this topic

#1 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 26 May 2006 - 01:40 PM

I am far from new at javascript, I have been working with it for 4 years on and off, but I have never stepped out of the lines of doing form validation, and small stuff like that, now I want to start creating full java script programs in my spare time, and either selling them, or renting them out, or keeping them for fun. I understand all the basic and intermediate concepts of javascript, and actually tried writing a few programs but didn't out of lack of inspiration. I had a few question about some things I wasn't sure of as pertaining to javascript.
1. Which is a better method Try Catch, or On Error.

2. Should I start utilizing try catch on all my scripts, if so how do I utilize it with if, else, and other like constructs.

3. What is the purpose of classes and what can they be used for, I have never used them, but I know the general format of setting them up and using, but don't see the point.

4. I want to create some javascript programs, where do I turn for inspiration, any ideas on possible programs, you get credit for the inspirational idea.

5. I have never had to use break so far, is it to get better timing during script execution. If so what do I need it for.

6. I also had one more question, say for instance I created a time and date function, and wanted to link them to something that states times and dates are based on your browser settings do I do it like this or another way.

All math functions
all date functions
var mydate = date functions
mytime = time functions you get the hint just showing you
document.write('<a href="mydate.htm">mydate</a>');
document.write('<a href="mytime.htm">mytime</a>');
The mydate mytime.htm are the pages that tell that the browser settings is what controls the time and date, would this work for accomplishing this task

7.I did a full math function doing
today = new Date();
document.write(today);
and it brough up the full time and date, and everything, but most tutorials use all the getTime, getFullYear, and getDate, why don't they just do what I showed above, is there other way better for some reason.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#2 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 29 May 2006 - 12:52 PM

bump

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#3 .josh

.josh
  • Staff Alumni
  • .josh
  • 14,871 posts

Posted 29 May 2006 - 10:46 PM

i'm just curious, you said you've been working with js for 4 years and you don't know the answers to these questions?? i've been working with js for all of a week now and i can answer a few of those questions already:

3. classes are for making objects. objects are convenient ways of... well i'm not going to sit here and explain what an object is and what it's good for. just look up the topic object oriented programming.

4. inspiration? umm.. everywhere? anytime you go to a website and you see some feature that you really like, maybe you could try to immulate it. anytime you go to a website and you see some feature that you could be way better, maybe you can try to make it better. maybe you're sitting on the toilet staring at the wall and some random thought pops in your head.

5. while i've never personally used break in js, if it's anything like any other language out there, it's used for breaking out of loops. most commonly it is used in switch statements.

6. i have no idea what you are even asking.

7. why don't you try reading a manual or two, or picking up a book, or even typing "javascript gettime" in google? All of them are similar in some ways, different in others.
Did I help you? Feeling generous? Buy me lunch! 
Please, take the time and do some research and find out how much it would have cost you to get your help from a decent paid-for source. A "roll-of-the-dice" freelancer will charge you $5-$15/hr. A decent entry level freelancer will charge you around $15-30/hr. A professional will charge you anywhere from $50-$100/hr. An agency will charge anywhere from $100-$250/hr. Think about all this when soliciting for help here. Think about how much money you are making from the work you are asking for help on. No, we do not expect you to pay for the help given here, but donating a few bucks is a fraction of the cost of what you would have paid, shows your appreciation, helps motivate people to keep offering help without the pricetag, and helps make this a higher quality free-help community :)

#4 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 29 May 2006 - 11:11 PM

thanks
I have been with javascript for awhile, but only studying, form validation, things like that no major applications.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users