Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. The iframe's style won't apply to what's inside it. The content inside must be written in HTML and have its own styles. There is no good reason to put an image inside an iframe.
  2. Ingolme

    Loop While

    Read the Javascript tutorial.
  3. It sounds like list[0] doesn't have anything in it. What does list.length say?
  4. They have two different purposes. The title attribute shows a tooltip, the alt tag provides a text description of an image just in case it didn't load.
  5. The alt attribute is alternate text used for images if they couldn't load. Perhaps you wanted a tooltip to appear next to the mouse when on the element, that would be the title attribute.
  6. When you call fetch_array() you're moving the pointer ahead. If you use fetch_array() again the pointer will not be in the first position. You can fix that by setting the pointer to 0 using mysqli_data_seek()
  7. Ingolme

    Help!

    It's not part of the language, it just indicates that the else part is optional.
  8. Ingolme

    strtolower

    $fileParts is a string, so if you put [0] on it you'll only get the first letter of the string when passing it to strtolower()
  9. No, this isn't Java, but it seems like this code is supposed to work with a particular framwork.
  10. You can use cURL to send HTTP requests to other websites with PHP. You can look at the functions and check the examples provided in the manual.
  11. Ingolme

    type_unknow

    Your logic is wrong. The variable is always either not "a" or not "c". If it's "a" then it's not "c", if it's "c" then it's not "a", if it's neither "c" nor "a" then that statement is true as well. Use && instead of ||
  12. That's not going to work with properties that have values such as "", 0 or false
  13. The website works properly for me. The code is really, really old so some browsers might not render it exactly the way it should look, but it still should load.
  14. The asterisk isn't necessary. :focus will target all elements that are focused. The same as you don't need *.classname to point to all elements of a particular class.
  15. Ingolme

    Help!

    The assignment operator is represented as a left arrow in some languages. It means that the element on the right is assigned to the variable on the left. In your example, the value of y is assigned to the variable x.
  16. Ingolme

    Help!

    That would probably be because value_1, value_2 and value_n are undefined variables.
  17. No, you have to use the class attribute to give a "name" to an element.
  18. Giving the <td> elements a class and using an external stylesheet works well. The CSS rule for background color is background-color, not bgcolor.
  19. The problem seems to be that once it has faded out, the element disappears and the mouseout event is called. You probably should put the mouseout event on the other element.
  20. Unfortunately, my local network is having trouble with some internet resources and I can't see the images in your first post. In response to your second post... The people who manage the W3Schools website never visit the forums. When they update the website we are not notified of it. There are no contradictions, everything can be treated as an object in Javascript, even Strings and Numbers. Take this example for numbers: http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_valueof_num And this example for strings: http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_charat Variables are more complicated behind Javascript than what it appears to be in Javascript. A variable contains data, the amount of data that the variable contains depends on the type that the variable has. Some data types are not contained in the variable, but are referenced. That means that the variable is pointing to (or "referencing") another place that has data. Numbers and Booleans are contained inside the variable, but Strings, Arrays and Objects are not inside the variable. Javascript pretends that strings are inside the variable to make things easier.
  21. It works because the function has access to the global scope, it's complicated to explain scope and you still don't understand enough about functions yet. If you think you're capable, you can read about scope here: http://javascriptplayground.com/blog/2012/04/javascript-variable-scope-this/
  22. If you understood the definition properly you would have no problem distinguishing a recursive function from a non-recursive one. You don't actually understand the definition. Here's an example of a recursive function that doesn't have the name inside it: function factorial(n) { if(n == 0 || n == 1) { return 1; } else { return n * other(n - 1); }}var other = factorial;alert( factorial(10) ); You need to read about functions again. Read about them in the W3schools tutorial: Functions I and Functions II Read carefully.
  23. CSS doesn't have any functionality like that. I would recommend using only the basic color names and use color codes for everything else. I don't trust that color names like "Aquamarine" or "LawnGreen" will always work. Standard color names according to W3Schools. aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, orange, purple, red, silver, teal, white, and yellow.
  24. Ingolme

    Some one help

    If you don't want "garbage code" you have to make it yourself.
  25. How to distinguish a recursive function from a non-recursive one? This: function factorial(n){ if ((n == 0) || (n == 1)) return 1; else return (n * factorial(n - 1));} Notice that factorial is the name of the function, but inside the function factorial is used.
×
×
  • Create New...