-
Posts
31,575 -
Joined
-
Last visited
-
Days Won
77
Content Type
Profiles
Forums
Events
Posts posted by justsomeguy
-
-
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.
-
You can loop through the array, or you can use Array.join to combine them into one string.
-
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.
-
-
I don't think there's a single standard that everyone uses.
-
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.
-
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.
-
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?
-
Are you using a database wrapper or something? I don't see an object-oriented interface for the PGSQL functions in the PHP manual.
-
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.
-
Why are you checking for the cookie? Just start the session and use it.
-
The browser might block local files from being loaded. It's best to test that by uploading everything to a server.
-
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.
-
If you're not sure, you're still a beginner. Start designing the app and see what you need to do to build it.
-
-
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.
-
-
-
You need to prevent the form from doing its default action of submitting by using preventDefault();
https://www.w3schools.com/jquery/event_preventdefault.asp
You should not use click event on the submit button but a onsubmit event on the form itself, as a form can be submitted by hitting enter key while within a input element.
-
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.
-
-
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.
-
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.
-
Error Handling Help
in JavaScript
Posted
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?