Jump to content

Adam

Moderators
  • Posts

    5,717
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Adam

  1. Facebook displays a warning and provides an alternate site when you have JS disabled:
  2. I have run into a similar issue to this before, some kind of encoding issue or something. I never really got to the bottom of it. Just copy the contents of the file, delete it (on the server as well), and recreate it. Worked for me..
  3. You already have an onload event defined: onload="MM_preloadImages('../images/buttons/downloadNeg.png')" Move the function call into the anonymous function: window.onload = function() { MM_preloadImages('../images/buttons/downloadNeg.png'); timedHide(document.getElementById('message'), 10); }
  4. Is there always a ~20 hour leap? As AyKay47 says, we'll need to see the code.
  5. print '<span id="desired_id_here">Ok, I\'ll see what I can do.</span>';
  6. Remove the sub-queries. Checking for null values you should use "IS NULL": AND IS NULL entity_turned_prospect.id AND IS NULL entity_turned_customer.id
  7. LEFT JOIN entity_turned_prospect AS alias_name Or.. LEFT JOIN entity_turned_prospect alias_name "AS" is optional.
  8. Just add the script I posted in between the <head></head> tags, and change id_of_element to an ID attributed to the element you wish to hide.
  9. I would run the query through your DBMS with no WHERE condition, and then add them back in one at a time till you find the culprit.
  10. Did you also remove AS new? You can't set a single alias to every column.
  11. This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=343671.0
  12. You would need to use JavaScript to dynamically remove the element after a period of time: <script type="text/javascript"> window.onload = function() { timedHide(document.getElementById('id_of_element'), 10); } function timedHide(element, seconds) { if (element) { setTimeout(function() { element.style.display = 'none'; }, seconds*1000); } } </script> If you have already defined an onload event handler, you'll need to merge this with the existing one. Moving to JS forum by the way.
  13. You could always create a LinkedIn account and refer people to your profile for feedback from satisfied clients.
  14. A lot of languages have try..catch blocks, but the implementation can vary. With JavaScript for example, think of them more like PHP errors. You can't "throw" an exception in JS, but you can catch errors JS throws itself -- excluding syntax type errors of course. With PL/SQL (Oracle) there are set exceptions that you can catch within routines that are handed back to the application, for example "NO_DATA_FOUND" - ORA-01403, or you can define your own, but it's a very different definition/handling process than PHP. In your case there is no point in wrapping it within a try..catch block, unless you want to escalate the exception up to a parent catch block. If parse_ini_file threw exceptions on error, then it would also make sense to use one.
  15. Create a column that stores the datetime the user registered an account. As they create another, validate it's not within an hour based on when they registered the previous account. ---- Going back to my last post, that wouldn't solve the issue I wasn't thinking straight!
  16. If users can have multiple accounts under the same username, I would consider rethinking the schema to remove the duplication. This would then allow you to add the unique constraint and prevent any accidental resubmissions. Out of curiosity, are you able to reproduce the problem? If so how is it happening? I've never experienced this problem before. You have to consider the person who would try to manipulate the data; they're going to have a clue about what they're doing.
  17. Odd. Perhaps it's a permissions issue? Where are the files stored?
  18. As well as mikesta707's suggestion, you should force a redirect back to the same URL. This will effectively remove the previous POST request from the history, and replace it with the new one. It isn't any more secure at all, it's just hidden from sight. No user input should be considered "secure" until you secure it yourself. The reason POST is used instead of GET, is because that is what it was designed for. Look into the REST architecture.
  19. That's because a DOCTYPE tells the browser to follow standards. If it doesn't display correctly when you add one, your code is not compliant with standards. Leaving it till the end has made it more tedious to correct but it shouldn't be too difficult. As for disabling the right-click context menu, that's just an irritation for the user. I regularly use it for browsing, opening links in new tabs, searching highlighted text, etc. It would put me off returning to your site. I also agree with the usability comments doddsey_65 made about the search. If feels like you're trying to add in too much JavaScript in unnatural ways to be honest. There's a fine line between complimentary and over the top.
  20. Have you recently updated? Might just be a compatibility issue.
  21. Adam

    Help

    As WebStyles was saying, this code is full of errors. I would consider starting from scratch or paying somebody to fix it for you.
  22. Adam

    Help

    Actually, on first glance I didn't spot the else statement so I was talking crap. I think your best bet is to add in some echo statements through the code to try and find the point at which the script breaks. Also make sure that you're aren't hiding any errors by placing this at the top of your code: error_reporting(-1); ini_set('display_errors', 1); Be sure to remove it when you upload to your production server.
  23. Adam

    Help

    Is there any code before what you've posted? If not, the answer is simple: $jogofechado hasn't been defined.
  24. Have a look at the jQuery plug-in I linked to.
  25. All you need theoretically is a computer with a web server installed and an internet connection. How fast that can deliver the content, and how it would handle under load is where the hardware would make a difference. For a new server you can spend from a hundred or so pound through to a hundred thousand pound (and more). I don't know you, but I suspect you may not be able to afford the best there is. That's fine though, because you won't need it -- or should I say, at least not right now.
×
×
  • 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.