Jump to content

justsomeguy

Moderator
  • Posts

    31,575
  • Joined

  • Last visited

  • Days Won

    77

Everything posted by justsomeguy

  1. if(isNumeric(parseInt <= 10000)) { What exactly are you trying to do there? parseInt is a function, why are you trying to check if a function is less than or equal to 10000?
  2. I'm sure there is, you just need to build an object that describes everything and your browser needs to be able to load everything. First step is to use your developer tools to figure out what's going on.
  3. You can loop through the array, or you can use Array.join to combine them into one string.
  4. Well, if you don't have a web server then your options are limited. Different browsers might place different restrictions on you. How do you access that HTML file, do you just double-click on it to open it? What's the URL show? You might want to open your developer tools and refresh with the Network tab open to see what it's doing, if there are any error messages they'll be on the console tab.
  5. It will help if you answer questions that we ask. Are you looking at your browser's developer console? Do you see the error message?
  6. I don't think there's a single standard that everyone uses.
  7. Yeah, that's the only local variable that has been created by that line. You can check the global scope if you want, or you can make a watch expression to watch a specific variable or value, or in my browser if I hover over scrollTop it shows a popup that has the current value.
  8. If that's PDO then it's exactly the same. PDO isn't different based on which database driver is used, that's the entire purpose. Different databases might have different capabilities, though, for example when checking the number of records that were returned.
  9. Why doesn't your intranet have a server? You're going to need a place to store all of the files, right? So, where are the files? Do you keep a separate copy on every computer?
  10. Are you using a database wrapper or something? I don't see an object-oriented interface for the PGSQL functions in the PHP manual.
  11. Yeah, that's one way to use them. Even if you're only going to run it once though, it's still good to use a prepared statement. If you need to run the same query with different data several times for some reason it's more efficient to prepare it once and then give it the data each time than it is to put the data in the query and run that each time. MySQL only needs to build the execution plan once.
  12. Why are you checking for the cookie? Just start the session and use it.
  13. The browser might block local files from being loaded. It's best to test that by uploading everything to a server.
  14. Use your developer tools to set a breakpoint in that scroll handler to see what the values are. With the code on your site now: if (document.body.scrollTop < 180 || document.documentElement.scrollTop < 180 || prevScrollpos > currentScrollPos) { In my browser, document.body.scrollTop is always 0 so that if statement is always true. Use a breakpoint to see what's going on in your browser.
  15. If you're not sure, you're still a beginner. Start designing the app and see what you need to do to build it.
  16. Did you fix the syntax error in your code above? The reason it doesn't work is because you have a syntax error. That's why you need to look at your browser's developer console to see the error message.
  17. That plugin just uses a Javascript array of objects with various properties like title, URL, etc. It just looks for keywords in the text in that object and shows the URLs. If that's what you're looking for then maybe it's a good fit for you.
  18. Check your browser's error console, you have random punctuation in there. You should really make an effort also to keep your code formatted and indented without a bunch of extra lines so that it's easy to read.
  19. I don't understand what you're asking.
  20. You can add another node to the new li node, put an X or whatever content you want in it, and it needs a click handler to find its parent li node and remove that from the list.
  21. You need to prevent the form from submitting normally. See the link above.
  22. Security isn't really an issue in the design of a data structure like an array or class (other than class member visibility). Security in that involves authentication and authorization, which you haven't mentioned. Issues like how and when the API and the data are accessible, if other processes running on the same machine can access data they shouldn't be able to, etc.
  23. The first step is to not use Javascript to authenticate people, because anyone can look at your code to see the username and password. You need to use a server-side language like PHP to authenticate people and keep track of who is logged in. On any page you can then check if someone is logged in. You can use PHP's session for that.
  24. If you want help here we need a clear description of the problem and the relevant code.
×
×
  • Create New...