• Content count

  • Joined

  • Last visited

  • Days Won


Everything posted by thescientist

  1. I second using a local Meetup as a great way to find like-minded individuals and potential project / collaboration opportunities.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. if they're both running, then it sounds like WAMP is already using port 80. Only have one or the other running.
  7. what's your question?
  8. What's the rest of the error message?
  9. Check out the w3schools tutorials
  10. this seems like a duplicate post of another post you have already made please don't duplicate post.
  11. 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)
  12. If you are on a linux machine, you can probably just use find
  13. 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.
  14. 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?
  15. seems like some source code or a link would be helpful here to make the most of this thread
  16. looks like what? what is your question, I'm unclear fo what you're see / asking about.
  17. you should show some code the clearly represents the issue and what the expected vs actual is
  18. 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.
  19. 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.
  20. can you provide an example? is it not firing at all? what devices? all of them?
  21. I would review their API a bit more, you seem to be mixing things up. If you need it, proxy goes in the init method reload is for updating browsers about changed files You probably want to follow something more like this example Maybe something closer to var gulp = require('gulp'); var browserSync = require('browser-sync').create(); gulp.task('serve', function() { browserSync.init({ server: "./app" // your doc root, source code, build output, whatever }); //the files to watch for changes, to trigger browserSync["./app/*.html", "./app/*.css"]).on('change', browserSync.reload); }); gulp.task('default', ['serve']); though knowing more about your project structure (since I see PHP in there) would be helpful, re: your doc root, or www, etc output
  22. I think you would find a lot of value in properly indenting and formatting your code, which a good IDE or text editor would do for you. Aside from that, yes, you only need one $(document).ready function. This is jQuery's recommended way of initializing your javascript to be sure that the DOM has loaded and that all the elements that you would expect to be there are there and so it only needs to be done once. Clean up your code again and try another pass at this, and make sure to think about what is happening, line by line. Write it out in psuedo-code if it helps first (I find it can)
  23. I would second this. Here is the Apache documentation that is helpful in implementing this through server configuration instead of .htaccess
  24. I don't see this approach as being a more readable or maintainable alternative, but here goes $value = $explodedUriCount === 1 ? $pageName : $explodedUriCount === 3 ? $pageType : '404';
  25. I wouldn't say that necessarily as that kind of wording may lead one to think that a lot of things that are in ES5 wouldn't be the same or might even be broken in ES6. In fact, there is no backwards incompatibility between the two and in fact most of what was added in ES6 is just syntactic sugar on top of what is already part of ES5. One way to put it is that all the ES6 features are essentially opt-in, so if you need them use them, otherwise nothing stops one from continuing to "use" ES5.