Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. Conditional comments are actually just comments. Normal browsers do absolutely nothing with them. They see it like this: Meanwhile, Internet Explorer will look at the comments and will decide whether or not to do something with them. Conditional comments only work in Internet Explorer and are designed to look like an HTML comment to other browsers. You can learn more about conditional comments at Microsoft's developer website: http://msdn.microsoft.com/en-us/library/ms537512%28vs.85%29.aspx
  2. Ingolme

    Math.pow

    I believe the problem arises because 0.33 is not exactly one third, so an imaginary component, a small one, probably exists.
  3. There are gaps between the <div> elements because the <p> elements have margins. You can either remove the margins from the <p> elements or add some padding to the top and bottom of the <div> elements.
  4. On the top right corner of the forum is a search bar. Your question isn't detailed enough, I'm not sure what "control" means. You can work with mouse states with just CSS, look at CSS sprites: http://w3schools.com/css/css_image_sprites.asp You can assign images for the :hover and :active states.
  5. The first one would be like this: Starts with one letter or number, then followed by 3 to 14 other characters /[a-zA-Z0-9][a-zA-Z0-9-._]{3,14}/ For the second one, the way you have it is probably the best way. I wouldn't restrict the user's password like this, though: /^[A-Za-z0-9-_.]/.test(inputToTest) Giving the user freedom to use any character is safer.
  6. I don't see how the scrollbar is interfering with anything.
  7. I believe textareas have a size limit in some browsers, possibly 65536 characters. It's not just the TryIt editor, but any <textarea> element on the internet. It might be best if you built an application with PHP or some other server-side language that reads XML files and outputs the data in the format you need it. Another option is XSL stylesheets.
  8. How does Internet Explorer's bar interfere? If your page is fluid a tiny bit less space on the side wouldn't change much. Maybe a screenshot or an onlin example could help explain the problem.
  9. Overflow: hidden is the way it's done. The only other way to prevent scroll bars is to make sure your content isn't too long. Why isn't the overflow property an option? There are many ways to do it: In the stylesheet: body { overflow: hidden; } In the HTML document: <style type="text/css">body { overflow: hidden; }</style> On the element itself: <body style="overflow: hidden;"> Using Javascript: <script>document.body.style.overflow = "hidden";</script>
  10. I would have PHP decide what to do depending on if the checkbox was checked: <?phpif(empty($_POST['check'])) { // Do one action} else { // Do another action.}?>
  11. I haven't worked that much with flash, but shared objects are practically the same thing as cookies, but I believe that the data types are stored as well as the values. Cookies only store strings. Most browsers don't manage flash shared objects, so deleting cookies won't delete the shared object. The only site I've verified uses shared objects is this one: http://microsite.nintendo-europe.com/Zelda-TwilightPrincess/enGB/ Probably many websites do, but I'm never really looking for it.
  12. My experiments haven't given any rounding errors up to now. Perhaps there might be if you using a floating point number as the argument., like 0.1 or 0.01.
  13. It's a division, which I explained in a previous post. If you understand the properties of the logarithm you can obtain this expression. ln(10^N) = N*ln(10) therefore: ln(10^N) / ln(10) = N * ln(10)/ln(10) = N
  14. The functions I just gave you solve those equations. function log10(n) { return Math.log(n)/Math.LN10; //Math.LN10 is the logarithm of 10.}alert(log10(104)); // Outputs 2.0170333392987803
  15. Ingolme

    NaN

    It seems you've overwritten c here: var c=document.getElementById("gets");var c=prompt("put value of c"); So c.value doesn't exist.
  16. Ingolme

    NaN

    Yes, that line of code should work properly. It concatenates some values and then assigns it to the value of an input.
  17. If I remember correctly, you can get the base 10 logarithm out of the natural logarithm by dividing by the logarithm of the base: function log10(n) { return Math.log(n)/Math.LN10; //Math.LN10 is the logarithm of 10.} You can also generalize the function: function log(n,base) { return Math.log(n)/Math.log(base);}
  18. Ingolme

    NaN

    It might be because you're operating with strings. Try casting them to numbers: var a=prompt("put coeff of x^2");var b=prompt("put coeff of x");var c=prompt("put value of c");a = parseFloat(a); // Cast to numberb = parseFloat(; // Cast to numberc = parseFloat(c); // Cast to number
  19. Remove padding and margin from both the <body> element and the <html> element: html, body { margin: 0; padding: 0;}
  20. You can use PHP for that. This part of the W3Schools tutorial shows an example: http://w3schools.com/php/php_forms.asp
  21. It's a rare occurence, but I believe at times the forum posts a reply to the wrong topic.
  22. Ingolme

    backbone

    You need to figure out which line of your own code is making that happen. The debugger should allow you to see the call stack somehow when the error occurs. You used a feature of that library and passed it an undefined value somewhere.
  23. You can't remove that option, the same as you can't remove the "Save image as..." option on images.
  24. Servers normally will work fine without index.html on the URL. Just make sure not to put index.html on your links. If you want to actually redirect index.html to the same URL without "index.html" on it, look at .htaccess and mod_rewrite. If your server isn't apache or is configured in a different way, there might be other alternatives to htaccess but I haven't studied them.
×
×
  • Create New...