Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. I don't see the value written in text format when I test in Firefox. To change the color of the bar, change the background-color of the ::-moz-progress-bar and ::-webkit-progress-bar pseudo-elements.
  2. You could either use the size attribute on the <select> element: http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_select_size Or you can build it in Javascript.
  3. If you need somebody to write some code for you there's a list of people willing to do it for you here: http://www.peopleperhour.com/freelance/javascript If you'd like to try on your own and come across a roadblock I can help answer any specific Javascript questions you have.
  4. Just make a file, with extension ".css" and then write CSS code in it. Here's the tutorial page for it: http://www.w3schools.com/css/css_howto.asp
  5. The search engine does not care what top level domain you use for your website. Though it does care to a certain degree that the domain name is similar to the name of the website.
  6. What does the code that prints the table look like?
  7. I would put the ORDER BY clause outside of the sub-query. SELECT * FROM li_product_post AS aWHERE a.product_toko = ( SELECT t.product_toko FROM li_product_post AS t WHERE t.id_product_post = 14)ORDER BY a.id_product_post DESC
  8. Not necessarily. Put the scripts wherever you want to, it's not that big of a deal. This works: <script type= "text/javascript" src="http://code.jquery.com/jquery-2.1.4.min.js"></script><script type= "text/javascript" src= "./js/collabsible.js"></script><?php include ('./includes/footer.html'); ?>
  9. Users hate having videos play when the page loads. That's why you shouldn't have autoplay. Let the user choose when the video starts.
  10. If the footer.html file has a closing </body> tag in it, then you must put the scripts before that file is included. The script tags don't need to be exactly before the body tag, it just needs to be further down the page than all the elements it needs to access.
  11. Videos are very large files, they will take longer than simple text and images to load and there's nothing you can do about it. If you somehow managed to delay the rest of the page from showing before the video did then you have a high risk of making people leave your site.
  12. In the CREATE statement, add AUTO_INCREMENT=1 at the end of it. CREATE TABLE `table_name` ( fields)AUTO_INCREMENT=1 On a side note, since the field was an integer field, it shouldn't have been DEFAULT '1', but DEFAULT 1. Wrapping the number in quotes tells MySQL that it's text type data.
  13. A benchmark test is done by repeating the same operation over many times and counting how long it took. Here's an example: var i;var element;var start, end;// Test JS speedstart = (new Date()).getTime();for(i = 0; i < 1000000; i++) { element = document.getElementById("element");}end = (new Date()).getTime();var JStime = end - start;// Test jQuery speedstart = (new Date()).getTime();for(i = 0; i < 1000000; i++) { element = $("#element");}end = (new Date()).getTime();var jQueryTime = end - start;// Display resultsconsole.log("JS time: ", JStime);console.log("jQuery time: ", jQueryTime); Here are the results I got: JS time: 4 jQuery time: 961
  14. Ingolme

    error issue

    I linked to a particular comment on the page, not to the page itself.
  15. Ingolme

    error issue

    It's best if you use prepared statements, which completely remove the need to sanitize the data, as stated here: http://php.net/manual/en/mysqli.real-escape-string.php#102639 You can't use a string escape to sanitize numbers, for example.
  16. This works for me. Be sure to add a value attribute and a max attribute. <progress value="50" max="100"></progress> progress { background-color:#EFD259;}progress::-moz-progress-bar { background-color:#F00;}progress::-webkit-progress-bar { background-color:#F00;}
  17. Ingolme

    error issue

    You shouldn't have to escape quotes. Use the features built into the database library to handle sanitizing the data. What database library are you using?
  18. `id` is the same thing you had in your query. It's just the name of a field in the table. It's no different than DELETE FROM MyGuests WHERE apple IN (7, 11, 15, 17, 21)
  19. That's true but it's a really small demographic. Either way, it is a good idea to build the site in a way that it still is useful even without Javascript because many people have add-ons to disable Javascript. If your application cannot possibly be built in a way that would still do something without Javascript, then just show a warning to the people indicating that Javascript is required to view the page. There is no alternative browser scripting language to Javascript (Aside from the outdated VBscript used by old versions of IE). jQuery is just a program that was built on top of Javascript.
  20. Look for compatibility tables for the feature you're using. For example: http://caniuse.com/#search=localstorage
  21. The <script> tag has a defer attribute and an async attribute. They both do the same thing. The disadvantage with using that attribute is that you have no way to know in what order the scripts will be loaded. If your script relies on jQuery and you're using defer on the jQuery script, it might not be loaded by the time your script starts running. <!-- You can't be sure that jQuery will be available for your script in this example --><script src="jquery.min.js" defer></script><script src="main.js" defer></script>
  22. All browsers support Javascript. Javascript is a constantly changing language, so some new features are adopted sooner by some browsers than by others. You need to check whether the feature you want to use is supported by a browser or not. If the feature is not supported you need to find a workaround, or decide to not support that specific browser.
  23. Ingolme

    php

    I don't understand what you're trying to say. PHP is a programming language, not a "template". Just copying code from the tutorial is a good way to not learn. Doing experiments helps you understand how PHP works.
  24. On what line does that error appear?
×
×
  • Create New...