>NEET guide to web dev employment pastebin.com/4YeJAUbT/ >How to get started [YouTube] WATCH THIS IF YOU WANT TO BECOME A WEB DEVELOPER! - Web Development Career advice - "WATCH THIS IF YOU WANT TO BECOME A WEB DEVELOPER! - Web Development Career advice" [YouTube] Javascript is Easy - "JavaScript is Easy" - If you can't into programming, you probably won't find a simpler introduction to JavaScript than this.
Seems like a neat idea, but it's a bit beyond my ability at the moment. Basically the thing I'm making picks a D&D inspired class, race, alignment, gender, and age, and constructs a character description based on that, dwarf-fortress style. It's not much, but it's something I've been wanting to make for a while.
thanks for the suggestions but this worked exactly how i wanted:
Press Me
function test(){ var audio = new Audio('C1a.wav'); audio.play(); }
Zachary Lopez
How about this:
A dynamic dashboard that automatically refreshes and updates content from a database table that you can define individually.
You have tables in a DB. You can go to the console and create a new widget that'll be shown on the home page of your control panel. You point it to a table by entering the name of it, give it a name and a custom logo, and it automatically creates a widget that watches that table for updates in real time.
Chase Powell
best practice is to avoid using onclick, add an event listener instead.
Lucas Price
The person who had a problem with the error message thing: use file.form-field-name.errors instead of your own error message.
pic related
Sebastian Morgan
Why would you want to watch a table in real time? Usually it's the aggregates you care about, not the raw table data. It's not particularly interesting to see random users updating their profile pictures, but it is interesting if the rate of user profile picture updating suddenly drops, for example.
Angel Roberts
What do you guys think about the MERN stack?
Nolan Watson
literally websockets lel
Liam Scott
Mongo can fuck right off. Other than that, it's solid.
Jonathan Rogers
Personally i prefer the MDAEN stack when it comes to deploying something quick n dirty.
Aaron Ward
D for Docker presumably?
Bentley Butler
>Usually it's the aggregates you care about
Makes sense, thanks for the suggestion. I'll adjust my idea to take this into account rather than just showing raw data from the DB.
Yes, in essence, but this would be a fronted representation of the data.
Wyatt Phillips
rethinkdb + horizonjs
Sebastian Lopez
>websockets
So... you're expecting a DB to send WS events to a server somewhere? Do you know what a DB does?
"lel"
Justin Murphy
Thanks, I've been looking for something new to try. Will check these out.
Joseph Ortiz
How do I clear a form and stay on the same page after submitting a post request in Node.js / Koa? Where do I start?
fuck guys, got a problem. When I AJAX load a div with new content, the handlers don't work on the new things.
Worse yet, I need to bind EVERY major event to EVERY possible tag.
so... can someone give me the quickest way to do jq("div").on([all handlers], [all possible elements], function(e){ [I don't even know what should be in here. It just needs to rebind everything to all the new content] });
Christopher James
Bind the event listeners to a parent container and use event.target to filter/identify/handle/etc.
Aiden Gomez
ok, I'm not sure what exactly you mean.
s, would I do something like jq("#CONTENT").on(event, event.target, function(){[I'm still not sure what this function should be]})
ok, um, maybe an example? one of the new content in #CONTENT will be #UPDATE_CONTACT_INFO, which is a form. The form submit function will need to be load AJAX another module, which will then load over the form with the posted data. After which, a button called, maybe #CLOSE_EDITOR will be there and need to trigger the click event. On which, the profile page reloads in #CONTENT, which goes back to step 1, so another form needs to be bound again to submit, so the editor can be opened.
Landon Walker
hey guys im stuck and could use some help please.
im making a site with flask and added user registration to it, but the users i add trough it wont login, while previous users created with a postman like program work just fine.
any idea what could be the problem?
Joseph Adams
You will need to bind for each type of event separately. document.querySelector("#content").addEventListener("click", event => { if (event.target.matches.("#close_editor")) { // Do shit } // etc ... })
document.querySelector("#content").addEventListener("submit", event => { event.preventDefault() if (event.target.matches.("#update_contact_info")) { // Do shit } // etc ... })
Lincoln Parker
submit the form via ajax
Jason Fisher
use event delegation
Chase Hernandez
thoughts on backbone?
Owen Stewart
Hmmm, this is actually what I was hoping to avoid.
I was willing to be a bit more obfuscated to avoid having to list every function...
So, there's no way to simply make the script act on the new elements? That really makes this more annoying.
Thanks, though
I'll also look this up
Caleb Howard
It's deprecated
Tyler Anderson
Well built, but ultimately slow, unless heavily modded. Relies heavily on >jQuery Best practice would be creating a basic view class for each type of interactive element you want and extending those as needed. You don't usually need event delegation, unless you have a fucking lot of views.
Nolan Butler
>Best practice would be creating a basic view class for each type of interactive element What do you mean by 'basic view class'?
Like, I have a couple classes already such as "JAXABLE_LINK" and "JAXABLE_FORM". Is that what you meant?
for instance, here's the code for jaxable_links: jq(".JAXABLE_LINK").click(function(event){ event.preventDefault(); var paramStr = jq(this).attr("href"); jaxMyMod(jq(this).attr("name"), paramStr, replacePage); //this is the AJAX function I'm using. I'm not a fan of the particular implementation of jQuery's AJAX })
I mean JavaScript classes. Something generic enough to be reusable.
Xavier Morales
Eh, it's easier to work with. There's not a lot I DON'T like about jQuery.
Oh, hmmm, I'll have to look into that, but I don't use JavaScript as the basis of my display. I just call in PHP scripts, since I'm trying to support both JS AND non-JS users.
DESU, the only languages I've ever heavily used classes in were C++ and Java. The syntax for PHP and JS classes has always been weird for me, so I kinda avoid them.
Nolan Scott
also, what's a ".ts" file?
Eli Taylor
TypeScript - basically Microsoft's take on statically typed JS. Makes large projects a lot more manageable.
David Morales
oh, hmmm. never even heard of it before.
Brandon Moore
>Eh, it's easier to work with Dat ES6 do
Charles Evans
I actually just got it.
This seems to work regardless of if it's new or not: jq(document).on("click", function(event){ event.preventDefault(); var T = event.target.className; var ELEM = event.target; //alert(T); switch(T){ case "JAXABLE_LINK": var paramStr = jq(ELEM).attr("href"); jaxMyMod(jq(ELEM).attr("name"), paramStr, replacePage); break; case "JAXABLE_BUTTON": //alert(ELEM.parentNode.className); if(ELEM.parentNode.className == "JAXABLE_FORM"){ //alert("Is part of form"); jaxMyMod(jq(ELEM.parentNode).attr("action"), "?"+jq(ELEM.parentNode).serialize(), formPage) }else{ alert("Not a submit button"); } break; default: alert("Default: Item is of type '"+T+"'."); } })
(obviously, the alerts are temporary and for testing)
Hudson Campbell
ES6? I'll have to look into that
Aiden Bennett
sweet, it works. Just gotta adjust some other parameters now, b/c the link is a bit weird in PHP mode
Jeremiah Myers
encoding
Kayden Edwards
Webpack or Gulp?
Cooper Perez
>CSS >HTML >programming languages
wew
Ian Ross
>>>/dpt/
Jackson Torres
>don\'t >\r\n\r\n wow, you sure suck at php
Bentley Bennett
Who are you quoting?
Kayden Lee
Looking to go into freelance web dev, I know I could pick up jobs from freelance websites such as oDesk, and Freelancer, but I was wondering if anyone had any tips on how to find clients to do work for besides going through freelance sites?
Parker Lee
How exactly do I use react and express at the same time? They both have their own pseudo languages.
Will I finally be able to start doing actual coding with react without having to mess around with tons of tooling?
Ryder Miller
Yes, but Webpack's purpose is in bundling. I mean, you can do most of what one does with the other, but Webpack was never intended to be a task runner.
>Decide to learn a meme stack >Need to download a bunch of garbage >Follow guide that uses dozens of dependencies and frameworks within frameworks >Some have their own meme pseudo languages >Need to set up task runners to transpile jsx, ejs, es2015 code, scss >It all boils down to compiling all this shit to an HTML, CSS and JS file
What happened to web development?
Nolan King
yes, though name should suffice, have a look at this on how to do it more efficient. first with and second without jquery. jsfiddle.net/wjg4f8wL/
you shouldn't do animations like this anyway, use css for that.
Logan Powell
>NEET guide to web dev employment Have ny NEETs here actually followed this guide? Did it work?
David Jones
Thanks alot man, I appreciate it.
Carson Jones
Cleaner way would be to attach the event handler to a parent element. Also jQuery has a .fadeToggle() method that does what you're trying to do in a cleaner way.
Working on a note editor with React and Local Storage
William Russell
Neat, thanks for this too.
Jeremiah Carter
need some help on this if anyone is willing(contact form to email on node using sendgrid)
the issue is that "if(data=='sent')" isn't getting tripped, so it appears to be sending the payload multiple times, resulting in me receiving multiple duplicate emails from the server, and the "Email is been sent at "+name+" . Please check inbox !" line is never updated
script.js $("#send_email").click(function(){ name=$("#name").val(); email=$("#email").val(); message=$("#message").val(); $("#feedback").text("Sending E-mail...Please wait"); $.get("MYDOMAIN.com:3000/send",{name:name,email:email,message:message},function(data){ if(data=="sent") { $("#feedback").empty().html("Email is been sent at "+name+" . Please check inbox !"); } }); });
you're checking if the response is "sent" but there's nothing in app.js that actually responds with "sent"
Eli Foster
so does your server get the request? you don't seem to send anything back to the client.
Ian Brooks
shoot, thanks m9
Landon Walker
I haven't been into webdev at all since 2009 when I was in highschool. How much has changed? It seems like on websites CSS is more prominent now and static images aren't used as much. Like I remember making buttons in photoshop or gimp but I've noticed most websites just use pure CSS and html now for buttons.
Gabriel Perry
Shouldn't you be using POST instead of GET?
Logan Adams
you can't POST to different ports and I guess he didn't want to setup a transparent proxy for that.
Evan Sullivan
Pretty much everything has changed since 2009, that was ages ago in internet time. You should pretty much throw out everything you know and start fresh.
Jayden Collins
Best place to start?
Evan Hall
...
Camden Gray
I wanna make an interactive *WEB APPLICATION*, not a WEB SITE. I wanna have sort of live editing or at least autorefresh, but I want it to be LIGHT so I can't use Meteor.
Whats the best workflow for that? I'm willing to learn anything as long as it's not meteor and doesn't require me to keep refreshing the webpage like a faggot.
Adam Brooks
What do you mean by live editing?
Brandon Clark
Things changing as I edit them.
Christopher Bennett
Websockets probably, with two-way data binding.
Jonathan Butler
the server does get the request
I tried adding "res.end('sent') to the sg.API line in app.js which isn't helping. Where should it go?