« first day (1312 days earlier)      last day (3647 days later) » 

11:03 AM
Let's say you have a SPA and it has complex navigation which needs to fit on a small device so you hide it away and use toggle buttons to browse the navigation. The problem now is what if the user is 2 levels deep in the navigation, clicks a link, since it's a SPA the browser doesn't reload the page so the menu items are still visible. Is the only way to close the menus after clicking a link to add event listeners to every link in the menus which close the menu on click?
 
that's deep.
 
@David Yep, pretty much
Alternatively you could add an onclick on each link, but that doesn't change the fact that you have to do something for each one
 
@David But that's not exactly a hard or complicated thing to do
 
I can see how that would be problematic though, if you had some sort of server-side library updating it automatically
I ran into problems like that a lot with java server faces :(
 
can anyone have some solution for this
0
Q: the alert (X) close is not working

ManuI've created an applicationfor an alert as documented in http://foundation.zurb.com/docs/components/alert_boxes.html , the alert box is comming but not able to close the alert box . can anyone please tell me some solution for this Working Demo <script> $(document).foundation(); </script> <br> <...

 
11:14 AM
@KhushalDave Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don'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.
 
@Neil @monners Do you know much about angular?
 
@Manu did you read the answer ?
 
@dievardump yes but i'm not getting it work
 
11:29 AM
@izocan Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don'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.
@user3012749 Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don'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.
 
AJAX PHP JSON: I want php to capture an array of objects from the javascript file posted using the .ajax jquery plugin. I send the elements but need help in capturing them and turning them into a php array
so far I have $_POST['imagesArray'] to get the actual json object array
then I use json_decode($imagesArray, true)
but in testing when I iterate over it doesn't work
perhaps its my loop thats at fault
 
perhaps.
 
perhaps.
 
perhaps.
 
perhaps.
 
11:44 AM
0
Q: Send an empty array in a querystring

gdoronI know there isn't a standard about arrays in querystring and you can use several notations for the same results, so I'm focusing highly on ASP.Net notation. Is there a way to send an empty array as a parameter to a webAPI controller? I used jQuery's internal function jQuery.param that serializ...

Does someone here know how to send an empty array in a querystring?
 
@gdoron as JSON
 
@JanDvorak um... didn't think about it, I'll try it tomorrow at work.
But how can I send it from the client if jQuery ignores it?
I'll have to not use jQuery on this one?
 
wait a second...
did you just say there is something that jQuery cannot do ?????!!!
 
@gdoron I prefer to use javascript
 
@jAndy LOL :)
 
11:48 AM
0
Q: Angular angles doesn't work with some chartjs API

samithaFollowing charts not working with Angular angles See Documentations Js Fiddle with more example <div ng-app='anglesExample'> <div ng-controller="CitiesCtrl"> <canvas polarchart options="options" data="chart" width="500" height="300"></canvas><!--Not Working...--> <canvas ...

 
@jAndy jquery language is turing complete
@user3012749 I like jquery better than javascript
(honestly though I don't know how it's not getting old for me.)
 
What are your opinions of having a controller on the body element in angular for keeping track of any open dropdown menus and possible other stuff so that custom directives deeper in the DOM can easily have access to what dropdown menus are currently open and possibly other data?
 
@Marvin Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don'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.
 
12:03 PM
I remember seeing a picture someone posted here about someone who posted a screen shot of their web browser and the developer tools things open and they didn't have a clue what it was they thought they were being hacked, does anyone have the link I need to show it to my brother
 
!!are you alive?
 
@rlemon Nope
@rlemon Of course not
 
@Zirak you can kill her now.
!!a or b
 
@rlemon b
@shanehoban Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don'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.
@JasperVanKerschaver Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don'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.
 
!!death or destruction
 
12:17 PM
@SecondRikudo destruction
@SecondRikudo death
 
lol
BOTH IT IS THEN!
 
First destruction, then death. Otherwise we may have a problem.
 
