Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. If it's a known range, then you can just use the BETWEEN operator WHERE id BETWEEN 1 AND 75 If it's a known list of values, then you can use the IN operator WHERE id IN (1, 2, 3, 4, 8, 12, 75)
  2. It sounds like show = 1 and deleted = 0 are always a requirement, so you would use an AND operator for them while the id is capable of changing. If I understood your requirements, this is the logic you're looking for: show = 1 AND deleted = 0 AND ( id = 1 OR id = 2 )
  3. If you're testing to see if Javascript works, don't use jQuery. Test the alert on its own: <script type="text/javascript"> alert(1); </script> There's no way that can't work, which makes me believe jQuery's probably not being included properly.
  4. The <?= ?> syntax is deprecated and may not work on all PHP servers. Use the correct expression <?php echo ?> If you want to use a variable in the index of an array, just concatenate it. The index of an associative array is a string. Like this: $id = 5;echo !empty($_POST['style_' . $id]) ? ' checked' : '';
  5. What does your code look like?
  6. Please keep your question to one thread. It's already being discussed here: http://w3schools.invisionzone.com/index.php?showtopic=53997
  7. There is no HTML element for that, but it can be replicated with a Javascript program.
  8. This is probably the problem: document.getElementById("wood").innterHTML = wood;
  9. GeShi works, but you'll have to read their documentation to be able to properly use it. It looks like you have a syntax error, that's not a problem with GeShi, that means that there is invalid PHP on your page. I haven't seen your PHP code so I don't know how to fix it.
  10. If you want it to automatically be scrolled to the bottom at the beginning you will need to use Javascript. CSS can't control the position of the scroll bar.
  11. I don't understand your request. Is the W3Schools.com Javascript tutorial not helpful enough? If so, there are many other websites you can learn from.
  12. The width and height attributes only accept numbers. If you pass that through the HTML validator it will tell you it's not valid because "px" is not a number. Since you don't have access to a stylesheet you'll have to add the CSS in the style attribute. This should work: <img src="/img/vakantiereizen-banner.png" style="margin:0px auto; display:block; width:728px; max-width:100%; height: auto;"> I'll break it down for you: display: block makes the image force other elements below and above it rather than next to it. This completely remove the need to wrap it in a <p> tag or some other block element margin: 0px auto; forces the element to have an equal margin on both sides, making it centered as a result. width: 728px; makes the image 728px wide as long as it does not exceed the maximum allowed width. height: auto; makes the image keep its aspect ratio. max-width: 100%; forces the image to be no larger than the full width of the parent element that contains it.
  13. The size of the paper is not the same as your browser window. If the website is responsive it should adapt to the page properly. Having fixed widths is going to cause problems when the viewport isn't wide enough, such as when printing. You need to use percentage widths and margins instead of pixels.
  14. I don't think there is a need to support Internet Explorer 7. Even people who are still on Windows XP have Internet Explorer 8 from windows updates. For Internet Explorer 8 I haven't needed a separate stylesheet. If you use the HTML5 shiv, Internet Explorer 8 should behave practically the same as modern browsers as far as general CSS is concerned. You won't have access to HTML 5 features and APIs, but the appearance of the website should be almost the same. You'll have to live without rounded corners and stuff, but the important thing it that the users can still navigate and use your page without trouble.
  15. Ouch, this is a bad memory leak. Each time you call this script you're creating another copy of the same sound file in memory. I guess it works as a quick fix, but you should really learn Javascript for client-side programming. Have you tested your program in Firefox or Google Chrome?
  16. Have you read their documentation?
  17. HTML 5 semantic elements work in Internet Explorer 8 as long as you include an HTML 5 shiv, which essentially called document.createElement() to get it to recognize the new elements. inline-block works in Internet Explorer 8 as far as I can remember. In even older versions if IE you can get inline-block to work if you apply it to elements that were inline to start with. By a lucky coincidence, Internet Explorer 8 will render all HTML 5 elements as inline by default, which means you can set inline-block to <section>, <article>, <figure>, <aside> and all the rest without any trouble. As for HTML 5 functional elements such as <canvas> and <audio>, that won't work in old versions of Internet Explorer, but if it's just about CSS and semantic elements, there is absolutely no problem for Internet Explorer 8.
  18. HTML doesn't do that, only Javascript can. If you want to repeat HTML, there are ways to do it using a server-side programming language and including separate files.
  19. You need a server-side programming language to send the data to. Either that, or record it in Javascript's local storage.
  20. With a function you can run a particular set of code multiple times, even giving it different values. You probably should read to the Javascript tutorial again, functions are one of the most fundamental aspects of programming.
  21. The only one you need is IE=Edge and it's just so that older versions of IE will behave more consistently with modern standards. Other browsers don't need this meta tag at all.
  22. Make sure that the file is saved with a UTF-8 encoding. The option should be in your text editor.
  23. Do you know Javascript? If not, you can learn in the W3Schools Javascript tutorial.
  24. SQL on its own won't do anything for you. You need to learn a real programming language to make use of SQL.
  25. Serverside languages can't play sounds on the client side. You should use Javascript. In Javascript you would play a sound like this: var sound = new Audio("mp3/Ship_Brass_Bell.wav");sound.play();
×
×
  • Create New...