Jump to content

Ingolme

Moderator
  • Posts

    14,897
  • Joined

  • Last visited

  • Days Won

    176

Everything posted by Ingolme

  1. Use a server-side language to load the page content rather than an iframe. Then you can use variables that are in the query string of the URL to load the pages.
  2. It could be anything. It doesn't necessarily have to be called "i". It's part of Javascript's for() loop and doesn't have anything to do with XML. Perhaps you're reading the XML DOM tutorial. The prerequisite to reading this tutorial is to have read the Javascript tutorial first. Read this page, don't just glance at it or you won't get what's going on: http://www.w3schools.com/js/js_loop_for.asp
  3. No, you're quoting the wrong person, I didn't do that. However, for a precise timer, I use Javascript's Date() object. Every language will have timing problems if you ask it to do too much between one function call and the next. Besides that, basically any language has OK timing.
  4. Table cells happen to work pretty badly with CSS. They don't like padding and margins and prefer the cellspacing and cellpadding attributes of the table they're in.
  5. An error margin isn't a computer error, it's just a probabilty that a value is different than expected and how far off from the expected value it will be. If you want setInterval() to make a function run every 1000 milliseconds and there's an error margin of 10 milliseconds then you can expect any amount of time between 1000 and 1010 to pass. Normally error margins are also negative (980 to 1010) but the computer's minimum amount of time will always be the amount of time you gave it.
  6. Animation can't be adjusted perfectly, but to start off, 2 milliseconds is really short, that means a framerate of 500 frames per second. Try a shorter framerate, for example 40 frames per second which is 25 milliseconds.Each time a function is called using setInterval, there's an error margin, the less times you call it the less the errors can add up.
  7. Normally, you start off having the HTML prepared to work on its own. Javascript will remove unnecessary HTML elements and manipulate the page to make it work in a more dynamic way.
  8. You should check the contentDocument property, it might be able to solve the problem.
  9. It's valid XHTML but that doesn't mean it's functional. Only CSS code can go in the style attribute. It's valid XHTML because the style attribute exists and it contains character data, but that doesn't mean that the CSS parser can make any sense of it. You need to use the <link> element to load external CSS files.
  10. You seem like you're describing the tooltip which shows up when you hover over an element. Adding a title attribute to the <a> element will give you a tooltip. <a href="url" title="tootip text">Text</a>
  11. First of all, give the iframe an ID attribute and use getElementById() to access it. While some browsers may set "target" to the iframe element, that's non-standard behavior.
  12. Well, anything's possible. You need to know PHP and Javascript to emulate most of the things on that page. I don't know which part of the page you're referring t since there don't appear to be any blog entries there.
  13. I don't usually reply to threads I have troble understanding. This is just a hobby of mine and I do have other things in my life to deal with. You say that a field should become visible when something is clicked on. That requires Javascript and you haven't shown any Javascript code. If I read correctly, you want to populate certain fields with a value, but I can't see the Javascript code that is supposed to do that either.
  14. You need to give a min-width property to those elements and give it a value equal or greater to the width of the content.
  15. There's a line break before your opening <?php tag. That counts as output.
  16. While I can program a system that counts a relative amount of time between a start and end point, I can't program a system that associates your timescale to real world dates because the systems aren't compatible. I can program a fictional "calendar" if you can tell me which exact date you consider to be the zero point in time. For the real date we have a UNIX timestamp that has a zero point in January 1st, 1970.
  17. You need to make the timer variable global. To do that, just make sure that var timer; is written in the global scope.
  18. You mean setTimeout(). The program is probably getting stuck at this line: clearTimeout(timer); "timer" is local to the function so it isn't set. The code will probably work if you remove that line.
  19. I can't see a settimer() function anywhere on your page.
  20. If there aren't any error messages and the directory isn't being created then it probably means that PHP's error messages aren't being displayed. Put this at the beginning of your page: ini_set('display_errors', 1);error_reporting(E_ALL); The code in the PHP manual works only when put in the right context.
  21. <p> elements are not allowed to be contained by other <p> elements. It's part of the HTML specification, so the browser interprets it as being one <p> element following the next.
  22. No error messages? All I can do is make guesses with the information you have provided. mkdir() won't work if you try to create multiple nested directories all at ones. You need to create them one by one.
  23. Just put a proper background color or backgrond image on the element. If you need multiple background images you'll have to use nested elements.
  24. Oh, well. It also can be done in other ways but it's not going to be well organized. To start off, I would take a base unit (milliseconds) and then put the relation between that and every other time unit: // Second is 200 millisecondsvar second = 200;// Minutes are 16 seconds, or 16*200 millisecondsvar minute = 3200;// Hours are 92 minutes long or 92 * 3200 millisecondsvar hour = 294400;// Days are 35 hours long or 35 * 294400 millisecondsvar day = 10304000; Now I've encountered a problem with your system: There's no relation between our real timescale and your timescale. If it's November 25th today and 365 days pass in your fictional time system it won't be November 25th in the real world, it would be some other date. Have you designed a solution for this problem?
  25. Ingolme

    HTML5 and IE8

    Javascript, Flash and odd CSS 2 techniques. It depends on which HTML 5 feature you're trying to replicate.
×
×
  • Create New...