« first day (1432 days earlier)      last day (3517 days later) » 

5:03 AM
@Zirak oh wonderful.
!!forget ugt
 
@SomeKittensUx2666 Command ugt forgotten.
 
@SomeKittensUx2666 Command ugt learned
 
THERE we go
 
5:05 AM
@Datsik omg hi
 
Hiii
 
m59
hey @Datsik !
Dang man, last time I saw you here, I was a jobless noob.
Now I'm an employed noob!!
 
@Datsik You're not dead yet?
 
@Datsik you never accepted my fb invitation
 
hi @m59, you there?
 
5:17 AM
@taufique 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.
 
@CapricaSix, thanks. I am here for the first time, So, I didn't know the rule. :P
 
5:33 AM
@rlemon that's winning
 
@BenjaminGruenbaum rlemon is afk: goldfish is on fire. ლ(ಠ_ಠლ)
 
Oh hi @Datsik , how have you been? Mornin
 
I am trying to insert a Jade block dynamically into a div when a specific button is pressed. How can I do it? I know how html code can be inserted, but don't know about Jade.
 
m59
@taufique hey
I gave you every option including code :)
did you not understand my answer?
 
5:39 AM
@taufique she's our bot
> Haskell is like a hipster version of LISP.
YUP
 
m59
"PHP is this hand-me-down deathtrap that you only use because you're stuck with it, and when you hit a speed bump the wrong way it sets you and your passengers on fire."
hahahahahahaha
I'd like to see a video of this
 
JavaScript is a golf cart. Haven't heard that one.
 
m59
:'(
 
@m59 , oh, I thought you are not here.
 
m59
I'm almost always here, unless I'm asleep
Or...things
 
5:46 AM
and stuff
 
That's a pretty sexy looking golf cart
 
As a newbie I didn't get the answer the clearly. Would you please explain what you were doing?
 
m59
It's rather hard to explain it in any more detail.
Where is your jade code?
(please try to reply quickly... I've been coding for 14 hours and would really like to play some video games right now) :)
 
Dafuq! Sublime just crashed!
That's never happened, to anyone, ever!
 
okay,wait a bit. :P
 
m59
5:50 AM
@taufique oh, you're busy?
This is such a simple thing, it should really only take us a moment
 
not busy really.
I deleted the code
so I am writing it again
 
m59
The jade you want to use, where is it?
In a jade file (I assume)?
 
each val in territorryList
if val.id == selectedAreaId
button.btn.btn-custom-column-header.btn-block=val.name
 
m59
yes... where is that?
 
territoryList is passed as parameter from res.view()
 
5:52 AM
@taufique What in the name of all that is merciful is THAT?
 
m59
So all of this is on the server
@taufique are you using express?
 
this is in server but not in one file entirely
sails.js
 
m59
no matter
 
i have area.jade file in server
 
m59
Do you know how to setup the server so that you can type a url in the browser to access the jade you are trying to use?
 
5:53 AM
above section is part of that file
 
m59
The final product is what I'm referring to (the stuff you want to use on your page)
 
sorry, didn't get it.
 
Oh, so Sublime's crashing because it's trying to hotload a file on a server that it no longer has a connection to. That's stupid.
 
m59
let's say this is the html output you are wanting to use (compiled from jade)
<p> Hi! I'm html! </p>
 
hmm
 
m59
5:56 AM
Do you know how to make a page like that from the server?
 
yeah
p Hi! I'm html
 
m59
Then setup a route and serve it from there
Yes, that's the jade, but you need to serve it
 
That's done
 
m59
what's the url?
 
something like this
 
m59
5:57 AM
and if you go to that, you'll see the html that you want to use?
 
yes
 
m59
Then just use ajax to that url
 
problem is somewhere else
 
m59
$.get('/area').then(function(html) {
  #(myElem).html(html);
});
I can't remember jQuery's promise api, that might need to be resp.data
.then(function(resp)
 
no, that's fine.
Only Angular does resp.data , jQuery resolves the XHR with multiple parameters because they didn't understand promises very well when they begun using them
 
m59
6:00 AM
ah
 
this is how I am doing it
I am building html for button
and appending it in div
 
m59
I have no idea why you're doing that :)
 
Okay I am explaining it again.
 
m59
you have data and jade on the server
process the jade and serve it!
then grab it with ajax and add it to the page
this is very simple.
 
div is built dynamically depending on data from a javascript function
 
m59
6:05 AM
what div?
and what data?
 
Please let me explain it elaborately
 
m59
go for it
 
from server side I am calling res.view('area.jade', {territoryList: [....]})
now, in the client end there is a button say b1 and there is a div say d1.
when b1 is pressed,
 
m59
stop
 
HAMMERTIME!
 
m59
6:07 AM
lol
Do you mean that res.view('area.jade') creates the page that you're now referring to?
 
yeah
 
m59
well, that means we weren't at all on the same page before. I wasn't asking about that. Anyway, continue.
 
now when b1 is pressed,
there will be a button in d1 for every element in the passed parameter territoryList
The way I did is,
when b1 is pressed I called a function say f1
In f1,
I used looping to generate html for every button in d1 and called$('#d1').html() to add it to d1
 
m59
ok pause
What does any of that have to do with jade?
 
Okay
I wasn't writing any html code
I was writing only jade
now how can create that html for button with jade and still add it to the div d1
 
m59
6:13 AM
That doesn't make any sense
I doubt you mean what you seem to mean.
You want this to work?
 
Which one?
 
m59
$(myElem).append('p This?');
Just so you can write jade instead of html?
 
I knwo it won't work.
But is there any workaround ?
 
m59
Sure, it could if you follow my answer, but that is a terrible idea.
Why would you do that??
Instead of $(myElem).append('<p>This?</p>');
 
For no reason, :-P just to check if it is possible.
 
m59
6:15 AM
Then just as I said, include the jade script and compile it
$(myElem).append(jade.compile('p This?')());
 
Would that work?
 
m59
Dude, I gave you a working live demo demonstrating that exact thing.
 
In my case, I would just build jade string and compile with jade.compile().
Is that what you are talking?
 
m59
why build a jade string?
 
for button
 
m59
6:18 AM
jade is a template engine...
 
for every button html will be different
 
m59
then template it that way
 
Who's got the right to remove comments in question answers?
 
m59
which leads me right back to what I said was the answer to begin with
@taufique you really don't understand jade
 
Actually no. :-P
 
m59
6:21 AM
do you think it's just for writing html without brackets?
 
This is the first thing I am working in Jade
What I understand is,
Jade is for generating html code simple.
 
*simply
 
m59
if you really understood that, you wouldn't be generating jade code with javascript
let jade do the generating.
See my example ^
jade IS javascript anyway.
 
Okay, got it.
:)
thanks.
 
m59
6:26 AM
@taufique however, as I suggested in my answer
it makes more sense to send the data to the server where the jade template is
process it on the server, and respond with the process template
so that your client side code is simply:
$.post('path/to/template', myData).then(function(html) {
  $(myElem).html(html);
})
Your server can already process jade, so that makes a lot more sense
in express:
app.post('path/to/template', function(req, res) {
  // i forgot the code for this, but something like:
  res.render('path/to/jade/file', req.body)
});
 
@m59 Thanks again. :)
 
