Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 3 of 3 FirstFirst 123
Results 31 to 38 of 38
  1. #31
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,677
    Thanks
    6
    Thanked 1,008 Times in 981 Posts
    Quote Originally Posted by edgethreesixty View Post
    He's asking for basic Javascript examples - you need to get off your high horse and just get the guy onto the right path for learning JS himself/herself and let them find out this information to themselves.
    Thatís true, and the discussion here arose about the question whether or not W3Schools is the right path and what actually is and isnít the right path. And Iím more on felgallís side here because why would you learn crap (even if it works) when you can learn good coding practices (even if itís a slightly steeper learning curve in the beginning). A few years ago it was easier to create table based website layouts (and from a visual way of thinking it still is). Would anyone here still recommend to do that to newbies and if no why not?

  2. #32
    New Coder
    Join Date
    Feb 2013
    Location
    Liverpool
    Posts
    70
    Thanks
    1
    Thanked 4 Times in 4 Posts
    So Im being moaned at for recommending he could do the same simple thing with javascript or jquery - then all of a sudden we abandon the idea of basic javascript to do more semantic and valid coding even though its more difficult to learn - hes a basic user wanting to know how to do basic javascript - let him read up on this if hes overly bothered about complying to the latest standards - theres a bit of a difference between letting someone create a website in tables and a proper way to do it compared to these minor differences between whether javascript works in netscape 4 or not - this is why web developers are stereotyped as annoying geeks who are unsociable and up their own arses - let him learn with basics before forcing a load of semantics down his throat - its javascript not a full blown 30k website that has to comply to every standard
    Working for Edge Three Sixty doing Drupal Development

  3. #33
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,677
    Thanks
    6
    Thanked 1,008 Times in 981 Posts
    That is not the point. Even basic JS can be good or bad. For example, rather than outputting a result with document.write() teach/learn it the right way with either innerHTML, or better yet by using DOM methods (appendChild etc.). This is not much more intricate, and it will prepare the newbie for the future and not make them have to un-learn the bad-but-simple examples. Clean and proper (and future proof) JavaScript is not rocket science.

  4. #34
    New Coder
    Join Date
    Feb 2013
    Location
    Liverpool
    Posts
    70
    Thanks
    1
    Thanked 4 Times in 4 Posts
    To any aspiring web developers out there who may come across this message board - don't be put off by people who read so much into standards and compliance that they can live their lives on forums causing unnecessary arguments - feel free to learn - make mistakes - don't be a perfectionist - it's still possible to earn a living by not being perfect

    Every web developer that I know personally (throughout numerous companies) would look at this forum and laugh at it for being so pedantic and petulant, infact - everyone whose seen it has
    Working for Edge Three Sixty doing Drupal Development

  5. #35
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,677
    Thanks
    6
    Thanked 1,008 Times in 981 Posts
    Is that how you react if you’re short of real arguments?

    Quote Originally Posted by edgethreesixty View Post
    […] it's still possible to earn a living by not being perfect
    Nobody has to be perfect but let me put it this way: Why do a bad job if you can do a good job? You don’t have to be perfect but the ambition is what matters. Why wouldn’t you want to strive for perfection (in the broadest sense, that is — especially if you just start to learn something from scratch or teaching someone who starts out)? What’s the point in doing your job if you don’t have the ambition to do it as good as possible? Nobody is telling anybody to not make mistakes. But don’t put those down that try to promote the striving for perfection.

  6. #36
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,640
    Thanks
    0
    Thanked 649 Times in 639 Posts
    Quote Originally Posted by edgethreesixty View Post
    He's asking for basic Javascript examples - you need to get off your high horse and just get the guy onto the right path for learning JS himself/herself and let them find out this information to themselves.
    Every single one of my posts contains a link to a series of over 400 introductory JavaScript tutorials in the signature and I have even included it in the text several times. http://javascriptexample.net

    As for alerts - here's what they look like in Opera



    and here's what they look like in Firefox and Chrome



    Do you really want your visitors selecting the disable option?

    The correct way to attach JavaScript into a web page and have it update the page is shown at http://javascriptexample.net/basics01.php with all of the hundreds of examples following that showing how to build on that starting point. Since innerHTML has been supported by all browsers any use for alert in beginner tutorials became unnecessary - hence the repurposing of the call for debugging only.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  7. #37
    New to the CF scene
    Join Date
    Apr 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    JavaScript code can be written under HTML coding using
    <script language="javascript">

  8. #38
    New Coder
    Join Date
    Feb 2013
    Location
    Liverpool
    Posts
    70
    Thanks
    1
    Thanked 4 Times in 4 Posts
    Seriously what the hell are those screenshots? If I want to check my JS is working I'll do a basic alert("hello") and it comes up in a dialogue box like it always has done - I'm not telling him to use it in his live code and saying he can use the most basic of examples by seeing his JS is having an effect when he loads the page.
    Working for Edge Three Sixty doing Drupal Development


 
Page 3 of 3 FirstFirst 123

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •