Jump to content

haku

Staff Alumni
  • Posts

    6,172
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by haku

  1. What are you trying to do?
  2. output = '$' + templateName + ';' + "\\\n";
  3. Please use code tags around your code. You can do this with the <> button in the editor.
  4. Then you are showing too much code. Scale it down to the relevant code for the problem you are facing.
  5. And how do you expect us to help you when you don't tell us what the error you are seeing is?
  6. I've just realized that your CheckDirectory() function is PHP, while the rest of your code is JavaScript. Sorry, I didn't catch this earlier. You cannot call PHP from JavaScript no matter which way you cut it. You will need to use AJAX for this. This means you will need to write a JavaScript that makes a call to your PHP script on the server, then does something with the output. You can look at jQuery's AJAX functions for an easy-ish way of doing AJAX. In the meantime, that's essentially the end of this thread, as writing AJAX is beyond the scope of what you can expect from a single thread. Good luck!
  7. Also you can just call me haku - I have not been knighted (yet).
  8. Please look at my previous code that does not use document.write(). Document.write() is outdated javascript and there is no reason to be using it. You should be using the format I showed.
  9. How are you determining that it's not working? first, ensure that your timeout is being called. Do the following: function init() { console.log("timeout called"); CheckDirectory(); t = setTimeout(init, 30000); } Then open a javascript console in whatever browser you are using, and ensure that "timeout called" is being printed to the browser every 30 seconds. That will tell you if the problem is in your timeouts, or in your other code. Or if it's something different altogether.
  10. Try the following. There is no need for a call to document.write(). function init() { CheckDirectory(); t = setTimeout(init, 30000); } Side note, exit() is not a JavaScript function.
  11. And you want us to guess what this error is? What do I get if I am able to guess correctly?
  12. Re-read my last post. Letter-by-letter.
  13. You cannot use the header() function after any output has been sent to the browser. You have sent some output to the browser in index.php on line 1 - likely some whitespace. Remove whatever it is you are sending to the browser and it should solve your problem.
  14. Please use code tags around your code. You can do this using the <> button in the editor.
  15. Please use code tags around your code. You can do this using the <> button in the editor.
  16. $headers = "From: $email" . "\n" . "Reply-to: $email" . "\n" . 'X-Mailer: PHP/' . phpversion();
  17. To elaborate on that, %20 is used in URLs. I don't believe you will find that convention anywhere else (though someone feel free to step in and correct me if I'm wrong).
  18. Also, please wrap your code in code tags. You can do this using the <> button in the editor.
  19. If the mail() function is successful, it means that PHP has been able to pass the mail off to the mail server. This means that the problem isn't in your script, but rather in your server configuration. Does the 'from' address actually exist? If it doesn't, some hosts will block you from sending from that address (as you could be spamming from a non-existent address). Talk to your hosting company to see if they can help you debug the issue.
  20. Should we start making random guesses as to what that error may be?
  21. He did say "in case this is not made for a learning purpose". What's the error?
  22. Only use tables for tabular data. Do not use them for positioning. Only use Divs when there is not a more appropriate tag available. For example, if the contents are a paragraph, you should use a paragraph tag. If they are a list, you should use list tags. Do not keep it as a flat image. Do as much as possible with CSS, and keep the images to a minimum (they slow down page load times). Text should almost never be part of an image.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.