Jump to content

Ingolme

Moderator
  • Posts

    14,897
  • Joined

  • Last visited

  • Days Won

    176

Everything posted by Ingolme

  1. No, mod-rewrite is just to make URLs look pretty.
  2. Not a background image anyways. You can always use an <img> element with 100% width and, if necessary, 100% height as well. Fixed position, negative z-index.
  3. AJAX would work. I suggest having a "pop out" feature which moves the chat to a separate window.
  4. I read this and knew that the code would be pretty bad:
  5. Onsubmit is the only way to ensure that the form sending is cancelled. Usually it's not an attribute, but set on the form using Javascript.
  6. Instead of isset() use empty(). $code is always set.
  7. No, there's no name attribute on the <form> element. That's a bad practise that originated in the 90s. It has nothing to do with PHP, it was used in Javascript.
  8. Just document.getElementById(). You don't need the forms[0] part, and the ID should be the ID of the specific input you want focused. document.getElementById("title").focus();
  9. Ingolme

    Format Number

    What's wrong with number_format()?
  10. That means that your server isn't executing the PHP and is sending it to the client as text.Does the file have a .php extension?
  11. Internet Explorer 8 and under need HTML 5 elements to be created with Javascript before they can be used. You need a script at the beginning of the page creating an instance of all the elements you're going to use on the page: document.createElement("header");document.createElement("article");document.createElement("footer"); There are some scripts available online that have all the HTML 5 elements already declared for you.
  12. You can use getTimeZoneOffset() to figure out which time zone the user's computer is currently in, then add or subtract from the timestamp to show the time for a particular time zone.
  13. You can use CSS position: fixed to always have the button in the same position of the window no matter if you scroll.
  14. If you give an id attribute to the body, a simple link can bring you to the top of the page. <body id="top"> <a href="#top">Back to top</a>
  15. Have you tried a search engine? If I was going to answer you that's exactly what I would do.
  16. Possibly the onchange event, but if this is autocomplete I'm not sure if there's a standard for it.Normally, for text inputs, the onchange event only fires the moment the field loses focus. The only way I know to test events is to actually put multiple event handlers on the element and check which ones are fired.
  17. It can hardly get simpler than what's on W3Schools. If you can't learn with that I guess your only option is to find a Javascript course so that a teacher can explain things to you.
  18. One page is being interpretted as ISO-8859-1. Try sending a header with PHP Content-type: text/html; charset=UTF-8Browsers sometimes ignore <meta> tags.
  19. It depends on the quality of your web host and the internet connection on the client side.
  20. That selector will apply the style to any element called <list-nav>. Maybe you wanted a class selector or an ID selector.
  21. The second parameter of strtotime() has to be a date in UNIX timestamp format. You can't pass a string and expect it to understand it.
  22. There's absolutely no way you can get a menu like that to work and have the URL of the page change. It's also impossible to use for text-to-speech browsers and search engines.
  23. Alt tag?Can you explain what you think an "alt tag" does? I'm not sure what kind of functionality you're trying to implement. The <img> element has an alt attribute which will show alternative text if the image failed to load.
  24. You only need this; var timer; // Make timer global setTimer() isn't a function.
  25. Using an <iframe> like that is a bad practise. I'd suggest, if you don't have a server-side language, to make multiple HTML pages with the header, menu and other things identical and then just link to those.
×
×
  • Create New...