yea i'm just trying to see possible issues from both Zirak and I running the bot. i'll disable mine.
one of us decided death, the other destruction. I'll let you guys decide who
 
I've got money on Zirak and death
 
!!rlemon or Zirak
 
12:20 PM
@SecondRikudo Zirak
 
@rlemon It has been decided.
 
Let none doubt the almighty wisdom of the random number generator. Amen.
 
@Neil pseudo random number generator.
 
@SecondRikudo Technically everything is pseudo random then
 
@Neil not according to QM
 
12:31 PM
@Neil Nope.
 
It's random because you don't know the current state
 
A random number generator which is based in quantum physics will be truly random.
 
@SecondRikudo In theory or in practice?
If in practice, would like to know how they proved that a number could truly be random
 
@Neil Well, it's so random that even our best machines and measurement instruments cannot predict. So I consider that as random in practice.
Phones use the camera and the microphone to generate entropy, but theoretically it's still possible to recreate all conditions and predict a number generated.
Since today, in 2014, it's completely impossible to predict when an atom will decay, I consider a generator based on that truly and perfectly random.
Until proven otherwise.
 
@Tal Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don'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.
 
12:38 PM
Quantum theory states that wavefunction collapse is fundamentally random.
It doesn't have anything to do with our prediction skills.
 
 
@SecondRikudo It's already random in practice
I'm about to have a random number show in the chat. Can you predict what it will be?
 
@ChristianHaaland Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don'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.
 
Maybe not random in theory, but random in practice, most certainly
 
QM is random in theory
 
12:42 PM
woo
 
You may be right, though it seems like an awful lot of trouble for producing truly random values
 
wow i go on lunch and this is the level of conversation, im impressed guys :)
 
I think my ES6 modules are finally working
@DrogoNevets don't worry it will drop quickly
 
ah random number generators again :P
 
Supposedly the whitenoise you see on a tv screen not attached to a signal comes from residual information from the big bang
 
12:43 PM
nine nine nine nine nine nine
@Neil The CMB, to be precise
 
@Brad Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don'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.
 
I'm new to JS & posted a JS/AJAX question. I'm creating a Rails app & I would think this should be a simple function of AJAX, but can't seem to find any resources to help me figure out how it works. stackoverflow.com/questions/23749918/…
 
@Neil Yes
Humans are surprisingly deterministic.
 
@SecondRikudo Tell me what it is then
 
