« first day (215 days earlier)      last day (4735 days later) » 

7:00 PM
Which, when I have tight deadlines, is definitely a "good" thing
@onteria w00t to that
 
I see many examples of people only needing one or two columns, and just SELECT *'ing it instead
 
user1385191
when the day rolls around when IE 8 is the new IE 6, it's going to be very interesting to see if jQuery is still used
 
@RyanKinal "Very well" according to what standard? You can't compare it to vanilla JS, because that'd be like comparing CodeIgniter to php and saying CI is better because it's just an abstraction layer.
 
user1385191
because of querySelectorAll having enough browser support
 
jQuery was designed to be a DOM-centered library. When you build a framework on a piece of crap, it's not going to be pretty.
 
user1385191
7:01 PM
hey, the DOM isn't that bad
 
@Zirak So... are you saying that any DOM-centered library is going to be crap?
 
JavaScript dom is
 
user1385191
it's just got implementation problems
 
user1385191
fragmentation, specifically
 
user1385191
I personally find the DOM to be a lot of fun to use and play with
 
7:03 PM
wow i missed alot
 
@MattMcDonald I agree
 
JavaScript is just an overly complicated research paper on how horrible it is to deal with cross browser support under the guise of a scripting language
 
@RyanKinal Not any. Just any that I've seen.
@onteria_ Hey, js is a good language. It was just mutated into so many forms that the good stuff is hidden away. Without the browser part, it's really a good language.
 
@Zirak Doesn't that kind of invalidate any argument toward a standard of "good" in regards to DOM-centered libraries?
 
@Zirak Don't worry, I'm just subtly trolling
 
7:06 PM
@RyanKinal The only popular DOM centred library which I know of is jQuery. In Prototype and MooTools, the dom isn't there in every call.
 
@MattMcDonald correction; DOM3 isn't that bad
 
There's a difference between something with DOM support in it to something that's entirely in the DOM. When you see jQuery, there's the DOM.
 
DOM0 is the devil ._.
@Zirak @onteria @Neal use ender >_> jQuery sucks.
 
DOM navigation is great when you can use CSS selectors or XPATH. It's just horribly annoying when you have to do things like node.parentNode.parentNode.nextSibling
Oh and don't get me started on the whole "whitespace surrounding tags interpreted as text nodes" fun
 
@Zirak I'm not sure I understand. You're saying jQuery is crap because it's meant to abstract the DOM (which is crap), and the only thing you see when you look at jQuery is DOM?
I'd classify that as "being good at what it does"
 
7:10 PM
@RyanKinal No. I'm saying jQuery is not good because jQuery's api isn't good. But you say it's good because it's the only thing you know - imo, MooTools is far better than jQuery
 
@RyanKinal ... the API design of jQuery is bad.
 
@Zirak A lot of the scoping stuff makes it decidedly non-trivial to implement performantly. I wouldn't say it's a great language.
 
@gsnedders hows it going these days
 
@Raynos All right, been busy with exams, and now away for friend's wedding in Austria.
 
Sorry, I'm just not seeing it. It's well documented, and it's fairly consistent.
 
0
Q: Opera/Firefox Javascript engine differences

Jerry SaraviaHey all, I wanted to know if anyone else has experienced this 'glitch' between browsers with javascript. My javascript was the following var theForm = document.getElementById( 'theForm' ); theForm.firstname = theForm.firstName.value.trim(); theForm.lastname = theForm.lastName.value.tri...

 
user1385191
heh, this was posted yesterday
 
user1385191
I didn't read the question through so there's a comment telling me I'm an idiot
 
@MattMcDonald ha, and i edited it yesterday lol
 
@gsnedders what about it?
 
7:13 PM
@Raynos lol i remember this Q
 
Gecko's behaviour there scares me. HTMLFormElement host object's setter changing the value of the element returned by the getter…
 
What I want to know is how Firefox 4 even let that work
 
user1385191
it makes sense now that I read it more
 
user1385191
Opera "works", contrary to what is in the question
 
@gsnedders Gecko is opera right?
 
user1385191
7:16 PM
mozilla
 
Gecko is Firefox's rendering engine
 
@Raynos Firefox/SeaMonkey/Thunderbird/etc.
 
Oh ok
 
Opera uses I don't know what
 
I dont see why firefox is scary
 
