« first day (2699 days earlier)      last day (2474 days later) » 

18:04
I have an HTML form that sends data to a JS function. This JS function posts the data to an external site and then redirects the end user to a 'thank you' page. How would I instead redirect the user (after posting the data to the other site) to a PHP file with the POST data on my server?
post with xhr, redirect whereever
user2620028
@SterlingArcher i don't even wear a helmet
@HatterisMad SterlingArcher is afk: pho
<form action="yourpage.php">
...
</form>

form.addEventListener('submit', () => {
   postToTheOtherSite();
   // let the original post go to yours
});
Currently using <form onSubmit> already, and that means I can't use action.
18:06
should work
Sec I'll link you to a pastebin
@nicarpe sure you can
just don't cancel it
ugh, SVN. How do I tell it that this file isn't binary?
don't use the inline onSubmit
18:10
Is there any way to submit the POST data to the PHP file after the sendData() function finishes?
register the listener in js, and don't cancel the event
my brain switched to git and doesn' want to go back
if you don't cancel the event, it's like you never intercepted it in the first place (as far as the post is concerned)
pastebin.com/nRHts1au is this what you're proposing? @rlemon
18:13
well, something along those lines anyway.. obviously that code won't be functional in real time
user9107868
Thats bad. (No more OpenID)
are you referring to the paste? @TheOneWhoMade
user9107868
no
@nicarpe if you're doing it with jQuery, just don't return false or call event.preventDefault() and the original event will pass through
if the post isn't happening before the page refreshes, await it
so - if I do not cancel the event, then the form will successfully redirect to the php file after it has executed the JS code?
sorry I'm just getting started.. doing some work on my page atm, and thanks for your assistance.
18:16
@rlemon: could you, theoretically, ban that bot guy from his own bot?
here's the breakdown.

you capture the form submission
you post whatever data you want to whatever site you want with ajax
you DO NOT cancel the event (currently you are)
the original post action should just happen at this point.
now the only caveat, is the post for ajax is only called. no waiting happens. so it might be lost when the next post happens. if that's the case you can await the post before letting the event pass through
OR, just post the data to the other service from your server.
or ajax it to your server AND the other server and don't let any submit events succeed
@Cerbrus yes and no
yes, I could hide in some code that would block it. but it'd only be hidden, not invisible.
a local copy can always remove it
Would be amusing to give it a try.
I mean, how certain are we he comprehends how the bot works?
if he's running a fork, pointless. if he's just loading the bookmarklet or master.js from the github. totally possible.
user9107868
@Cerbrus i would just edit the save.
Oh, he's listening
Quick, hide!
18:20
ohh no, my contempt is freely shared
</hide>
Kewl
user9107868
@Cerbrus at most you would just piss me off.
Now I'm scared
And AFK
user9107868
@Cerbrus you have no reason to be scared, unless you piss me off.
even then.
18:25
good thing that is the exact reason he IS scared then.
all is consistent
i we have windows 2008 servers.. which are basically windows 8
@SterlingArcher i.imgur.com/pvGASyC.gifv you know its coming
@rlemon SterlingArcher is afk: pho
I always forget how to use the stupid broken windows 8 start "menu"
jelly
hot damn that's a nice print.
user2620028
@Luggage but..... win8 didn't come out until 2012 :/
user9107868
18:28
I dont see how I am scary. I can barely do anthing.
@HatterisMad maybe that was server 2012. I forget. But there is a version of windows server that is the windows 8 menu
and one with the 8.1 menu
user2620028
eww 8.1 menu, bleh
slightly better than the 8.0 menu
user9107868
$$afk Please don't bother me.
Can he just be kick on site, yet?
18:29
@TheOneWhoMade please notice that my name is Italic.
I am the one who knocks.
user9107868
Yes. I know. Just dont bother me.
user2620028
@Cerbrus everyones name is italic, what is your point
> I'm just practicin' my stabbin;
@Luggage please, flex your kick muscles early and often
Isn't it more the replies rather than his actual posts causing problems
18:31
@rlemon 👍🏻
That print is a good example of just letting the 3d print lines show. It looks good like that.
yea, it's not a perfect print, but it's a damn good result.
and as far as I can tell, it's all filament, no paint
user9107868
@Cereal remember I am still here.
Nevermind, kick him on sight
user2620028
@TheOneWhoMade but do you truly have to be?
yea, looks like just filament. maybe some touch up, cut away bits*, but no sanding or anything
Justice
@Luggage ohh for sure a bit of post, but yea. no paint it seems
@Cereal y u no take it?
very little post
18:34
opportunity missed.
Is he gone? Refreshed the page :P
I clicked kick
he must have left
Getting RO'd doesn't ping you, I didn't notice until you pinged me
18:34
i never saw it
next time
> 1984 2: 1985
😆
that checkmates ME
@rlemon wow lol
I think it's a 2 step process to a singularity.

