Jump to content

davej

Moderator
  • Posts

    3,988
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by davej

  1. davej

    images

    No, he's taking about using local files on his own computer. If you create a folder on your desktop and you put the image file and the html file in that same folder then it should find the image. If you want to actually use IIS then you can't put the folder on your desktop. You will need to find and use your inetpub\wwwroot folder.
  2. No, the control panel is how you will access your web-hosting service. Before choosing a web-hosting service you can look for web-hosting reviews such as... http://www.pcmag.com/article2/0%2c2817%2c2427219%2c00.asp You can practice building your website on your desktop using a simple text editor such as Notepad or Wordpad or download a free text editor such as... https://notepad-plus-plus.org/
  3. For the inline Javascript approach you need to actually use the keyword 'event' as the parameter. See... http://www.w3schools.com/jsref/tryit.asp?filename=try_dom_event_currenttarget Also you should be using the browser console to see Javascript errors.
  4. Normally you buy a domain name and also buy web-hosting. The web-host-service provides a shared server where you can actually build your website. The domain name merely points to your website. The only thing you need to learn immediately is how to use the control panel for your web-hosting-service, and start learning HTML and CSS. http://www.w3schools.com/
  5. davej

    CSS Adjustments

    Oh yeah, fix the validation errors... https://validator.w3.org/nu/?doc=http%3A%2F%2Fbushveldenergy.com%2F
  6. davej

    CSS Adjustments

    Try styling the div#aboutus or the div.moduletable areas?
  7. There is no way to save dynamic data on a server without using server-side languages, however it remains a question whether you need to write this code yourself or whether you can use code written by others, such as using a CMS like WordPress. If you write your own code you need to be aware that great care is required to avoid security vulnerabilities. See... https://www.owasp.org/index.php/PHP_Security_Cheat_Sheet
  8. Actually w3schools.in is unaffiliated with w3schools.com (at least AFAIK) The question you are asking is related to polymorphism. A subclass can be declared as a superclass, as in the following... Bicycle bike01 = new Bicycle(20, 10, 1); Bicycle bike02 = new MountainBike(20, 10, 5, "Dual"); Bicycle bike03 = new RoadBike(40, 20, 8, 23); Assuming the MountainBike and RoadBike classes both extend (inherit) the Bicycle class. See... https://docs.oracle.com/javase/tutorial/java/IandI/polymorphism.html
  9. I'm not sure what you are trying to do but you should probably read some online tutorials on inheritance, upcasting, downcasting, and polymorphism.
  10. Null is commonly used to indicate that a variable or object is invalid, so it is not a bug, but it may indeed indicate that your code isn't working.
  11. If that was lesson 1 then lesson 2 should be to avoid using document.write(). Instead learn to use innerHTML. <!DOCTYPE html> <head> <meta charset="utf-8"> <title>title</title> </head> <body> hello all <div id="div1"> </div> <script> var str = ''; var ele = document.getElementById('div1'); str += (5+7); str += (4); ele.innerHTML = str; </script> </body> </html>
  12. I have some difficulty understanding what you are really asking for. Do you merely want to move the "X" around inside the table? Or are you expanding the number of table-cells with each click? If you are merely moving the "X" around then there is no reason to re-create the table. And why must this involve recursion?
  13. Do you ever see the same symptom when you run the examples? http://www.w3schools.com/w3css/w3data_includes.asp
  14. Where is actual code?
  15. I can only see your rendered html when I view source here... and that rendered html begins around line 309... http://wetheresidents.com/component/users/?view=registration ...however I don't exactly know what the actual server-code looks like. It might be different.
  16. You have this... <div class="controls"> <fieldset id="jform_profile_tos" class="required radio" required aria-required="true"> <input type="radio" id="jform_profile_tos0" name="jform[profile][tos]" value="1" required aria-required="true" /> <label for="jform_profile_tos0">Agree</label> <input type="radio" id="jform_profile_tos1" name="jform[profile][tos]" value="0" checked="checked" required aria-required="true" /> <label for="jform_profile_tos1" >No</label> </fieldset> </div> ...what happens if you replace it with... <div class="controls"> <input type="checkbox" id="jform_profile_tos0" name="jform[profile][tos]" value="1"/> <label for="jform_profile_tos0">I Agree</label> </div>
  17. Where? At the bottom of the "Terms of service" popup modal? Or in the place of the Agree/No radio buttons?
  18. A checkbox is an actual element. A bullet isn't. http://www.w3schools.com/html/tryit.asp?filename=tryhtml_input_checkbox
  19. If I was sorting a deck of cards or something like that I would never use this approach -- so what is the interest or usefulness?
  20. It seems that you are complaining that Math.random() is not truly random. I'm sure it isn't. The distribution does look fairly flat... The flatness can be examined with a simple test program... <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Math.Random()</title> </head> <body> <p>Math.random</p> <div id="out"></div> <script> 'use strict'; var a = []; for (var i=0 ; i<100 ; i++){ a[i] = 0; } for (var i=0 ; i<1000000 ; i++){ var x = Math.random(); var n = Math.floor(x*100.0); //alert(n); a[n]++; } var str = ""; for (var i=0 ; i<100 ; i++){ str += i + " : " + a[i] + "<br/>"; } document.getElementById("out").innerHTML = str; </script> </body> </html> However it certainly is NOT considered random enough for cryptography. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random
  21. You might ask or search for answers here... https://validator.w3.org/feedback.html For this situation they seem to suggest installing a local copy of the validator... https://validator.w3.org/nu/about.html
  22. You could duplicate one of the divs and then hide it.
  23. Looks rather silly to me. What are you actually trying to accomplish?
×
×
  • Create New...