Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. No, PHP and MySQL do not do that. The security of your code is completely in your hands.
  2. No, PHP and MySQL don't do anything unless you explicitly program them to, they have no native escaping of Javascript or HTML. BBCode refers to the language used on forums to add formatting to forum posts.
  3. You can have a double border of the same color by setting the border style to "double" but if you want multiple borders with different styles and colors you will need multiple nested elements, each with their own border.
  4. The editor will usually return HTML, but it might return BBcode. You can just store that in a text field in the database.
  5. That won't work. The options won't wrap, they'll just be cut off. Form elements are limited in how they can be styled. To my knowledge there's no way to force an option to wrap its text.
  6. They are wrong when they say it must be embedded in <script> tags. It also can be in an even attribute. But as a general rule, you use <script> tags for Javascript. I discourage the use of event attributes.
  7. As far as I know, browsers don't generally cache HTML pages unless you explicitly tell them to.
  8. You need to understand the theory, giving you code to copy and paste would hinder your ability to learn. Your code is starting degree at 360 and then adding 1 to it on every interval, so to count 270 degrees on top of that you would need to check for 360 + 270 degrees. When degree is equal to that amount, call clearInterval() to stop the animation
  9. You will have to bring that up to them. Perhaps you can leave a comment here: https://codecanyon.net/item/scs-web-security-ssl-alternative-more/13977657/comments They shouldn't be saying it's compatible with PHP 5.2 if it's not.
  10. Whitespace is usually removed on the server side. In PHP you can use the trim() function. In Javascript you can just add whitespace to your regular expression: /^\s* ... \s*$/i
  11. If you care about compatibility with older browsers, you can use Date() objects. It has millisecond precision, but you can benchmark code by running it thousands of times. var iterations = 100000; var start = (new Date()).getTime(); for(var i = 0; i < iterations; i++) { // Put code here for benchmarking } var end = (new Date()).getTime(); // Find out how long it took var elapsedTime = end - start; // Find out how much time passes for just one function call var averageTime = elapsedTime / iterations; // Output data console.log(averageTime);
  12. The software does not support PHP 5.2. It's more that just syntax errors, it's relying on features that are only available in newer versions of PHP, such as namespaces. That's such an outdated version of PHP that I'm amazed your web host is still using it, you should tell your web host to upgrade your version of PHP. PHP 5.3 was killed off two years ago, you shouldn't be using a version of PHP older than 5.4.
  13. These are the problem: i<=sVector.length i<=string.length There is no index equal to the length of the array or string. The last index is always one less than then length. Aside from that, this is doing the exact same assignment over and over when you only need to do it once. for (i=0;i<=sVector.length;i++) iR = sVector; This creates an array with a single element in it which is a reference to a function: var sVector = [string.split]; This is actually going to result in a single number rather than a string of numbers because you're doing a mathematical sum of the numbers. for (i=0;i<=string.length;i++){ iR += string.charCodeAt(i);
  14. That's not 13 and 19, that L3 and L9, meaning 3 columns on a large screen and 9 columns on a large screen, respectively.
  15. I don't fully understand your requirements. Is portrait supposed to look the same as landscape? Your media query only works for devices 650 pixels wide and smaller. If the device in landscape is larger than that then it's not going to work. It's doing exactly what you asked it to do.
  16. I don't think the orientation property is necessary. Yes, the first media query you showed should apply to a screen that's 680 pixels wide. Without actually seeing the page that's not behaving correctly it's hard to know why it's not working.
  17. Landscape on which device? In landscape the screen is wider, the resulting width may not match the media query you were expecting it to.
  18. That's right. I think it was a bad idea for them to put !important rules in their stylesheet to begin with.
  19. If the rule has important the only way to override it is with another important.
  20. You can change the file however you like.
  21. Bitwise operators do operations with the bits in binary numbers. All numbers have a binary representation. The AND operator only returns 1 only if both of the input bits are 1. The OR operator returns 1 if any of the input bits are 1. The NOT operator returns the opposite value of the input bit. The XOR operator returns 1 only if the two input bits are different from each other. The left shift and right shift operators move everything to the left or to the right by the specified number of positions. In the number 00011000, shifting left by 3 results in 11000000 while shifting right by 3 results in 00000011
  22. There's onkeyup and oninput for that kind of behavior
  23. First, you need to pass the actual input's value. You're passing the input element itself. This is what you should do: validate(this.value) You have to call the test() method if(regexp.test(x)) { This won't work: document.getElementById('Message').document.write("Vous devez suivre les instructions"); Elements don't have a document property, even if it did, document.write() deletes everything on the page before writing if it's called after the page has finished loading. What you can do is set the innerHTML property of the element: document.getElementById('Message').innerHTML = "Vous devez suivre les instructions";
  24. Ingolme

    Iframes

    I don't believe iframes are going to ever change their behavior, you have to specify a height. These are all the attributes permitted by the iframe element: https://developer.mozilla.org/en/docs/Web/HTML/Element/iframe If the page inside the iframe is on the same domain as the page that contains it then you can use Javascript to measure the height of the document inside the iframe.
×
×
  • Create New...