Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. First of all: http://w3schools.invisionzone.com/index.php?showtopic=48287 As for the solution to your problem, there are many ways. One is to simply check if the scroll amount is greater than 200 rather than strictly equal. Another solution is to store the last value in a variable and if the current one is greater than 200 check that the last one was less than or equal to 200.
  2. Personally, I just check the reference of the language I'm programming with. It's not that hard. W3Schools isn't a programmers reference, it's a web developers' reference, web developers usually don't need to deal with more than two languages.
  3. So if A is Monday, next A would be next Sunday, then the following A would be on a Saturday?
  4. The only thing I can imagine causing that is the rectangle being too small. Make the rectangle large enugh. If that's not the problem, provide some code I can test myself.
  5. You can use Javascript or PHP to associate days of the week to letters: http://w3schools.com/jsref/jsref_getday.asp http://w3schools.com/php/func_date_idate.asp
  6. Ingolme

    CSS Sprites

    I've noticed that the repeat parameter actually has no effect and is irrelevant to the CSS sprite technique. Here's the W3Schools example working with repeating sprites: http://www.w3schools.com/css/tryit.asp?filename=trycss_sprites_hover_nav
  7. Have you tried waiting a few seconds after hovering over the image? As I mentioned before, the other image starts loading as soon as the mouse hovers over it. Also, look up CSS sprites.
  8. Theoretically, the DOCTYPE has absolutely no influence on how the page renders. Practically, a standard compliant doctype renders the page right, any other doctype renders the page wrong. I recommend to use the HTML 5 doctype. HTML and CSS do what you tell it to. If your page isn't looking the way you want it to, there's something in your CSS that is making it that way. So in order to solve your problem: What are you expecting to see and what is actually there? And what code is influencing that? It seems your :hover class is trying to load an image. Until the browser has loaded the image it won't show up on the page. If you hover over the item long enough the image will appear. A way to ensure that images are always loaded is to use a technique called "CSS sprites" (look it up in a search engine)
  9. Please don't post the same thread in multiple forums. I left thias thread open: http://w3schools.invisionzone.com/index.php?showtopic=48550
  10. Please don't post the same thread over multiple forums.
  11. You created an element in the array called "services" and then you keep on overwriting it in each iteration of the loop. You need to learn more about PHP arrays. The syntax provided by birbal works, but you didn't use it. $a = array();$a[] = "zero";$a[] = "one";$a[] = "two"; The output would be: Array ( [0] => "zero", [1] => "one", [2] => "two")
  12. You overwrote the array with something else. Typing $a = array() and then $a = 5 won't give you an array with "5" in it. It will just be "5". The assignment operator "=" overwrites anything that was previously in the variable.
  13. Your fillRect() function is creating a rectangle that's zero pixels tall, so you don't see the gradient. This will make the rectangle 200 x 200 pixels: ctx.fillRect(0,0,200,200);
  14. The reason passing a string as a parameter is bad is because the browser has to go through the Javascript parsing, compiling and executing phases again.
  15. Anchors should work regardless of which version of HTML you're using or which browser it's running on. I'd recommend putting the id on an element that actually means something, like an <h1> tag, or the <body> element if you want to jump to the top of the page. There's no point in adding an extra element to the document when so many others could use the ID attribute. I can't reproduce the problem you're describing. I've tested all the way down to Internet Explorer 7 and <article><a id="top"></a></article> doesn't prevent the hash from working.
  16. HTTPS: + User data can't be intercepted by wire tapping - Certificates cost money and need to be renewed occasionally if I'm remembering correctly - It's slow. HTTP: - Data can be intercepted by wire tapping + Faster + Cheaper You absolutely have to use HTTPS when dealing with credit cards, bank details and probably any important information such as social service numbers and street addresses. If you don't you're putting all your users at risk.
  17. It's probably a case of collapsing margins and something you overlooked that's different on one page than another. Be sure to set margins and padding of the html and body elements to 0.
  18. OK, this seems to be a problem with your indentation, the code actually is inside the function. You should properly indent your code to make it easier to understand and solve problems. Anyways, the only logical answer is that $_SESSION['un'] and $_SESSION['pw'] are not set. You should look for the place where $_SESSION['loggedIn'] was given a value and make sure that the other two get set there as well. Be sure to close your browser so that the session is destroyed before testing again. You might just be having a session that was improperly set earlier.
  19. There is no secure way to do it. If you wanted to SHA-512 encrypt the password that would mean you have to first decrypt them from MD5 which isn't possible. An insecure solution would be to SHA-512 encrypt the MD5 passwords and then MD5 all new passwords first before encrypting them, but that would be equally as insecure as MD5 because the number of possible different combinations is the same, so you might as well not SHA-512 them at all. The best thing to do would be to set all your users to password recovery mode in the database and then ask them to create a new one to continue using the site. I know this happened to one site I was on a few years ago.
  20. That means that $_SESSION['un'] and $_SESSION['pw'] are not set. You probably set $_SESSION['loggedIn'] somewhere but didn't set the other values. This portion of code isn't inside a function, so I'm not sure what return is doing: session_start();if (isset($_SESSION['loggedIn'])) {return dbContainsUser($_SESSION['un'], $_SESSION['pw']);}} Since the code isn't inside a function that also means it's going to execute immediately.
  21. You forgot to surround the parameters with quotation marks. This seems to work for me in Firefox: function openWin(){myWindow=window.open('','','fullscreen=1,channelmode=1');myWindow.document.write("<p>This is 'myWindow'</p>");myWindow.focus();} I haven't tested all browsers, so I'm not completely sure how much control other browsers might give to developers.
  22. It allows custom attributes pass the validator in HTML 5. It's part of the specification.
  23. At the very bottom of the W3Schools reference page, along with some other links, is a "REPORT ERROR" link. If you click on that you will be able to report it right to the W3Schools owners.
  24. Due to security limitations, Javascript is not capable of retrieving any information from within an iframe that loads data from another domain.
  25. Ingolme

    Help Please..!

    I wouldn't recommend it. Can you go deeper into the reasons behind this? There probably is a better solution than what you're trying to do.
×
×
  • Create New...