(I specifically can't, but it was shown that numbers that people thought up were not random, and actually more predictable than what most people think)
 
12:53 PM
@SecondRikudo In that I agree
And oddly enough, we're far more difficult to predict than a computer
Though I was referring to a randomly generated number
Not by me
 
@Neil For example, if you study me long enough, you'll know that the first number that randomly pops into my mind is 42.
Usually.
 
@SecondRikudo A professor once asked my class as a social experiment to randomly toss a coin 100 times and write the results or to think up 100 random coin flips and to show him the results but not to tell him which method was used
He of course was always able to know which it was
 
@Neil Obviously.
Because human behaviour is generally predictable.
 
And it is mostly due to the fact that statistically, in 100 coin flips, it is very improbable not to have 6 heads or 6 tails in a row
Most humans think that isn't very random and deviate
 
12:57 PM
I see that what @KendallFrey was referring to with the nines then XD
 
Indeed, he was.
 
Hi
:D
 
Someone on math SE asked if there was a way to measure the randomness of a set of numbers
Was actually surprised that it is possible
 
randomness is lack of correlation
 
@BartekBanachewicz correlation comes from two variables, not one
You going to compare one random number with another?
 
@Neil you might even reduce
altough that takes only neighbouring values
 
Do you even reduce?
 
@SecondRikudo I think they run test onn their server
But yes we do
 
@Neil I tried that once on my friends. They fooled me quite thoroughly.
 
1:02 PM
@Neil I wonder if instead of one person thinking of 100 coin flips, if we'd have 100 people thinking of one coin flip (and having them independent from one another), would it be more random?
 
@KendallFrey Oh you mean they were aware of that and deliberately tried to fool you?
 
@Neil well I fold
 
I mesaures & reduced few words.....as bot was moving mostly in one direction ...
 
@SecondRikudo I would guess so, but it isn't so obvious, is it?
 
No idea :P
 
1:04 PM
0
Q: Value of element is undefined for some unknown reason (js)

user3656679Hello I'm a JS/HTML beginner. I got the following form <form> <label>Full Name</label> <input id="reg_name" value="" type="text" /> <br /> <label>Email Address</label> <input id="reg_email" value="" type="email" /

"I'm a JS/HTML beginner" "alert($("input#req_email").val());"
 
There was that crazy theory that if you found yourself in an endless library with letters in the books arranged in random ways
Sooner or later you'd find all works ever made
I suppose the point is that it is unfathomable, but it is of course completely right
We cannot imagine infinity
 
@Neil No, they came up with a pretty darn good random set of data
 
likewise if pi is indeed irrational, the numbers could be formed to represent ascii code, and therefore in theory your name, date of birth, and date of death are all written somewhere in the decimals of pi
@KendallFrey Ouch, it could happen
 
today was probably the funniest school day of my life
 
@SecondRikudo ww... why does the brown guy turn red after the middle frame?
 
1:12 PM
so: I'm doing an history test and it's going wonderfully, when suddenly I sneeze and my right hand gets almost completely covered in blood from my nose
 
@rlemon the lightning changes
 
He's a chameleon, duh
 
lightning in hell?
 
@rlemon well yeah, flames move
 
so during the test I could run through the class to get to the bathroom
 
1:13 PM
I suppose anything is fair game in fantasy-made-up-land
 
@Mabbage Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don'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.
 
janitors come to try and help me
 
@FlorianMargaine lighting*
 
@t1wc Your classmates must love you
 
while a stream of blood comes off my nose
 
1:13 PM
@rlemon wasn't sure, thanks
 
lightning is like, cloud electricity kinda shit
 
@rlemon Shit eh? Well he is brown
 
I ask: shouldn't there be a doctor in this school?
janitors are like: are you for realz?
 
@t1wc We never had a doctor either. There was the school nurse
 
@Neil but we have badass janitors :P
 
1:15 PM
My HS didn't have either. they had a telephone and the number for the hospital.
worked well.
 
I tried to close my nose with some wet paper...
 
Put someone in the role of a doctor for long enough, and eventually they'll be able to play the part imho
 
came out from the mouth, about to suffocate
probably half a litre of blood went away
 
saw a kid cut his thumb off in shop class. found it in the dust bin a bit later. teacher rushed it to the hospital (kid was already there).
 
it ended with me blocking the handwasher's tube with blood...
 
1:16 PM
lo
 
@t1wc Did something happen to you? Say.. went headfirst into a brick wall?
 
that doesn't happen often
 
severed digits don't look anything like I thought they would have
 
@rlemon ouch
 
@rlemon How are they supposed to look?
 
1:17 PM
@Neil nothing at all
was happily finishing my history test
 
I figured they'd be like fingers, just bloodier and, well, severed
 
@Neil no, think KFC chicken
with blood
and fat, and tendons, etc, etc
its wouldnt be a pretty sight at all!
 
@Neil like a finger :P I didn't expect a small shriveled greyish red looking cheeto
also it was covered in sawdust. the bandsaw flung it a crossed the room into the dust bin
 
the best part was my hands btw... having that much blood in my hands made me feel somewhat better
 
took a while (I honestly don't know. it was an insane day) to find it. a handful of teachers and students all looking
 
1:20 PM
like, thinking: oh well, couldn't get worse!
 
@rlemon are you ok?
 
@DrogoNevets yea, wasn't my thumb.
 
@rlemon yea but blood does funny things to people - im not expecting PTSD or anything, but you know.....
 
nahh I was fine.
blood / injuries don't bother me. I was a clumsy / careless kid. I've (semi-seriously) injured myself more times than I can count.
 
I'm posting something via jquery to a php page and then catching them on that page, but it doesn't work on my webhost, works fine on my localhost.
i'm using $.post on my script.
and checking on my php page as if(isset($_POST['items_name']))
 
1:28 PM
@KumarAbinash got a fiddle?
are you going from localhost -> remote server now? (check address bar)
 
@DrogoNevets i'm using relative path. i've hosted everything on remote server. I do not have a fiddle of it.
 
can we see it?
 
cinemabooker.com
go to the browse page, add some some items to cart and then click checkout. it doesn't display anything on the checkout page
 
blocked as an "inactive site
 
vegetarian
 
1:34 PM
its not inactive.
yeah
 
my proxy says it is so i cant help im afraid
 
@Meredith I take back what I said about humans not being very random.
 
What
 
Why did you say "vegetarian"?
 
He spelled it "vegeterian" on his site
 
1:36 PM
fuck vegetarians
 
Ah, that was just completely out of context then
 
I'm sorry about the spelling guys, misspelled it..
 
what's the common idiom for mapping an IO action over a sequnce
just forEach ?
 
there's a common idiom for that?
 
1:39 PM
here's the fiddle of the $.post i'm using.
 
If current position is irrelevant, I just use forEach/_.each
It may be slower, but I don't really care. I think it is more readable that way
 
@KumarAbinash so you call the same page via ajax and then navigate to that page?
 
@DrogoNevets no, the jquery post script is on my browse.php page, i post to the to the checkout.php page and then redirect it to checkout.php page.
 
one thing that scares me in js is that I can remove a function
and it will still load
and until I try to use it, it won't tell me
so it could lay there for months unfixed
 
uh weird. visual studio successfully compiling something that shouldn't successfully compile.. brilliant
 
1:42 PM
@KumarAbinash that fiddle has checkout.php twice
 
solution: call every function at the top of each page
 
@Meredith Now you have a maintenance nightmare
Not to mention that's not very practical
 
It was a joke ok
 
@DrogoNevets no, imo first its making an ajax post to the checkout.php, and then upon success its redirecting to the checkout.php.
 
I don't get satire. I'm an engineer
 
1:50 PM
@KumarAbinash thats exactly what i said
 
@DrogoNevets, I'm sorry, I don't understand where i'm wrong. I need to go to the checkout page after its posts the data to the checkout page. I think that's the way to do it, isn't it?
 
@KumarAbinash im not syaing you are wrong, just questioning why your doing that, there is nothign wrong with the JS that i can see
 
@DrogoNevets, I need to pass all the data to checkout page from browse page. That's the way i came up with. Is there any other way to post it to the checkout page and also redirect it to that page at the same time(Like submitting a form)?
 
@KumarAbinash as i said there is nothing wrong with the JS
 
1:55 PM
have the server redirect after handling the post
page posts -> server gets post, handles it, does a redirect -> client sees new page
 
ths answer would help
2
A: how to keep the email and password if the browser is refreshed in my keep logged in function

MADTerryYou set variables in server side when user clicks check button.Probably by using AJAX. And then use them in your page when you display the page. Here is jquery: $(document).ready(function(){ $('#sumbit').on('click', function(){ window.location.replace("profi...

 
@DrogoNevets, ok then on my php page i should be able to catch the information with
`if(isset($_POST['items_name']))`
and I'm able to get it to work on my localhost, but i can't figure it out what's wrong when i run it from the webhost
 
in palce of alert( "Data Loaded: " + data );
use window.location=data ;
& echo url in savestate.php
 
and both pages are in the same folder?
 
yes
Should be
you can use absolute url
 
1:58 PM
@KumarAbinash see my last post, forgot to say reply to message
 
@DrogoNevets yeah, I got it. yes both are in same folder.
 
@KumarAbinash what does the JS console return??
 

« first day (1312 days earlier)      last day (3647 days later) »