davej

Moderator
  • Content count

    3,905
  • Joined

  • Last visited

  • Days Won

    84

davej last won the day on March 23

davej had the most liked content!

Community Reputation

239 Excellent

1 Follower

About davej

  • Rank
    davej
  • Birthday July 15

Contact Methods

  • MSN
    e-mail: davejonline@hotmail.com

Profile Information

  • Gender
  • Location
    STL
  • Interests
    Learning web development.
  1. There is always the simple nbsp character, but if you have no understanding of CSS then you should learn how to use that.
  2. The only consideration that the loop introduces is the need for a styling approach that will accept a varying number of these div blocks.
  3. This works in Php, but most programmers use various languages. For example in Javascript this same approach fails... <script> arrtest['letter1'] = 'a'; arrtest['letter2'] = 'b'; alert(arrtest['letter1']); </script>
  4. Initializing variables can prevent a program from crashing unexpectedly. Isn't that a good enough reason? Also Php is very, very forgiving (also known as "idiot-proof"). Why learn bad habits that are poor programming in other languages? Try your code in Javascript and you will see that it fails. In Javascript (and almost all languages) an array must be declared before use.
  5. .form-actions {width:200px; margin-left:auto; margin-right:auto; text-align:center;}
  6. Review available Php security suggestions such as... https://www.owasp.org/index.php/PHP_Security_Cheat_Sheet
  7. Most Javascript experts advise the total avoidance of eval(). In fact classic Javascript has so much baggage that books have been written just to tell you what features you should avoid using. http://archive.oreilly.com/pub/a/javascript/excerpts/javascript-good-parts/bad-parts.html
  8. Is this your code or just some code example that you copied from somewhere? I would suggest that you begin with a simpler example of using local storage. https://www.w3schools.com/html/html5_webstorage.asp
  9. Inheritance in most languages is when you have a Person class and also an Employee class. You can then have Employee inherit Person since every employee is also a person. Classic Javascript has a prototype scheme that is rather strange. You can google "Javascript inheritance" to find various discussions of both the classic Javascript and the new es6/es2015 approaches.
  10. For a responsive menu the normal need is for a vertical stacked menu such as... https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_topnav
  11. I don't see any inheritance in your code. And why would you want to delete a property anyway? myMother is a Person. That isn't inheritance. If you are learning Javascript as a newbie I would not worry about this topic yet, because it is a rather sticky issue, and Javascript is in the middle of an upgrade (es6) to a more standard way of handling inheritance.
  12. Yes, as John-Jack suggests you can learn to use AJAX, or you can redirect to a URL from Javascript similar to what you are doing now. It depends on whether you want to reload the page or not. I tend to use hidden forms for this sort of thing, but your GET approach is perfectly fine. See... https://www.w3schools.com/jsref/met_loc_assign.asp
  13. I'm glad I'm not working on the "bleeding edge" of things. All you can do is read the available MDN documentation and try different options.
  14. It's not exactly clear what you are asking but you could use some javascript with a confirm popup. The javascript would set values in a URL or hidden form and then submit it. https://www.w3schools.com/jsref/met_win_confirm.asp
  15. Your question is too vague. A "menu slide" could mean many different things.