m59
@taufique sure thing
 
Now you can go and play video game :)
 
m59
;D
 
Hi all
i'am using a datepicker from keith-wood.name/datepick.html
i need to provide three datepicker in my page, when first and second dates are selected, the third will display dates between only two dates.
 
7:00 AM
Anyone here familiar with nopCommerce please?
 
7:12 AM
Good morning :)
Anyone an idea how I can move the green div into the table ? Totally stuck #!#:s
http://jsfiddle.net/duikboot/z12uoe91/
 
@Duikboot Why not creating new row?
 
7:31 AM
oh
Maybe I forgot to mentoin @DrogoNevets this has to be done with jquery there is no option for me to change the dom/ html structure
 
cv and dv :D
Morning all :)
 
@DrogoNevets :D
 
@rlemon the human race becoming cyborg in the next 50 years iirc.
 
7:44 AM
@mikedidthis rlemon is afk: goldfish is on fire. ლ(ಠ_ಠლ)
 
@CapricaSix its ok, the fish will soon be a cyborg.
 
@mikedidthis i'd say we will extinct
if machines gain real conciousness
they already beat our ass in chess and jeapordy
they make less mistakes
 
Those new code snippets <3
 
8:00 AM
@Cerbrus hi
 
Hi
Just tweaked my two best scoring answers to include the snippets :D Kinda annoying the editor used tabs instead of spaces, though.
 
I know, I upvoted one of them.
 
good mornin
 
Mornin!
 
@Cerbrus can I add you on fb?
 
8:06 AM
Eh, no. I only add people I actually know on Facebook.
My FB isn't visible to you guys, is it?
 
Yes it is, Tom
 
you are windows and I am linux, our love is like ethernet b/w us.
 
