« first day (943 days earlier)      last day (4230 days later) » 

00:00
each time this part of page is loaded by ajax
@begiPass great, which part in your attempt are you stuck on?
I tested to set the value in the onchange of the input
but no result
@begiPass show us what you have tried jsfiddle.net
anybody care to please explain me why this isn't working? jsfiddle.net/Kqhw6
Thanks in advance! ;)
sorry I canno't use jsfiddle
00:02
@nunos you're invoking a function instead of passing it to your setInterval
hm.. so I should change update() to just update ?
because, I don't work directly by js
also, I am getting a start is undefined on clicking the Start button.. :s
I use it in jsf application
00:04
@begiPass I don't care, if you can't make a fiddle we can't help you. I don't care what backend you're using, that's irrelevant. You can still make a fiddle.
@BenjaminGruenbaum Thanks! ;)
@nunos you're welcome, here's homework en.wikipedia.org/wiki/Unobtrusive_JavaScript use event handlers instead of onclick attributes :)
Hello guys
I am very sad :'( i clicked on my own adsense by mistake 2 times :'(
@nunos, also, if this needs very precise timing, you should know that setInterval isn't very accurate
@BenjaminGruenbaum I think I need oncomplete but for input
to set this value
00:06
@begiPass, we are free help. Put effort in, or you will get what you paid for.
@begiPass I don't care. Make a mock JSON request to /echo/json or something.
I need help. I'm trying to replace ".svg" with ".png" in background-image values for browsers that don't support SVG, but I'm unable to check whether there is ".svg" in the property. Tried the following:

element.style.backgroundImage
window.getComputedStyle(element).getPropertyValue('backgroundImage') (returns nothing)
window.getComputedStyle(element).getPropertyValue('background-image') (returns "none" for every element)
Just in case.

http://11bouchardg.decmultimedia.ca/myriam_coiffure/

Lookie, there's obviously a background-image on my "test" div.
Browsers that support getComputedStyle but not .svg?
@Ariane, just use modernizr
I didn't know getComputedStyle was something that wasn't widely supported.

But anyway, right now I've commented out my Modernizr check, and testing on Firefox 20.0.1, so getComputedStyle should work.
00:13
Okay so you're using modernizr?
@BenjaminGruenbaum thank you for your responses, I resolved this by run this function on oncomplete of submit button :
function copieralors(){
$( ".taux_paye_input" ).each(function() {
$(this).prev().text($(this).val());
});
}
@phenomnomnominal I already do. It checks whether the browser supports SVG. Now I need to check whether an element is SVG to replace it.
Just wait until the tests have run then assign the background image manually
@phenomnomnominal thank you also
My current code:
$(document).ready(function() {
	//if(!Modernizr.svg) {
		$('*').each(function(index,element) {
			var curBgImage;

			if(element.tagName=='img') {
				if(element.src.match(/'.svg'$/)) {
					element.src=element.src.replace('.svg','.png');
				}
			}

			curBgImage=window.getComputedStyle(element).getPropertyValue('backgroundImage');
			if(curBgImage.match(/'.svg'/)) {
				element.style.backgroundImage=curBgImage.replace('.svg','.png');
			}
			if(curBgImage && curBgImage!='none') {
				console.log(element+' - background-image: '+curBgImage);
00:16
Inspect ALL the elements!
Isn't that what $('*').each does?
you already have jQUery
why not just use .css() ? etc
@phenomnomnominal Dunno, felt simpler this way.
$('*').each(function(index,element) {
			var curBgImage;

			if(element.tagName=='img') {
$("img").each is too mainstream
00:19
@Ariane, i promise it isn't
$('
@BenjaminGruenbaum I need to check all elements for background-images too, and I thought running two jquery loops would be slow
this is just silly
what advantage do you get by having svg background images?
A much prettier website and no need to worry about PNG sizes ?
I almost never use pixel images, apart from photos.
okay, well why don't you at least add a class to all elements with background images
then you don't have to iterate
A class whose use is only to make JS easier? That'll anger the gods of semantic HTML.
00:24
no it wont
it's completely semantic
<div class='hasBackgroundImage'>
oh well, lunch time.
It's not. It's redundant. The existence of a background-image property already means there is a background image.
no it doesn't
Do the simple thing.
all elements have that property
it's just not always set
It definitely is. And that's playing with words. Read "no background-image property" as "background-color property set to none", will ya?
00:28
Keep it simple, stupid
I don't keep things simple. I try to make them right. And you won't convince me that it's all right to add a class that adds no meaning to the element.
It doesn't really matter what you think, you're rejecting a simple, valid solution that will improve the rest of your code.
It DOES add meaning
It doesn't, since you can already fetch that information.
Everything Should Be Made as Simple as Possible, But Not Simpler
It means that that element belongs to the group of elements you want to possibly swap the background images of
00:30
It's like, if you don't know to check whether text is bold, you add class="LookThisIsBoldEvenIfThisClassIsntTheOneSettingItToBold" to every element.
HTML: <div class='bold'>
CSS: .bold { font-weight: bold; }
$('.bold').remove();
vs:
$('*').each(function(index, element) { getStyle(); checkFoldBoldness();doSomething();})
Occam's Razor
By your logic every single CSS class is redundant because you could just iterate over all properties of all objects and add them to an array if they have the right set of properties with the right values.
A CSS class is meaningful if:

-it adds style
-it groups logically similar elements together if they aren't already.
EXACTLY
Cool, we agree. I'm hungry
And what you intend to do with your elements doesn't make them logically similar.
@Ariane a potential solution for you would be to attach to img.onload
00:35
@adkatrit Sounds good, however it doesn't manage background images.
@phenomnomnominal Enjoy food
hmm
and there's no way for you to change these image references in someplace else besides javascript?
it seems like a bandaid
ahh i see this is a polyfill nvm
well there is one other way
.svg #mySpecialDiv {
    background-image: url('blah.svg');
}

.nosvg #mySpecialDiv {
    background-image: url('blah.png');
}
Adding a class to my CSS for each element? Ew.
You're trying to do something that is eww.
Expect ewness.
00:43
has anyone ever notice their links are unclickable on iphone/ipad?
WTF.
curBgImage=$(element).css('background-image');
^curBgImage is always 'none'. Clearly there's a problem.
@KevinMurphy Are they just too small to aim at with a finger maybe?
@Ariane no i think this company is using depreciated tags around their links.. sigh.
crosses fingers
nope that's not it. yikes.
I didn't think there were browsers that went as far as not support deprecated tags at all.
apparently it's an issue within bootstrap a lot of people have posted about
@Kevin Try adding a huge obvious simple link at the top of the page. If that one bugs, you know it's a global problem.
00:46
@MilanMilosevic 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.
it's not inside a dropdown.. it's just a plain link
Try it anyway. Maybe that link is being affected by a script or something.
I know the link in my nav bar still works
Then... Time to inspect the script. Can't help you much more. :/
Well I found the script that causes it pretty easily
00:54
Maybe there's something that prevents a link from behaving properly (return false;) that's selecting a whole bunch of links instead of just those that they intended to make another behaviour for.
  if (myHeight < (total + 150)) {
    $('.fixedspan3').css('position', "relative");
    $('.fixedspan3').css('z-index', "-1");
  }
Well it's that z-index that's doing it. hmm. i don't even think I need it.
@KevinMurphy You don't need to retarget the element, and you can declare both styles within the one .css method
@monners i figured. how would that look?
$('.fixedspan3').css({
    'position' : 'relative',
    'z-index' : -1
});
00:57
ah. thank you very much!
Sigh, someone help me figure out why every element has a background-image of none according to Javascript.
$('*').each(function(index,element) {
	curBgImage=$(element).css('background-image');
	console.log(curBgImage);
	console.log(window.getComputedStyle(element).getPropertyValue('background-image'));
});
Both are none. For each element.
OOP stands for "Oh Oh! Poop!"
You could add a class to every element that you want to access
^ TipRanks winning Finovate :)
You should know I have no intention to do that. Anyway who cares about how I select my element? I should be able to check an element's CSS with those functions, regardless.
01:08
@BenjaminGruenbaum nice!
@Ariane it works for me
@phenomnomnominal http://11bouchardg.decmultimedia.ca/myriam_coiffure/
Open the console and load the page. It doesn't for me.
I'm not sure what it means ^_^ We applied to Finovate thinking we have little chance to beat companies like Adobe, just presenting with the best sounded like a huge honour to me.
Anyway, I figured I'd ask you a lot of coffeescript questions today, but it's really pretty simple :)
Wtf. Your browser?
01:10
@BenjaminGruenbaum, you're gonna be rich!
@Ariane Chrome latest
@BenjaminGruenbaum, yeah dude, it's simple and nice
@phenomnomnominal Lemme try on Chrome.
@phenomnomnominal Haha, my brother maybe, I just hopped along to help him out
@Ariane, also try 'backgroundImage'
@phenomnomnominal Tried. Doesn't change anything inside .css(). And yeah. It works on Chrome. Why doesn't it work on Firefox? T_T
Also, Knockout plays really nicely with knockoutjs
The @ binding for this is a nice touch, and it's class based by design, so it just works well
Also, the way => and -> work
01:13
Yeah @ and => are my favourites
@phenomnomnominal I'm lost. I google this and there doesn't seem to be a problem with Firefox and checking background images with JS.
@Ariane, why don't you just save yourself some time and try to reconcile one of the other solutions?
@Ariane Have you tried just using 'background' ?
@phenomnomnominal Because that's fleeing the issue, and because of the reasons we discussed earlier.
@monners Lemme try
Your solution is really really not good
01:16
@phenomnomnominal You have your opinion and I have mine; doesn't change the fact that there's a bug.
Can't... Can't we all just get along?
@monners Tested. It does the same. All "none" on Firefox; working on Chrome.
You're iterating over potentially thousands of elements
checking for a property that you yourself have proven is buggy and inconsistent
LOL, even IE gets it right.
@phenomnomnominal I've never heard about Jquery .css() being buggy and inconsistent.
@Ariane Have you heard about browsers being inconsistent and buggy?
01:18
Maybe not, but you're demonstrating it right now?
IE? Yes. Firefox? No.
@phenomnomnominal I think there's something I'm doing wrong. People would've complained about it by now...
I'll try it in FF
Trust me, FF has it's fair share of quirks. Actually, all browsers do. Even Chrome
Works in FF for me
[13:19:50.738] none
[13:19:50.738] none
[13:19:50.739] linear-gradient(rgb(67, 166, 226), rgb(39, 122, 193))
[13:19:50.739] linear-gradient(rgb(67, 166, 226), rgb(39, 122, 193))
@Tyler 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.
01:20
@phenomnomnominal Version 20.0.1?
i need help , i assigned and event listeniner to a div, as i can't parse more than one parameter, how can i know from the function it calls which div in question the event listener is assigned to ?
And on your site
@phenomnomnominal Using Firebug?
[13:21:42.587] none
[13:21:42.587] none
[13:21:42.587] url("http://11bouchardg.decmultimedia.ca/myriam_coiffure/images/scissors.svg")
[13:21:42.587] url("http://11bouchardg.decmultimedia.ca/myriam_coiffure/images/scissors.svg")
No, just the standard web console
01:23
does eventlisteners carry the div id/class name it is assigned to :S ?
@phenomnomnominal Eh, never used that. How do you get console.log stuff to show up? I opened it but I don't see the stuff I've set.
@Dave Have you tried "this"?
hm ?
@phenomnomnominal Never mind.
@DaveRandom The keyword this. It points to the object the event is currently affecting.
@phenomnomnominal Still not working on Firefox for me... xD Think I should reinstall it? o.o
@Ariane as i see :) thank you my friend
I'm off to reinstall Firefox. BRB.
01:31
Octavian any word on Ubuntu Touch? Says that I can send SMS and phone calls and crap from the webpage which is all stuff you said that I should be able to do
You should always put at the start of your HTML files a comment for browsers that don't handle HTML
01:49
I've reinstalled Firefox. Still only "none". I've asked my girlfriend. She also gets only "none".
@phenomnomnominal
are you looking at every single logged item?
Pretty sure I am.
then i have no idea
Sigh. Your OS?
01:51
I'm using Windows 8, but I doubt it's causing the problem. My girlfriend has XP. Sounds unlikely that Firefox only works on Windows 7.
BRB. Uninstalling and reinstlaling Firefox completely.
@phenomnomnominal Okay, now this is weird. Now, it's nothing insteand of "none".
@phenomnomnominal Eeeeeh. Now this is WEIRD. If I execute "console.log($('.test').css('background-image'));" I get the image URL.
But this is all loaded in $(document).ready().......
do you load your css first?
@phenomnomnominal Uuuuh.... Could it be... the LESS compiler isn't done working at the time my compatibility script runs?
02:09
So you're compiling your LESS client-side?
Yeah.
well the ready event will fire before then
Compiling server-side sounds tedious while I'm in development.
@Ariane, it's not, it's really simple
02:10
Having a build process sounds tedious while I'm in development XD
Really? There's an automated way or something?
yeah
lots of tools for it
i use a tool called live reload that monitors for changes to source files, builds/compiles any SASS/LESS/CoffeeScript and refreshes my browser for me
@phenomnomnominal What language does it work with? Is it compatible with PHP?
i assume any language?
as long as you're running your server locally all it does it remake the static files
and then refresh the page
@phenomnomnominal My server isn't local, it's remote. o.o
My files are sent through FTP.
02:16
so every change you make you have to resend over FTP?
It's sent automatically with FTPbox.
and how does that work, does that just monitor for changes?
Uhm, I don't really know. I save a file, and a second or two later, there's an info bubble that says it's been synced.
Okay so I assume it does, so it should work fine
the refresh might not work though, might try to refresh before they're all synced
Step 3. Depending on your workflow and personal preferences, either install browser extensions, or insert a JavaScript snippet, or use a framework-specific plugin.
Eh...? Doesn't that mean it's client-side too?
02:20
only the reloading
But uhm... It's a program I install on my PC, right? How does it work on the server? o.o
It doesn't
Well it could
By client-side I mean, in the browser
Then it's only useful for me, and it doesn't have any effect on people visiting my website?
It's a development tool
@jAndy, THE GAME!
02:33
@phenomnomnominal Can you look at the website again and confirm that like me, you're strangely not getting the console.log stuff anymore?
any one ever made their own scroll function with javascript i think i got my logic wrong
I GOT IT!
It was because of LESS compiling. Now it's all right. :D
/me sad
Array.length can never be less that 0 right?
02:48
I believe that to be logically impossible.
!!> var a = [1, 2, 3]; a.length = -3; console.log(a.length);
@phenomnomnominal "RangeError: invalid array length"
maybe for some browsers or something, setting it to minus its value means something special.
woah what the fuck
reassigning length removes elements from the array?
!!> var a = [1, 2, 3, 4, 5]; a.length = 1; a[2];
Of course. o:
02:50
@phenomnomnominal "undefined"
@phenomnomnominal Uhm, what does this mean...?
What do you mean?
		console.log(Modernizr);
//An object
		console.log(Modernizr.svg);
//Undefined
Sorry, I should've done that the other way. Code first, ping second.
@phenomnomnominal How can Modernizr exist but not have .svg?
Can someone take a look at my scroll function i can't work out the logic on how to do it : stackoverflow.com/questions/16578069/…
@phenomnomnominal Never mind. The "development build" doesn't include the SVG feature. They should just have a full version, no questions asked. D:
03:01
@Ariane, the point of modernizr is that you can have custom builds.
@phenomnomnominal Well I thought the "development pack" was a full version, meant for use while you still don't know what features you'll eventually need.
@DaveRandom Sorry, can't help.
just so you know im not DaveRandom :P
Ah dunno. Just pressed Tab after writing @Dave, out of habit.
:P its ok
anyway i solved it now it was my if statement issues
What did the farmer say when he couldn't find his tractor?
"Where's my tractor?"
03:25
0
Q: mongodb $maxScan didn't equals limit

KaibbThis is my first question on stackoverflow, I am so happay wait your answers. My question is: When I use mongodb Query Selectors, I want limit results. But $maxScan is not work as I want. ---------This is What I want result. db.post.find({query:{status:"publish"},$orderby:{date:-1}},{status...

Really?
Like DOWNNVOOOOTTEEE
03:53
hi
I have accept friend button with anchor tags that has a parameter. how to make it using ajax?
@vinaysingh what part are you fighting with?
0
Q: What is an xml dom namespace and why do some DOM Element Objects have NS at their end?

Romantic Electronwhy do I need to write it?and Why do some methods of the DOM Element Object have NS at their end,what's the purpose of such methods?

04:17
XML namespaces are used for providing uniquely named elements and attributes in an XML document. They are defined in a W3C recommendation. An XML instance may contain element or attribute names from more than one XML vocabulary. If each vocabulary is given a namespace, the ambiguity between identically named elements or attributes can be resolved. A simple example would be to consider an XML instance that contained references to a customer and an ordered product. Both the customer element and the product element could have a child element named id. References to the id element would theref...
@JanDvorak sorry, i was out of my computer. i have a link with anchor tag that has a parameter like this href=page.php?accept="id" how to call php page with ajax?
@vinaysingh Could you set it up on jsfiddle.net
@vinaysingh are you using / willing to use jQuery?
@JanDvorak yes. I don't know much ajax calling that's why i am expecting a hint
@JanDvorak yes i want to do this with jquery.
$.ajax('page.php/', { data: { accept: 'id' }})
you can $.post to the URL in the link, and the accept will be accessible as a $_GET parameter
This is why people must teach Actionscript 3.0 as the introductory programming language
$.ajax({
type: 'GET/POST/PUT/DELETE',
url: 'url to page.php',
data: 'data you want to send',
dataType: 'JSON/JSONP/etc..',
success: function(data) { what to do when successful },
error: function(err) { if err }
});
@TemporaryNickName, why would anyone ever teach Actionscript.
@phenomnomnominal you didn't specify the HTTP method
04:25
It's fucking dying
Why does Ubuntus Chromium seem to have a better text resolution than windows
33% downloaded Ubuntu Touch :D
@XCritics thanks.
@phenomnomnominal Because it is legit object oriented and also scripting language so people can start from scripting language feature of AS3 first then move on to Object Orientation.
@vinaysingh If you're using jQuery, you can send the 'data' flag easily with, $('#formid').serialize();
SO many languages fall into that category
04:27
Also I figured Flash's GUI component is much easier than learning how to use Swing
The first language people learn should be python
@phenomnomnominal thanks for your code.
@XCritics it seems the GET param is embedded into the link (not that it would be a bad idea to change that)
@vinaysingh, you probably shouldn't thank me for it, I was being very lazy.
04:28
@XCritics i have not a form. Only a link with accept parameter. actually this is accept friend button.
i am half dead, i am worried about the teacher teaching me :-( ...
@JanDvorak you mean like type: 'GET' url: 'page/' + $('#param').val();
@vinaysingh you can send AJAX to that URL, and the parameter will be accessible as a GET parameter
@phenomnomnominal I think understanding the type system is one of the most important thing to teach student
and python's type inference system is going to confuse students even more
@TemporaryNickName, no the most important thing to teach is that programming is fun and exciting
04:30
I love type inference / weak typing
not boring and awkward and shitty
AS3 is super fun
@XCritics how to remove anchor tag because if i will use anchor tag. it will do it's job and move to that page without calling ajax. It is a simple <a href="page.php?accept=id">link</a>
Then teach JavaScript first and be done with it
much less awkward than python
04:31
@vinaysingh preventDefault on click
e.preventDefault where e is the click event
and people who find programming really interesting can easily move on to Adobe Air and create some really good portfolio to show their employers
@JanDvorak ok. now you replied what i wanted. I was mad however, i know preventDefault...haha
thanks for everyone.
If you want to prevent the navigation even if javascript is disabled, use href="#" data-href="your/ajax.url"
@TemporaryNickName ALMOST everything that Adobe is doing is dying.
Advocating Flash and AS3 over JS is pretty moronic
@phenomnomnominal even adobe PDF reader?
04:35
hopefully
I open most pdfs in the browser
@vinaysingh jsfiddle.net/f65Y5 is how I would ajax a get request
so, you recommend Chrome's native PDF plugin?
pdf.js in FF is pretty damn cool
I'm using Firefox right now, I don't know if I should feel bad, or switch to Chromium
and I've never had a problem with Chrome's reader
04:37
@XCritics are you sure it's the real firefox, not the one from the british government?
@JanDvorak Which ever one ships with Ubuntu 12.04 LTS :)
@XCritics alert! alert! :-)
21.0 Firefox for Ubuntu Canonical
Chrome has better dev tools IMO
I <3 chrome dev tools
04:39
I like chromes dev tools, and I like V8, just waiting for my apt-get to finish before I can install chromium
2m 20s left on Ubuntu Touch dl x.x
I'm scared
Wth is the Qt language, apparently UBuntu Touch apps will be developed in either HTML5 and other weblanguages, or Qt
It's a GUI framework
Qt ( "cute", or unofficially as Q-T cue-tee) is a cross-platform application framework that is widely used for developing application software with a graphical user interface (GUI) (in which cases Qt is classified as a widget toolkit), and also used for developing non-GUI programs such as command-line tools and consoles for servers. Qt uses standard C++ but makes extensive use of a special code generator (called the Meta Object Compiler, or moc) together with several macros to enrich the language. Qt can also be used in several other programming languages via language bindings. It runs ...
Yeah I'm reading the Wiki
But is it a language you code in, or just something for making GUIs? Or what, I'm confused..
As shown in the table below, Qt has a range of bindings for various languages that implement some or all of its feature set. {| class="wikitable sortable" style="font-size: 90%;" |+ style="font-size: 1.25em;" | Qt 4 language bindings |- ! Language ! Name: description of binding ! QtCore ! QtDesigner ! QtGui ! Equivalent for uic ! QtNetwork ! QtOpenGL ! QtSql ! QtScript ! QtSvg ! QtTest ! QtUiTools ! QtWebKit ! QtXml ! License for open source applications ! License for proprietary applications |- | Ada | [http://www.qtada.com/en/ QtAda] | | | | | | | | | | | | | | | + free |-...
Qt = framework, accessible from multiple languages
Oh ok, gotcha
Apparently you're gonna be able to use the System Tray, using HTML5, I wonder which dom commands controls that
04:44
probably not a DOM method
Lisp is for lusers
05:07
Whelp, that was fun while it lasted, but back to Android, that UI is confusing, buggy and weird, will play with it in a few months again
If only FireFoxOS supported Nexus 4 would be awesome
define "buggy"
Virtual keyboard keys get stuck, no splash animations for opening apps, so you don't know whether it is stuck, or just taking a bit to load, couldn't tell whether or not I was receiving or sending SMS, they have so many place holders that you think are real, you get confused as to which are real and which are fake
theres more, I only played with it for about 5 minutes
ungh
thanks for the warning
The phone/sms is an integrated app, only labeled as 'Phone' so it took a while to figure out how to compose sms'
@JanDvorak You on Ubuntu with an android phone?
no
I'm on W7/netbook and S60/crapphone
well, not exactly crap. But has a scratched screen (euphemism - the top layer is almost completely gone in the center) and an OS noone is using. oh and slow CPU and little internal memory (shared RAM/filesystem)
05:27
Functional programming is the best
0
Q: thickbox.js Endless loading gif. Why is thickboxL10n not defined?

My Name Is KatBelow is the line that throws the error. I am using thickbox.js jQuery("#TB_window").append("" + ""+caption+"" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "");

05:51
0
A: How to get the div in which the cursor or caret is placed?

Romantic ElectronI worked out a better solution ,this will need enclosing all the div tags that you want to check for the cursor into a parent div tag and using the document.getSelection() object we can get the id of the div in which the cursor or caret is placed <!DOCTYPE html> <html> <head> <me...

06:11
!!/ stat
@Mr_Green Mr_Green has 3216 reputation, earned 0 rep today, asked 144 questions, gave 264 answers, for a q:a ratio of 6:11.
@JanDvorak ouch
Man a day can turn shitty really quickly
user986408
06:30
i agree
06:55
I was wondering if anyone has already tried fiddling with the transition effects for slideswitch: jonraasch.com/blog/a-simple-jquery-slideshow
Can we actually use this transitions ricostacruz.com/jquery.transit for SlideSwitch?

« first day (943 days earlier)      last day (4230 days later) »