user1385191
7:17 PM
presto
 
You've got Gecko, Trident (IE), KHTML, WebKit and a few others
 
@gsnedders isn't operas behaviour scary?
 
Though last I checked Konqueror (KHTML) had an option to use WebKit instead, so that may be going out the window
 
@onteria_ Well, host objects can do anything, including catch-all getters/setters. I guess the behaviour is when the setter is invoked, if the getter for that property returns an HTMLInputElement, set its value.
@Raynos We don't do magic involving what the getter would return when setting a property on it. Less magic is less scary.
 
user1385191
I was using dragonfly today and was pretty impressed
 
7:19 PM
this may seem like a stupid Q: how do i center an input tag in a div?
its on the tip of my keyboard, i just cant remember
 
text-align: center?
 
user1385191
why an input inside of a div?
 
user1385191
use a fieldset
 
@RyanKinal nooo...
 
<center>!
 
7:21 PM
this is what i have:
<tr style="border: 1px;">
                <td>Minimum Time</td>
                <td style="margin: 0 auto;"><input type="text" value="00" name="TIME[min][hr]" size="1"></td>
                <td>:</td>
                <td><input type="text" value="00" name="TIME[min][min]" size="1"></td>
                <td>:</td>
                <td><input type="text" value="00" name="TIME[min][sec]" size="1"></td>
            </tr>
i want the inputs centered in the tds
 
user1385191
uh, you don't use margin auto on a table
 
ignore that margin: 0 auto, it was a test
 
margin: 0 auto
 
arrg
where do i put that?
 
In the style?
 
7:22 PM
@Zirak WHICH STYLE? lol
 
user1385191
table on the bottom
 
user1385191
also, is that input outside of a form?
 
table tr td input { margin: 0 auto } or whatever
 
@MattMcDonald no in a form
the table is in the form
 
user1385191
7:23 PM
ugly
 
@MattMcDonald i know, but i was tranferring an old view
but now the inputs in the tds are not centered
how do i fix that?
 
I notice that the .NET crowd seems to have the highest rep
 
user1385191
if you look at my example, I'm using text-align: center
 
here is the whole table:
 
@onteria That's because there is so much crap to ask questions about ;-)
 
7:24 PM
<table>
            <tbody><tr>
                <td>Minimum Time</td>
                <td><input type="text" value="00" name="TIME[min][hr]" size="1"></td>
                <td>:</td>
                <td><input type="text" value="00" name="TIME[min][min]" size="1"></td>
                <td>:</td>
                <td><input type="text" value="00" name="TIME[min][sec]" size="1"></td>
            </tr>
            <tr>
                <td>Maximum Time</td>
                <td><input type="text" value="23" name="TIME[max][hr]" size="1"></td>
i want the inputs centered in the tds.
 
@Neal But not the text?
 
@RyanKinal yes
 
Then do the margin: 0 auto on the input tags?
 
thats what it looks like
the inputs are not centerd...
@Zirak i tried that
ddnt do anything
 
CSS please?
 
7:26 PM
A table with a <tbody> properly defined. You don't see that much.
 
.o table {
            border-collapse:collapse;
            font-size: 11pt;
            color: #000;
        }
        .o td {
            border-top:1px solid #000;
            border-bottom:1px solid #000;
        }
        .o td.nobord {
          border: 0px;
        }
@onteria_ lol i copied the html from chromes inspect element to make it look nicer lol
thats the CSS
 
user1385191
table
{
    border-collapse: separate;
    border-spacing: 10px 0px;
}
 
user1385191
try that
 
user1385191
well with your selector
 