@Cerbrus But we will meet in October.
:(
 
We will?
That's news
 
!!s/Tom/Michiel/
 
8:12 AM
@BadgerGirl Yes it is, Michiel (source)
 
When and where are we suposed to meet then, @badgergirl?
Okay, who the fuck are you.
 
In Amsterdam.
meow may I help you?
 
Tell me who you are. You obviously know my name.
 
Do you want to add me on Facebook?
 
Stop avoiding my question.
 
8:15 AM
Someone's angry
 
!!urban facebook
 
@AwalGarg facebook a stalkers dream come true
 
hahaha
 
Hell yes I am. I don't take kindly to this kind of harassment.
 
Jul 23 at 14:23, by Cerbrus
My name, "Michiel" has been pronounced as "Michael", "Mishel" (phonetic), "Migel"... Sure, it's a dutch name, but I'd assume a fellow dutchman would know how to read and pronounce that second goddamn "I" in there!
 
8:17 AM
Geez, stalker much?
 
:(
Sorry
 
That's old
 
I just remember everything people write :(
 
So that's where you got my name. Now what is this about us supposedly going to meet?
 
That was an invitation to meet. I'm moving to Germany in October.
 
8:20 AM
10 mins ago, by Badger Girl
@Cerbrus But we will meet in October.
 
if you want to...
 
Yea, that doesn't sound like an invitation at all.
 
The entire human and cat population is going to get trapped in Amsterdam in October.
btw, are stacksnippets live or something?
 
HI awal, copy, badger
 
@AbhishekHingnikar hey :)
 
8:21 AM
Let's put it this way: eval(alert("hell no."))
 
whats up ?
 
o/ @AbhishekHingnikar
 
@Awal: they are :D
 
@Cerbrus I am still unhappy they didn't use jsfiddle...
 
I am using line height
 
8:22 AM
Fiddle is unreliable
That's the whole point of the snippets
 
since when?
 
@AwalGarg even before browsers were invented
 
Since it has the tendency to be slow as fuck to load
 
well I am using it to center the text in the dov, but it not seem to work on smaller screens :/ ...

http://jsfiddle.net/bjojyfLz/
 
oh also
@rlemon I can't find anyway to right an smtp userscript. google didn't help. And yes, I decided not to use "anyone's" server... I want to do that in plain javascript.
 
8:24 AM
@AwalGarg rlemon is afk: goldfish is on fire. ლ(ಠ_ಠლ)
 
-2
Q: "Uncaught TypeError: undefined is not a function" in JavaScript code block

mithunsatheeshI have a JavaScript code block like below in my html page. When I run this. I am getting below output on my browser console. outer world Uncaught TypeError: undefined is not a function Can you please help me understand why it is happening so? update : If you can see, no where in the...

 
@dystroy i think since it's SO not code-review we should let the answer accepted if it works fine
obviously it's OP's responsibility to understand the consciences of the bug
 
hi all
 
@Julo0sS 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.
 
8:29 AM
may i ask you some help about a topic i just opened?
 
@Julo0sS If i say "no" then, it would stop you from asking ? :P
 
@Julo0sS is it about jquery?
 
yep
jquery updating selected items into a select
un-onebox
can't get out of this maze...
 
un-onebox that please.
 
how?
^^
 
8:31 AM
http://stackoverflow.com/questions/25884081/uncaught-typeerror-undefined-is-not-a-function-in-javascript-code-block
Hi, I wanted to share a strange behaviour I got while I was experimenting with my javascript code and posted the above question. Can you tell me how exactly does it ask for a debugging request as one of the comments say? I was just asking for a reasoning to understand the concepts better. But why so much hatred?
 
that's it. Thanks
 
well, i deleted the link... did not really "un-oneboxed" it^^
http://stackoverflow.com/questions/25885239/multiple-update-sel‌​ected-item-in-list-with-jquery-on-click
 
@Julo0sS add the words [tag:un-oneboxed] in front of the link.
 
thx!
 
np
 
8:34 AM
I understand that grooveshark wants to save bandwidth by not buffering too much ahead, but when the song download's at a snail's pace, at least give me the possibility to wait for the song to load so I can listen to it..
Ugh
 
I updated it, but not sure how can I make span come in center verticly and horizntly
even this not working :( stackoverflow.com/questions/114543/…
oh sorry, it works for widths, just not for height
here's the latest -_- jsfiddle.net/bjojyfLz/3
 
@AwalGarg : no idea? (if you had time to read the problem, you agree it looks a bit strange...)
 
@Julo0sS sorry I don't do jquery. If you can port your problem to Vanilla JS, I would love to help :)
 
i already have enough difficulties to do it with jquery so i don't think i'll port it to VJS :P
hehe
any jquery pro in here? :)
 
I'm comfortable using jQuery...
 
8:47 AM
@Julo0sS dystroy is. he is also very helpful, just ping him once.
 
okay cerbrus, so you may help :)
here is my problem : http://stackoverflow.com/questions/25885239/multiple-update-sel‌​ected-item-in-list-with-jquery-on-click
 
Depends on the issue
 
@dystroy : heyy :) may you help me pls with jquery?
well, just have a look, i'll be glad if you can help
 
@Julo0sS Hello, do I know you ?
 
well, no^^ but i'm looking for a jquery pro to help me solve my problem, Awal Garg told me to ask you...
sorry if i disturb^^
 
8:49 AM
Just ask your question, don't random ping, don't insist. And please have a look at the rules.
!!/welcome Julo0sS
 
@Julo0sS 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.
 
thx, but i don't random ping or even insist :
@Julo0sS dystroy is. he is also very helpful, just ping him once.
 
hahaha
 
my question is a bit complicated, i have a problem to update data, but only with the <select> elements
here is the link : http://stackoverflow.com/questions/25885239/multiple-update-sel‌​ected-item-in-list-with-jquery-on-click
 
@Julo0sS instead of event.stopPropagation, try event.preventDefault()
 
8:59 AM
Hi guys...
is anyone worked with IndexedDB ?
 

« first day (1432 days earlier)      last day (3517 days later) »