1) We get cars to automatically avoid potholes

2) We make it drive from my house to work.
18:40
I don't think singularity means what you think it means.
A coloring book. LOL
user2620028
@Loktar i saw someone playing this on twitch last night and holy shit it was so cringey
but did you learn anything?
user2620028
you talking to me?
user2620028
18:46
i think i learned not to listen to that game for advice
sorry a DUMB question
 if idx != offset and idx != offset+1:
That's not a question
user2620028
so it is just a DUMB
That's also not JS
ehm sorry mixed python with js
:|
if (idx !== offset && idx !== offset+1){
   //hi
}
18:48
understandable
PythonScript
@Suisse just ask your question
user2620028
i guess what are you trying to ask?
SnakeScript
18:49
We understand the code
how can I reach the //hi part!

I only want to skip scenarios like this:

idx == offset (dont say hi) . and if the idx == offset+1 (dont say hi)
I feel sooo dumb and yes I feel right
what you have should be fine
> how can I reach the //hi part
wrap the whole condition in !( )
er.. yes. what Lemon said.
set idx = offset + 2
18:51
haha
user9107868
Just want you to know that if you perma-ban me, I can't change my mind and learn from my mistakes.
@TheOneWhoMade hehe welcome
@TheOneWhoMade are you blackmailing us with your well-being?
@MadaraUchiha he's now joining, sending a message, then leaving before a kick can register. good play of the system I suppose.
heads up.
user9107868
NO blackmail.
18:53
idx == offset (dont say hi) . and if the idx == offset+1 (dont say hi)

but also don't say hi if one of those is given
@TheOneWhoMade Not perma, just 3 days.
@Suisse why doesn't what you have work?
4 mins ago, by Suisse
if (idx !== offset && idx !== offset+1){
   //hi
}
We deserve as much a break from you as you deserve from us. Please rethink your behavior and come back only if you think you can behave.
@TheOneWhoMade don't you feel like you should prioritize your own self-development over us and actively avoid situations that might result in your banning?
should do what you just described
ohhh @Suisse
replace && with ||
you want or, not and
18:54
no no no
wait its working!
with &&
&& is correct in his form
sorry
its working.
@Suisse you're welcome
THANK you all!
> but also don't say hi if one of those is given
18:55
yes
@TheOneWhoMade Also, you go the wrong impression. None of us here care that you personally improve. If you don't, we are fully capable of suspending you for longer and longer periods if that's what it takes.
ahh, yea the !== keeps confusing me
hehe
@MadaraUchiha Do you care about my personal improvement?
if (![offset, offset + 1].includes(idx)) { ...
18:55
isn't it more "clean code" when I use less !== more ==
use whichever one reads easily to you.
except never use ==
if( idx - offset >= 1 ) {
  // hi
}
use ===
18:56
@Shmiddty is that javascript or python?
@Suisse C++
@Vap0r yeah I thought so
it's JS.
C-- maybe
18:57
I gave your mom the C--
hach rlemon has a new avatar
so fresh
@rlemon that's not the same. it won't // hi for idx < offset
Math.abs then
idk.
fine.
then it'll cover 3 numbers instead of two
18:58
Guys we're mainly talking a difference of 1 or 0. I feel like we could clear everything up by using JS bitwise operations
Don't listen to Vap0r
^
... wait
I feel like I missed you guys a lot more than you guys missed me
oh this guy makes me mad

« first day (2699 days earlier)      last day (2474 days later) »