Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. It means that there is no element in x which has index m. You should debug the code and see which value m has when that function is called. Most likely your loop is going 1 less than the smallest index or 1 more than the largest index. It probably is better if you initialize i as 0 and put the increment operation after the rest of the code in the loop has executed. Another issue in your code is that you're calling hide(i) instantly and passing its return value to setTimeout().
  2. It certainly seems to be broken. There's no real way to get in contact with the staff except by using the "Report Error" link at the bottom of the tutorial pages.
  3. You can add some CSS to hide the element when printing using a media query: https://www.w3schools.com/cssref/tryit.asp?filename=trycss3_media
  4. Because PHP runs on the server-side, allowing arbitrary users to run any PHP on their server would make it very easy for hackers to take over the website. I would suggest downloading a local server such as XAMPP to run PHP on your own computer.
  5. Unfortunately, the staff rarely visits the forums. As far as taking length calls out of the loop, it's a negligible performance impact in 99% of situations. If you were writing a heavy time-critical application this would be one of the optimizations you could do to improve it if you find that it's running slow.
  6. Begin writing software, if you run into a problem you can't solve then search online for an answer or ask about it.
  7. It's not the object that's the problem, it's JSON.stringify().
  8. The <pre> element by default allows text to overflow. You should use an element other than <pre>. If you still want a <pre> element there, you can override its behavior with CSS using "white-space: normal;"
  9. Ingolme

    Kaso

    No, void is a completely useless Javascript construct.
  10. It's a "feature" built into iPhone browsers. If you make sure that the font size of the text inside your inputs is at least 16px then iPhone won't try to zoom in to see it.
  11. Yes. Use CSS to set the border width to 0 or the border style to "none"
  12. The mysql_ library is deprecated, you should be using something else like PDO. I can't tell what the problem is without seeing all of the code. Can you write a very basic program to test it and put the code here? Please use the code block ( <> button) to keep it organized.
  13. You should use single-quotes in the exec() command, otherwise it thinks that $USER is a PHP variable. I would expect the above code to throw an error similar to "Undefined variable $USER".
  14. "Affected rows" usually only counts the number of rows that were modified or deleted. If you want to count the number of rows that were selected, you can either loop through the rows you received and count them or or use a SELECT COUNT(*) query.
  15. I don't know how this "owl" plugin works, you should check their documentation. Open the Javascript console in your browser to check for errors as well.
  16. Confirm is a function, so call it with parentheses: return confirm("Do you want to continue?"); I would recommend putting this code in an submit event of the form rather than the click event of a button, so that even if the user submits the form through other means (pressing Enter in the text field) the code will still run.
  17. UTF-8 is a good encoding, but your text editor should be using UTF-8 without BOM (Byte-Order Mark). The option to choose with or without a BOM should be available in your code editor.
  18. Looks like it's a byte-order mark. https://www.fileformat.info/info/unicode/char/feff/index.htm
  19. They're invisible, so you won't see them. They're visible in a different encoding, this is what I get when I change the invisible characters to ANSI encoding: These segments "" are visible representations of some UTF-8 characters which are in your code. Your code editor is probably putting them in there.
  20. contains() is a function which returns true if the element has the class and false if it does not. It is not a direct replacement for toggle(). You have to write code which will check if the class already exists, if it does then use remove(), if it does not then use add().
  21. No, background-image works fine and serves a slightly different purpose than background. What I am noticing in the code that you are pasting here is that there are a lot of invisible characters which are probably interfering with your CSS code. Which text editor are you using to write your code?
  22. I believe that the toggle() method of classList is not supported by Internet Explorer. You can work around that by testing classList.contains() and then using classList.add() or classList.remove() based on whether it already has the class or not.
  23. Open the developer tools in your browser to see what it going on. In most browsers you can open them by pressing F12. Note that the body is only as tall as the content within it, so you will only see the image behind the first line of text.
  24. The images folder is not a child of the CSS folder, this is why you have to climb out of the CSS folder to find it, by prepending "../" to the path. Assuming that you described your filesystem accurately, the path you are looking for can only be "../images/Art 1.jpg". There should not have to be any guesswork here, use the correct path and if that is not working then the issue is not with the path, it is elsewhere. Watch out that your text editor is not creating curly quotes instead of ordinary quotes. The quotes in your previous post would not work because they are curly quotes. This is what curly quotes look like ( ‘ ’ “ ”). The quotes you should be using look like this:( ' ' " "). For URLs, CSS accepts single-quotes, double-quotes or no quotes at all.
  25. The correct path would be: body { background-image: url ("../images/Art 1.jpg"); }
×
×
  • Create New...