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

2:00 PM
lol what?
 
w3schools offers bs 'certificates' that no one cares about
 
@SecondRikudo bravo man! you managed to put 'jQuery', and 'w3schools' and 'certificate' in the same sentence! You are god :P
 
o
hello
? I converted a php array to JSON, but really what I need is the key to not be in quotes, should I do this in PHP or JS and how would I do it?
 
hello, funbean
your beans are quite fun ;)
 
thanks!
 
2:03 PM
@rlemon @SecondRikudo can I get a link to the docs for hidden to know more about it... I couldn't find one from google.
 
the keys have to be in quotes, because it's JSON
 
@AwalGarg Look it up in the specs
 
user2620028
I have every certificate that w3schools offers!
.... for the love of god i am kidding ....
 
@SecondRikudo you mean the w3 specs?
 
I don't think it's out there
Yeah
 
2:04 PM
ok
@SecondRikudo ah well, link to the spec? ;p couldn't find it
 
ah got it.
@SecondRikudo nice thnx
 
@ral
@RalphWiggum can I make it not JSON? by converting it somehow?
 
el.hidden = (el.hidden)?false:true;
guys this is also not working
 
@FunBeans why?
 
2:10 PM
@AwalGarg el.hidden = !el.hidden
 
@AwalGarg ew
 
@FunBeans why do you need the key to not be in quotes?
 
thats the way a YUI datatable wants the data
 
YUI datatable wants a string?
 
@SecondRikudo still doesn't work.
 
2:11 PM
@FlorianMargaine data = [
{Company:"Company Bee", Phone:"415-555-1234", Contact:"Sally Spencer"},
{Company:"Acme Company", Phone:"650-555-4444", Contact:"John Jones"},
{Company:"Industrial Industries", Phone:"408-555-5678", Contact:"Robin Smith"}
],
 
@JanDvorak why? oh right
 
@FunBeans maybe with a regex
 
@AwalGarg because of what Sec said
 
@SecondRikudo not sure why its not working for me... second time this same day.
 
2:12 PM
@AwalGarg jsfiddle.
 
@SecondRikudo yeah it is working there on jsfiddle, but not on local pc.
 
@AwalGarg Try to reproduce on jsfiddle
 
ok wait.
 
what is the issue?
jsfiddle.net/oqt90e48/1 with your data
 
@rlemon I'm getting some data using php and putting it into an array and then using json_encode (don't have to though), and its getting it really close to what I need but the quotes in the key seem to messing YUI up.
 
2:16 PM
so JSON.parse it on the other end?
 
@SecondRikudo ok I got it. I have to have display set to none by default. I thought js would override it but it didn't... solved now.
 
!!> JSON.parse('[{"Company":"Company Bee","Phone":"415-555-1234","Contact":"Sally Spencer"},{"Company":"Acme Company","Phone":"650-555-4444","Contact":"John Jones"},{"Company":"Industrial Industries","Phone":"408-555-5678","Contact":"Robin Smith"}]')
 
@rlemon [{"Company":"Company Bee","Phone":"415-555-1234","Contact":"Sally Spencer"},{"Company":"Acme Company","Phone":"650-555-4444","Contact":"John Jones"},{"Company":"Industrial Industries","Phone":"408-555-5678","Contact":"Robin Smith"}]
 
eh
strings as keys works
your issue is something else.
(not to mention, in an object, I'm pretty sure all keys are strings
 
@rlemon thanks! I'll plug away a bit and see.
 
2:19 PM
var obj = {};
obj[1] = 2;
Object.keys(obj)
["1"]
yup
 
btw, @SecondRikudo I want to know, why was my orginal style.display method buggy?
 
@rlemon you're so patient
 
@AwalGarg first click there is no display, it sees it isn't none, sets it to inline block
?
 
@rlemon I know, and that's why, I did set the display to inline-block but it still didn't work.
 
in HTML / CSS / WebDesign, 21 secs ago, by Patsy Issa
@rlemon ever published an npm package ?
@FlorianMargaine
@AwalGarg fiddle or gtfo
it is working for everyone but you ;)
 
2:23 PM
@PatsyIssa yeah I have
 
@rlemon fiddle is lagging for me today.
bbiab
 
@rlemon What exactly happens when you use an object as a key?
 
@AwalGarg jsbin then
 
Hey anyone can help me with a regex here ?
 
@Pilouk 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.
 
2:24 PM
@rlemon we finally got Netflix in Austria!! BRRROOOOOOO!!
 
@Kippie can you?
@OctavianDamiean BROOOOO
 
var obj = {}; var kobj = {};
obj[kobj] = 2;
Object.keys(obj)
["[object Object]"]
 
Seems like whichever (defined) object you pass to the indexer, it'll always return 'moo'
 
2:24 PM
@Kippie toString is called on it internally
so yea, that is expected
 
oic
 
@FlorianMargaine writing my first package, looking at the docs atm and trying to figure out if i need to add tests or not
 