@Neal Break my hopes and dreams will you :(
 
7:27 PM
@onteria_ haha
 
0
Q: API design and jQuery

RaynosI have often heard that jQuery has made some poor API decisions. Although jQuery is not my favourite library it's the library I've used most often and I find it hard to point out specific mistakes in the API design or how it could have been improved. What parts of jQuery's API could have been d...

 
user1385191
my example uses that kind of css
 
Waits for flames
 
@MattMcDonald one minute
 
@Raynos flags as argumentative / subjective and runs off giggling
 
7:28 PM
@MattMcDonald nope that ddnt work
 
user1385191
you need to have the separate border collapse to control the spacing
 
@Neal You may have to use extraneous classes. There's no "forward looking" selector in CSS.
 
@MattMcDonald ooo
one sec
 
I tried very hard not to offend the jQuery fanboys
 
<td class="input"><input...
 
user1385191
7:30 PM
lol
 
@MattMcDonald ahhh i cannot seperate, it looks horrible, i need collapse
 
@ircmaxell do you have an opinion on the API? (See question above)
 
user1385191
I'm predicting that question heads down the toilet
 
user1385191
but I hope it doesn't
 
@MattMcDonald anymore help u can offer?
 
user1385191
7:31 PM
I really need to grab some lunch
 
 
Should I taught in the title
 
see how the : are waaaay to the right?
 
> "API design and why jQuery is considered harmful"
 
@Raynos can u help?
 
7:33 PM
<trollface />
 
@Neal it looks like you're using PHP short tags. I'd recommend using a full echo so you don't have to worry about setting them up if you ever migrate servers
 
@Neal what do you want it to look like
 
@Raynos I want the inputs to be centered in the tds
im making an SO Q now...
 
@Neal The problem is that you are trying to select an element based on what is inside it. Ideally, you'd add text-align: center to the td, and that would solve the issue, but there is no 'parent' selector in CSS.
 
@RyanKinal ;_; hate you. text-align: center :(
 
7:35 PM
adds align="center" to the <td>'s and calls it a day
 
@RyanKinal hmmm that does work
 
text align is for text aligh
 
otherwise I have to do weird stuff like `margin: 0px 10%;'
 
@Raynos Text align is for inline elements. Inputs are inline elements.
 
Sam
Hi all
 
7:36 PM
cool, it workd
no need for SO Q
 
Whatup freaks!
 
i did this:
.o .center td {
            text-align: center;
        }
        .o .center td:first-child {
            text-align: left;
        }
And added class='center' to the time rows
 
That's the way to do it
 
user1385191
btw, remove that border-spacing if you're using collapse
 
user1385191
it won't do anything
 
user1385191
7:37 PM
and using first-child means you're handicapping IE
 
@MattMcDonald Im developing just for chrome
 
user1385191
you can just hard-wire a class to the elements
 
@MattMcDonald ??
 
user1385191
ignore me since IE is a no-go
 
@MattMcDonald what do u mean hard-wire?
 
7:38 PM
@MattMcDonald is text align for non-text bad?
 
Sam
Can anyone give me some guidance please...
 
@PrisonerZERO wat up silence?
@Sam on what?
 
@Neal Wassssup!
 
Sam
Thanks Neal
 
user1385191
@Raynos text-align works for inline elements like images
 
7:39 PM
@PrisonerZERO or is it silent?
 
Sam
i am having strange issue
 
user1385191
it's also the de-facto margin: 0 auto in IE Quirks Mode
 
Sam
when i use jquery.ajax
 
@Neal I have no idea...
 
Sam
it change my jsessionID
 
7:40 PM
I have that JQuery API question favorited, nothing so far
@Raynos I'm going to bounty that if no one takes it :p
 
@PrisonerZERO :-P
 
Sam
and i am not a valid user anymore in the system
all other calls are thrown away
 
@onteria so will I :D
 
Sam
i read it like this
session_id = $.cookie("JSESSIONID");
helloo Neal
a u there?
 
i am here.
u ddnt ask a Q
 
Sam
7:44 PM
oh
thanks
i asked
 
@MattMcDonald recommended site for learning flash for a noob
 
@Raynos boo.com :-P
 
Sam
when i use jquery.ajax
it change my jsessionID
 
@Neal no u
 
Sam
and i am not a valid user anymore in the system
all other calls are thrown away
 
7:45 PM
i have no idea what a jsessionid is
 
@Raynos Replied/Answered.
 
Sam
oh...
it is a unique session ID
 
for what?
 
Sam
generated from the webserver
 
did u ask SO?
0
Q: ajax call to another url reset JsessionId hence cannot proceed with other links

SamHi All, I am calling to a restAPI through jquery.ajax call() once it completed i cannot use my other ajax calls hence i am thrown away from the spring security. i noticed the JsessionID change upon complete the restAPI call (i used httpFox plugging for fire fox). so what ever i am doing after th...

 
Sam
7:46 PM
to handle the browser sessions
 
thats all u have to post
 
Sam
yep
sorry
i am new to chat
Thanks for the advice
 
Sam
Thanks Neal
 
@Zirak lame answer :P. You get a "Your doing it wrong" stamp
 
7:50 PM
@Raynos Thanks for telling my why
 
It's ok. It's a good answer but it answers the wrong question
Tidied up the comment to be a bit nicer :)
 
Fair enough
 
Hello, I'm using jquery to return search results for a certain query and each result has a specific format. What's the best way to approach filling the various result fields? Currently I've got something like this:
 
ahhhh
format code!
 
how do I do that in chat?
 
7:58 PM
edit it, and then click on fixed width
 
Best? They invented the word "best"?
 
or remove it..
 
ah
			jQuery.each(data, function(){
				$('#results').append('<div id="gene"><a href="#" id="symbol">' + this.Symbol + '</a>' + '<span id="description">' + this.description + '</span><br /><span>Chromosome: ' + this.chromosome + '</div>').fadeIn();
			})
well, that's slightly better
 
the most inline js ive ever seen:
0
Q: embedded video opens in a new window

SongoHi I am trying to embed a video dynamically using javascript. I have a div with id="theDivID" which is the target that once a user clicks a certain link it's inner html should be replaced by the video. here is the code I put inside the html: <a href="javascript: document.getElementById("th...

@Radu what do u want to do?
 
@Radu What's wrong with what you're doing? Why do you feel like there's a better way?
 
8:00 PM
well ideally I would have the markup ready and just fill it with data using jquery a la $('#description').text(data.description)
 
Then why don't you do that?
 
but that will only work for one search result
 
Aren't you controlling the search result?
 
is there a way to store a 'template' a reiterate it for each set of results?
well the number of results depends on the query
 
And? Can't you iterate over the results and show data.description?
As in, you'll get an array of descriptions, and you iterate over them?
 
8:03 PM
yes, that's what I'm doing at the moment but basically I'd like to skip the building of the html scaffold for each result in each iteration
can you think of a way that could be done?
 
If you control the search result, why don't you return the read-made html? Or better yet, use jQuery's built-in templating engine?
 
built in templating engine you say
 
Or an outside templating engine like Mustache.
 
I've forgotten about it's existence until you just mentioned it but I think it might be what I need
 
8:05 PM
Or really make your own...for simple functionality it's one line of js code
 
I'm suprised they didn't shoot that jQuery question down :D
0 fanboy downvotes
 
Someone answered it too
 
here's nice templating example I found: ejohn.org/blog/javascript-micro-templating
@Zirak, I don't see how you could get all the way down to one line though :P
well, unless you minify after
 
@Radu _.template is cool too
 
@Radu One sec, I have it somewhere
 
8:15 PM
a small template stub :)
@Zirak bullied ;)
 
I've got a brain teaser for a jQuery fan...
I'm using a horizontal scrolling div to timeline some data.
 
@jmorhardt go for it
 
@Raynos I answered on your question
 
I load the data in JSON format and then iterate over it to show different views.
There's a month view, day view, and week view.
 
@Raynos Thanks :)
 
8:18 PM
@jmorhardt is there an SO link here?
 
Unfortunately, it's an internal project.
Is there a place I could dump the code to so you guys can look at it?
 
@jmorhardt so are all of mine, but i manage to make questions
we cant help with out know what u did
 
It's pretty long to put in a chat...
 
well we can in some cases
but not all
 
8:19 PM
@Zirak, did you just write that up?
 
@jmorhardt and thus they invented jsfiddle
 
Let me explain the prob real quick then I'll get the code out here.
 
@jmorhardt jsfiddle.com jsbin.com codepad.com pastebin.com
 
@Zirak comment your regex ._. for srs
 
@Radu It was around my harddrive for some time. I saw it somewhere and loved it.
 
8:20 PM
Ok...let me set up an example on jsfiddle. brb
 
@Zirak jsfiddle.net not .com
 
@Raynos It matches {{\w+}} globally :P
@Neal Meh, same thing
 
@Zirak no .com doesnt do anything but a fake site
 
Never thought I'd be answering an Amazon API question
 
I'm not even sure how to use it, string is the data I want to put in the template and patter is the unfilled template? so in jquery I could do something like: $('#foo').html(template('bar',null,'<p>{}</p>));
 
8:24 PM
@Radu whats template?
 
@Radu You have a string with blocks denoting replaceable sections, like so: "{{name}} had a {{adjective}} {{noun}}"
 
@Neal the function Zirak put here: pastebin.com/iamsmBnk
 
no idea
 
I'll try fiddling it
 
You then call template with that string as first parameter, and an object with these blocks as values, like template(myString, {name:'Mary', adjective:'little', noun:'lamb'})
And the returned value will (hopefully) be 'Mary had a little lamb'
 
8:27 PM
@Zirak basically u made an sprintf?
just with no types?
 
Yes :P
 
I may not end up using it but this is cool stuff
 
@Radu have u ever used sprintf in any other lang?
 
actually, why not, I think it'll be more readable than endless '<div>' + item + '</div>'
I haven't touched the C's in a long time
 
8:31 PM
But...mine boils down to one line of code...
 
@Zirak yes, but without types :-P
 
@Neal I made a sprintf too :D
 
I guess string.format is an equivalent in .net
 
@Raynos where?
 
@Neal Why would you need types? @_@
 
8:32 PM
@Zirak to restict. why do u think sprintf exists in many lang?
 
@Neal Yes, but mine was a really basic template thing. You just dump data and it comes formatted.
 
var o = { "lols": "epic lulz" };
_.each(o, function(value, key) {
     "{{lols}}".replace("{{" + key + "}}", value);
});
 
@Zirak :-P
 
@Zirak for a real template you need a for loop though
 
@Raynos Why?
 
8:36 PM
I'll post my code before and after in a second
 
you need to be able to iterate over data
Or support partials
{partial(name, value)} could work quite well
 
replace does it for you, and what're partials?
 
You either need iteration or recursion build into it
 
code before:
 
@Radu use jsbin
 
8:38 PM
k
 
8
A: API design and jQuery

patrick dw .load() is overloaded with entirely different behavior depending on the arguments passed .toggle() is overloaded with entirely different behavior depending on the arguments passed too much overloading of the jQuery() function perhaps. the .attr() you mentioned. The distinction from properties sh...

patrick_dw is the man. Read the bit about the event handler memory leak
 
@Raynos yikes
 
Dont ask a big question when you've hit the rep cap :(
That's 75 rep that's lost to the rep cap
 
I get rep capped every day, still answer questions when I'm capped
 
@Raynos :-P
well if u pick and accept an answer ull still get the +2
 
8:45 PM
Occasionally I break it with accepted answers, but that doesn't happen so much
 
It's ok.
It's just ah +16 and 0 rep stings.
 
sorry, took a while longer :P pastebin.com/eGZFeFBY
also I realize that I'm using id where I should be using class, too lazy to upload again
 
ew.
80 char please :(
People need to use more terminals. Word wrap makes me cry
 
@Radu put it to a fiddle: jsfiddle.net/maniator/JTnUu (its more usable) and give example data for us to test
 
it fits on my monitor in notepad ++ :o
just copied and pasted
 
8:50 PM
hi is there a way to go back in padding, like padding-left:-60px; - but that is not working jsfiddle.net/ZbA9P/1
 
@Radu make notepad++ set it the column width to 80
 
@aurel use margin-left
 
@Neal in my page, id does work, but that 60px hides away
 
8:54 PM
@Radu seems to be working: jsfiddle.net/maniator/QnpNM/2
@aurel ??
 
LOL, time is going backwards? A message was sent 4h ago according to the sidebar, now it says it was sent 3h ago.
 
@Neal, yep :)
 
@Radu lol ok
 
what do you guys think of the change though, better, worse, or pointless?
 
8:55 PM
@Radu change where?
 
@Neal ok thanks
 
huh?
 
between the code I initially posted and the one using the Zirak's template
 
user1385191
if you're looking for graphics/animating, stick to Flash
 
user1385191
if not, consider Flex
 
user1385191
8:56 PM
FlashDevelop is a free alternative for Flex
 
@Raynos I'd rather not :p
 
@onteria oh. do you at least appreciate 80 char limit?
 
user1385191
most flash stuff runs through flash.display
 
user1385191
holy crap, your question is +16
 
@MattMcDonald :) I know not a single -1
 

« first day (215 days earlier)      last day (4735 days later) »