So I was talking to the.

 
Sarro: Ah ,yea ok i fixed it, thats not the issue though

Hayenga: Its still submitting the form normalling i dont understand.

Trucchi: You’ve got more syntax errors

Trucchi: So the listener is never being added and the code is never run when the form is clicked

Trucchi: I recommend just keeping your console open when trying out your page

Dunovant: Ok will do that, thanks

Trucchi: Well what I REALLY recommending is unit testing but one thing at a time ;-

Eurton: Well this is just some stupid little ***ignment im ttrying to throw together

Toline: I just have to show a simple sqli attack, but all this bull**** comes along with getting it setup

Trucchi: Fair enough – dev tools are your best friend though

Pelchat: Hi, ccan anyone help me figure out why background-size: cover; wont work on this page http://www.casumon.com/viewport/px2.html

Pelchat: I think it is because of the parallax in js

Pelchat: But dont know enough about it

Mcculla: I just want to redirect them to index.php if they logged in and if not i want to load an error message

Fahl: I dunno if you know php, but here is what is in the file that i request with ajax. http://laravel.io/bin/eDqWj what i hoped to have happen was the ‘results’ of the ajax request would come through of what is returned if t he user is not logged in, and if the login was successful then it would just redirect to the inde

Artez: Definitely not getting the results i hoped for

Trucchi: Z1haze: a server-side redirect will do you no good if you’re using AJAX – AJAX gets the response data and the page won’t redirect

Kavanagh: Hey folks, wussup there? could someone please help me with this? http://jsfiddle.net/jvx07xoL/ my logic doesn’t work out the way I thought it should work, what am I doing wrong? thanks

Pelfrey: What shoudl I do then?

Trucchi: Z1haze: I suggest just having the AJAX call listen for the response, check for a redirect in the response data, and then trigger the redirect with JS by changing window.location

Milovich: Check for a redirect in the response like how?

Pignataro: Trucchi: With the changes you suggested, it’s working *perfectly* now

Trucchi: Brim: glad to hear it!

Lakeman: I got the responses for the errors working now

Huguenin: Now just how to listen for the redirect?

Arneberg: I found something online that says if data.redirect { but im not sure what .redirect is

Trucchi: Z1haze: well, I think your PHP is off, because if the redirect worked, you should be getting an HTTP response code 301 with appropriate data you could then get the redirect location from the details

Trucchi: So in js, you could just check for a 301 response and then redirect accordingly

Zogopoulos: Its not off. it worked without the ajax

Fitzherbert: So by default the data.redirect in js will be anything that has a 301?

Trucchi: Oh wait, I just typed in a gibberish user, which wouldn’t redirect

Lindbo: Well it isnt supposed to redirect if you arent logged in

Fingal: It just gives you the error

Trucchi: That should work, sure. you could skip checking the status code and just check if data.redirect has a truthy value

Trucchi: Personally I’d use the status code, it’s more exact. but YMMV

Trucchi: And then you can just set window.location and off you go

Kuney: Yea ill give this a shot real quick

Rolfe: I belive im missing something

Haddan: Where does data.redirect come from?

Trucchi: What do you have for data.status?

Shearing: So I was talking to the other day this afternoon. He was troubleshooting jsonp issues. He said that the callback function name disappears. Is this possible? I’ve been trying to recreate the issue with no luck