« first day (2351 days earlier)      last day (2599 days later) » 

9:15 PM
Does anyone know why my mail function would stop working after adding this javascript? I can't seem to suss out why it causes the form action="" to not fire simply by adding that javascript

http://stackoverflow.com/questions/10570825/stay-on-page-after-submitting-form
 
@rlemon Glare!
But nice
 
@AlexBollbach sudo ps -Af | grep node
 
better question
well nvm..
I have this javascript script which is checking for form submit which works but its checking, shooting success then not allowing the form php file to run
how can I tell the javascript script to run the php file
 
...
isn't that what the ajax request does?
 
I might be missing something inside of it
my link above is where im following from
ajaxform.js
 
9:28 PM
i wouldn't use that
 
:/ lol ok
 
it does magic shtuff behind the scenes, i rather know what my code is doing.
If you need to make an ajax request, make an ajax request.
if you need to submit the form, submit the form
 
ok yes
so I have all of that working
i just needed the page to stay the same on submit
 
then, you just need to make an ajax request after you've validated the data.
 
so
I dont have validation yet
i'm trying to set up like, the most basic form, cause i'm an ultra noob
 
woah
you have my bookmark links
crazy
 
v good information
 
between those pages there's examples of everything you need to validate form data and then post it to the server via ajax
 
do I HAVE to validate form data?
 
9:32 PM
no
 
ok
so I dont even need a php script?
i'm not even gonna use php? I'm gonna use ajax to mail?
 
javascript can't send mail
 
i didn't think so
 
at least, not from the browser.
 
so why would I need to send information to ajax
when all i'm trying to do is tell a page to not reload
 
9:33 PM
...
 
or stay on the same page
 
because you either post it via ajax or you post it to the server via a form resulting in a reload
 
so is my mail script i wrote pretty much useless if I need to use ajax for this?
 
why would it be useless?
you can't send mail without it.
 
i'm astonished at the sheer non-existence of tutorials on how to do something as basic as this lol. Hello money from a blog site :P
 
9:37 PM
$.get( "/users.php", {
    userId: 1234
}, function( resp ) {
    console.log( resp ); // server response
});
from docs
simply replace get with post, users.php with your file, and userId with your data.
 
yea I see all that haha, it's just without having any explaination - i've found myself a terrible programmer after "programming" for 5 years
 
you could eevn simplify it further by replacing `{
userId: 1234
}` with `$('#theform').serialize()` , which is also in those two links
 
so my data would be something like
name: #name,
?
wait no
1 week to get mail posting
not 1 week to get it to stay on the same page
lmfao i'll never get a job at this rate :D
when you have a CS degree but can't even code a full website lmfaooo
also kevin how did you find that
I can't even find that!
31
Q: Form submit with AJAX passing form data to PHP without page refresh

GlassHalfAwesomeCan anyone tell me why this bit of code isn't working? <html> <head> <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <script> $(function () { $('form').bind('submit', function () { $.ajax({ type: 'post', url: 'post.php', ...

woo this was almost exactly my issue
sort of
 
10:06 PM
~ndugger its the thought that counts
 
10:19 PM
Gosh heckin right
 
10:49 PM
doing me a frighten fren
 
@BenjaminEngwall Welcome to the JavaScript chat! Please review the room rules. Pleasedon't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
room topic changed to JavaScript: Topic: JavaScript, ECMAScript. Read this: javascriptroom.github.io/rules. Before asking inform yourself on the XY problem goo.gl/taIqf | devdocs.io Documentation™ Helps. Room meta discussions: github.com/JavaScriptRoom/culture [ecmascript] [ecmascript-6] [javascript] [nodejs] [typescript]
@BenjaminEngwall You work with Jessica?
 
@MadaraUchiha No, but I'm aware of another group doing similar work. She may be part of that team.
 
11:06 PM
sobox.directive('login', function(authentication, jwt, $cookies) {
  function loginController($scope, $state) {
    $scope.user = {};
    $scope.hasErrors = false;
    $scope.login = function() {
      // Some Stuff
    };
  }
  return {
    restrict: "A",
    scope: {},
    controller: loginController
  };
});
I'm doing a rewrite of an application written by a developer right out of an Angular bootcamp. I decided that while I was rewriting I would remove the controllers in an effort to prepare for a transition to Angular 2.
I'm having a hard time understanding how to give the directive a single isolated scope. I need to use a controller, rather than a link function because I need access to $state.
I can't seem to gain access to the $scope properties and methods in the view using this directive. Why is that?
 
11:40 PM
^ Answer:

I was creating to isolated scopes, one for the controller and one for the directive, when in reality I wanted to have an isolated scope for the controller only. The directive defaults to it's parent scope if you don't request for it to create its own.
 
any one know a good tutorial for creating a developer portfolio website? i'm an iOS dev and I haven't done frontend in a few months. I have a basic understanding of html/css/js and got as far as making a hello-world in react and using bootstrap a little. I just want some resources that would help me get going in the right direction of crafting a very minimal site where I can show off my projects.
 

« first day (2351 days earlier)      last day (2599 days later) »