Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. In Javascript you can use matches using $1, $2 ... txt.replace(/([abc])/g, "<b>$1</b>")
  2. I'm not sure what the problem is. Nothing is stopping you from having four <select> elements in the same form. You can add a fifth select element outside of the form (so that it doesn't get submitted to the server, unless that's what you want) in which you display the selected results of the other dropdown elements.
  3. Use the system to send a test e-mail to your own e-mail address. You should test both Outlook and Gmail because they each have their own spam detecting algorithm.
  4. Ingolme

    rexexp and objects

    You can learn about regular expressions at http://www.regular-expressions.info PHP's implementation can be found in the online manual: http://php.net/manual/en/reference.pcre.pattern.syntax.php You can also learn about objects in the official PHP manual: http://php.net/OOP
  5. I can't imagine any decent software old enough that it would need register_globals to work. The security risk is that the user can set the value of any variable on your script and make your program behave in an unexpected manner. This may be a problem depending on how the program is built.
  6. First, you turn on XAMPP. Find a folder in the xampp folder called htdocs and put your HTML file inside that folder. Then you can open your browser and find that file in the http://localhost/ domain.
  7. Your HTML is full of errors. You have unclosed elements and duplicate IDs. In order for Javascript to work properly you need to correct the errors. http://validator.w3.org/ In Javascript you can get a list of selected options by looking through all the option elements and choosing values from those that have a selected property that evaluates to true. You can use those values to populate a dropdown or other element.
  8. You have to deal with the response inside the onreadystatechange event handler. The variable response is local to that function and is not accessible from outside.
  9. Ingolme

    html

    In HTML 5 it's valid to omit the <head> if the <body> element is present. I believe it's also valid to omit the <body> if the <head> element is present. Even though those elements aren't present in your code, the browser implicitly adds them. In HTML 4.01 and in XHTML it's not valid to omit the <head> or <body> elements. Like davej said, browsers do their best to correct bad HTML, but that doesn't mean you shouldn't try to write good code.
  10. Ingolme

    HTML

    What happened there is that you have curly quotes instead or normal double-quotes. They're being interpreted as part of the filename. Notice the difference <a href=“Login.html”><a href="Login.html">
  11. You would need a server for that, yes. You would also need to learn PHP and SQL. HTML on its own won't do any of that.
  12. Ingolme

    HTML

    When you click on the link what happens and what URL shows up in the address bar? File names are usually case sensitive, so be sure that you have the uppercase and lowercase letters correct in the link.
  13. You just have to upload the HTML file to the server. It will work.
  14. Ingolme

    HTML

    What program are you using to edit the HTML?
  15. You should read the W3Schools tutorial: http://www.w3schools.com/php/php_mysql_connect.asp It does you no good to copy code without knowing what it does.
  16. Why are you using $this? It's a reserved variable for use within class methods.
  17. On this line you have an escaped double-quote: $clean = array("",'<','>','`',':',';','/','(',')','{','}','[',']'); If you need to put a backslash in a string you need to escape it with another backslash: $clean = array("",'<','>','`',':',';','/','(',')','{','}','[',']');
  18. The reason the console shows "undefined" is because the return value of document.write() is undefined. That's not an error message, it just means that document.write() doesn't return anything.
  19. CSS can't draw shapes. You don't need to use third party software if you're willing to learn programming. <canvas>, <video> and Javascript are all W3C standards.
  20. What is y / 2? Do you mean half of the viewport's height? On each game loop, test the position of the rectangle. If the rectangle's Y position is within the rage you're testing for, create another rectangle object with the size, position and other attribuets you want it to have Normally in a videogame you have a list of sprites (your "box" object could be considered a sprite). You can use an array for that. You can add sprites or remove sprites from that array. On each game cycle, the program would go through the list of sprites, update their attributes and then draw them one by one. You can use a for() loop to traverse the array.
  21. With the <canvas> element and some Javascript you can display data from a <video> element while also drawing shapes ontop of it. It's not simple, though. You'll need a part of the program that shows the video, a part of the program that stores data about the shape and a part of the program that draws the shape onto the canvas.
  22. You forgot to call the beginPath() method before drawing a new path. The program remembers all the path commands that you input and draws all of them every time you call the stroke() or fill() methods. In order to clear the memory of old paths you need to call beginPath() when starting to draw.
  23. They seem to have pretty good documentation here: http://www.codeigniter.com/user_guide/overview/getting_started.html
×
×
  • Create New...