Question : I want to delete the 3- in front of this address with regex : 3-525 39 St N, Lethbridge, AB T1H 5B8 thisi s what i have so far ^\d+(?=\s*[0-9\s]*[a-zàâçéèêëîïôûùüÿñ.'-]+)
 
@PatsyIssa you don't need to
 
But I should :P
 
2:26 PM
this is the minimum required
 
Perfect :D
 
user1596138
@NickDugger what were you photoshopping me for? lol
 
breasts
also @OctavianDamiean YAY!
delayed
 
@OctavianDamiean neato
 
my goal is to have 525 for result
 
user1596138
2:35 PM
@rlemon I never saw more breasts that's kinda why I'm wondering haha
 
!!> var parts = '3-525 39 St N, Lethbridge, AB T1H 5B8'.split(' '); var first = parts.splice(0,1)[0].split('-'); parts.unshift(first.length > 1 ? first[1] : first[0]); parts.join(' ');
 
@rlemon "525 39 St N, Lethbridge, AB T1H 5B8"
 
who needs regexp
 
user2620028
Can you use a .map on the returned value of document.getElementsByClassName ?
 
2:38 PM
no
 
@rlemon me
 
getElementsByClassName returns a nodelist (or htmlcollection, I can't remember)
 
user2620028
html collection
 
@Pilouk that wasn't a question, it was a statement
var parts = '3-525 39 St N, Lethbridge, AB T1H 5B8'.split(' '); var first = parts.splice(0,1)[0].split('-'); parts.unshift(first.length > 1 ? first[1] : first[0]); parts.join(' ');
> "525 39 St N, Lethbridge, AB T1H 5B8"
no regexp required
 
Well anyone is good with regex?
 
2:39 PM
ugh.
 
@rlemon sorry i really need regex
 
why?
 
@rlemon performance / and using in perl
 
@Pilouk your browser is, or goto regex101.com and keep experimenting
 
what makes you think the performance will matter or be better? and why ask the js room for a perl question?
 
2:42 PM
@rlemon perl regex is the same as java one
 
this isn't Java mate
 
@rlemon js*
@rlemon but it'S cool mate if you can't
 
with some time I'm sure I can
but it is still a strange requirement
!!> '3-525 39 St N, Lethbridge, AB T1H 5B8'.replace(/^(\d\-)/,'');
 
@rlemon "525 39 St N, Lethbridge, AB T1H 5B8"
 
Ain't sure why hidden is not working for me but for the time being, can I use this since it is working perfectly
el.style.display = (el.style.display!=="inline-block")?"inline-block":"none";
 
user1994804
2:48 PM
Howdy Everyone,
 
@AwalGarg dude
make me a demo
stop wasting your time
 
user1994804
I've got a problem that is probably incredibly simple to resolve but I have tried everything I can think of to make it work but one ffile is overwriting the other
 
user1994804
Please see lines 186 and 187 here: view-source:classifieds.your-adrenaline-fix.com/…
 
user1994804
Why won't that work?
 
variable name conflicts
change your argument name to something else?
 
user1994804
2:51 PM
I don't know why one is overwriting the other. I have 2 div's defined
 
(first assumption, haven't looked at the code very hard)
 
@YourAdrenalineFix can you isolate the code?
 
user1994804
I've even tried creating a new instance of the functions and variable
 
user1994804
s
 
and by "not working" -- elaborate
what isn't working
what do you expect to happen
 
2:53 PM
@YourAdrenalineFix we can't see your PHP code...
 
user1994804
I expect to return info from 2 different files
 
hola
 
user1994804
If I comment out 186 or 187 the page requested returns info
 
user1994804
if both of them run as I have it, the 2nd trip just overwrites the 1st
 
should this work in jQuery $('#my_id .my_class').append("<p>sfsdfsdf</p>");
 
user1994804
2:55 PM
and I even have 2 different divs that the info goes into
 
document.getElementById(thediv).innerHTML = xmlhttp.responseText;
how do you expect to know if you've seen both or not?
 
user1994804
Lines 77 & 78
 
innerHTML += value // appends the data
 
@JoJo does the id have that class? if yes don't space them if no put a comma in between
 
0
Q: Ipad Exchange app going to working on iPhone as well ? or we have any timeline

Customized Namewould this app going to work with iPhone as well or if we have any timeline for iPhone app. I know there are couple out there which are not official apps and they look awful... Help us test the new Stack Exchange iPad app

rub my question with your votes
 
user1994804
2:56 PM
@rlemon I dont know?
 
oic that now
 
Or are you targeting the child of that id that has the class? @JoJo
 
@PatsyIssa ty very much, it is a child class
yes
 
@JoJo if it's a child then syntax is fine
 
spotted it
 
2:57 PM
argh.. ok I will try a jsfiddle, ty
 
xmlhttp is global
you over write each request object
make it local to that function
@YourAdrenalineFix
 
user1994804
@rlemon document.getElementById(thediv).innerHTML = xmlhttp.responseText; should still work the way I described
 
user1994804
"thediv"
 
user2620028
hey lemon can you look at my fiddle really quick, i can't tell if my js is fucked up or if something weird is happening with the http request for images lmao
http://jsfiddle.net/zxwpqscp/6/
 
44 secs ago, by rlemon
xmlhttp is global
 
user1994804
2:57 PM
ok
 
user1994804
How do I make it local?
 
before you do the if( window.XmlHttpRequest ) just declare it
var xmlhttp;
 
@YourAdrenalineFix just use anonymous function
 
user1994804
?
 
user1994804
a what?
 
2:58 PM
@PatsyIssa comma fixed it for sure
 
function ShippingData(thediv, thefile, SellerBuyerLocation) {
	var xmlhttp;
	if(window.XMLHttpRequest) {
done
 
user1994804
I've barely muscled this out...
 
@JoJo comma seperates the selectors
 

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