thescientist

Moderator
  • Content count

    8,681
  • Joined

  • Last visited

  • Days Won

    35

Everything posted by thescientist

  1. integration

    yes, it's not clear what you need help with. What parts of the API? What have you tried? What are you stuck on? etc
  2. what do you need help with?
  3. I would agree with a couple things mentioned The syntax is not correct (regardless of React usage) The need for React is not apparent That said, it certainly could be done with React, or "vanilla" JS would certainly be more practical as this "simple" case seems warrants. As far as implementation details go, would a better option be to increment a counter each time a link / page is visited in a cookie or with one of the web storage APIs? Either way a user can work around it, but at least one is a more "stateful" solution.
  4. Is your php file located at the root directory of the webroot? Try opening the PHP file in a browser, and if it is indeed at the root, you should be able to access it at http://<your-domain>.com/post.php. Otherwise, you have an incorrect path to post.php in your form. If the form and the PHP file are in the same directory, you could just use <form action="post.php" method="post">
  5. What part specifically do you need help with? It's not very clear from your post.
  6. You should be using NPM (which is what the example shows) https://www.w3schools.com/nodejs/nodejs_mongodb.asp $ npm install mongodb To elaborate, Node is the JavaScript runtime environment, NPM is the package manager. Using NPM to install Node packages for your project.
  7. I second using a local Meetup as a great way to find like-minded individuals and potential project / collaboration opportunities.
  8. FWIW, this ties into what was being taught to you in your header thread. PHP is a server side language, and is generating the body of document being requested by the browser, hence the reason why content being rendered before headers was causing you issues. There are generally two options for something like this Mix PHP with HTML / JS / CSS, in which PHP builds up the page content and delivers a final page to be rendered by the browser, including all the JS to be executed Just use PHP to provide data, and have JavaScript request just that data (ie. JSON) using AJAX and let JS / HTML handle generating the page content dynamically I prefer the second option since it keeps business logic separate from presentation, doesn't try and mix too many things, and is generally easier to organize and reason about. This is the general approach to most web development, where the backend, be it PHP, Java, NodeJS, etc acts as an API serving up all data to the client (browser) and then something like jQuery, AngularJS, React etc would be used to render that data into UI using the DOM, or whatever conventions are exposed by the given library / framework. Anyway, just some additional information for you to consider as you plan out your project.
  9. I can't speak for the decision to include tutorials on AngularJS or jQuery, but the Angular (2+) docs and guides are quite comprehensive, in particular the Tour of Heros Getting Started Guide. That's probably you best bet.
  10. it would be helpful to share the relevant code in one block, instead of three code blocks in as many posts, since it makes it harder to understand the context of your issue. And in particular with headers, seeing the whole file is important.
  11. Why can't you just have different buttons pass the different data? The showModal function would expect certain data, like title, message, etc and use something innerHTML on elements inside the modal to change their values dynamically. There is certainly a way to have multiple buttons re-use the same modal, in fact this is the cornerstone premise of UI libraries like Bootstrap.
  12. if they're both running, then it sounds like WAMP is already using port 80. Only have one or the other running.
  13. what's your question?
  14. What's the rest of the error message?
  15. Check out the w3schools tutorials http://www.w3schools.com/php/php_forms.asp
  16. this seems like a duplicate post of another post you have already made http://w3schools.invisionzone.com/index.php?showtopic=56434#entry310604 please don't duplicate post.
  17. are you looking in your browser's error console? If I visit you website's main page, there are a bunch of 404 errors which means the browser can't find the files you are looking for. Anything could be the reason for that on the server side, since you didn't explain what you changed, but pretty much it means one of these things The files don't exist on the server at all at that path You changed the path in index.html but didn't move the files there You moved the files but didn't change the path in index.html (intentional or not)
  18. If you are on a linux machine, you can probably just use find
  19. interesting. seems like it could be an easy way to introduce newbies to libraries and frameworks without the overhead of something like React or Angular and the ceremony that usually accompanies them. That said, jQuery is pretty modular these days, so not sure what niche this particular lib would fill.
  20. Does it do anything? From what I can see, that file is saved as a .txt file so I wouldn't expect it to work. Are you checking the browser's console for any error messages?
  21. seems like some source code or a link would be helpful here to make the most of this thread
  22. looks like what? what is your question, I'm unclear fo what you're see / asking about.
  23. you should show some code the clearly represents the issue and what the expected vs actual is
  24. I don't think that it would be a bad thing personally, as a lot of popular frameworks like Angular 2 and React are using ES6 and TypeScript in their tutorials and so are a lot of the blogs and guides. That said, there will still be the requirement of needing a transpiler for the time being but, I certainly think there are lots of tutorials and guides around that too, however, at the risk of linking people off site to other tutorials (for Babel, TypeScript, Webpack, Gulp, etc) I could see W3Schools being hesitant in that regard as well. Either way, I firmly encourage any intermediate JS developer to start learning ES6 features now and consider taking the extra time to learn how to transpile that source code down to ES5 compatible JS. New features, like imports have fundamentally helped changes the language (for the better IMO) and I think the resulting source code is better for it too.
  25. It would certainly fall within the realm of server maintaince, of which there is a sub-forum here for that which I would recommend anyone to check out and ask questions there, but as mentioned, the W3Schools tutorials aim to focus concretely on web languages, not necessarily all the ceremony that goes along with that.