« first day (254 days earlier)      last day (4685 days later) » 
00:00 - 18:0018:00 - 23:00

user1385191
12:48 AM
hm, I have a bit of an HTML conundrum
 
user1385191
12:59 AM
consider the following scenario:
 
user1385191
I have three radio input elements all with the same name so as only one of them can be selected at once
 
user1385191
however, I want to add a label to each of them
 
user1385191
the label requires an id, of course
 
user1385191
now, the fun part is reading the HTML 4.01 spec, which says the following:
 
user1385191
> The id and name attributes share the same name space. This means that they cannot both define an anchor with the same name in the same document. It is permissible to use both attributes to specify an element's unique identifier for the following elements: A, APPLET, FORM, FRAME, IFRAME, IMG, and MAP. When both attributes are used on a single element, their values must be identical.
 
1:38 AM
Hey all, I did a nslookup to check the mail exchanger for a specific site, because I wasnt sure if the email was being serviced by rackspace cloud or another mail server. The site is hosted wiht rackspace cloud. So I ran the nslookup command and then it gave me back a mail server and I googled it and it says the ip is deltacom, which is a totally different server: bgp.he.net/ip/97.66.39.82#_whois So now I am confused as to whether the email is serviced through rackspace or deltacom
 
 
2 hours later…
3:54 AM
RT @johnallsopp: awesome HTML/CSS audio visualiser (currently Firefox only) from @nambor http://bit.ly/ivjNZh Feel the future!
 
4:21 AM
RT @sethladd: how did I miss HTML5 Grind, the HTML5 game news site? http://t.co/AOAhuCe
RT @RPGJS: RPG JS on Github : http://t.co/0WDYFTM
 
 
2 hours later…
6:33 AM
@MattMcDonald Yes that's how it's supposed to be. The best way around this is to use 3 unique ids and a further unique name for the checkboxes
Alternatively use the radiogroup
 
6:45 AM
@MattMcDonald -.- "A, APPLET, FORM, FRAME, IFRAME, IMG, and MAP"
You only have to use the same id and name on HTML elements that can be anchored with /#foo urls
It's invalid to give it a different name & url since then /#foo1 and /#foo2 point to the same location in the page
 
7:05 AM
Hi all!
can anybody tell me regular expression so that in a text box only a OR p can be entered, only one character should be entered at a time?
 
7:31 AM
That is so simple, I'm going to direct you to: regular-expressions.info
 
o/
 
8:11 AM
anyone knows if mootools has implemented slice() for function's arguments ?
nvm , looks like there is some implementation there (or more like a shorthand) : ryanflorence.com/3-minute-mootools/…
 
...
Just use ES5 strict mode o/ arguments is garantueed to be an array
 
well , i cannot
i do not live in the fairy-land of "doesnt-have-IE"
 
8:37 AM
ok, @Raynos , maybe a stupid question : how do i add additional features to an existing class ?
hmm .. wrong term
nevermind ..
looks like what i need is a way to expand existing prototype
 
Or use mootools
If you want to extend a javascript constructor then add to the prototype.
Of course never write to Object.prototype
 
im already using , i just need to separate the reusable part of caode ,and custom stuff
its for a dialog-like structure , and i need ability to extend it post-factum to add new functionality , which is executed when you do something within that dialog
weah .. why does my JS look so messed up
 
8:55 AM
@teresko you may want to extend the object
instead of the constructor prototype as that cascades to all objects
 
9:06 AM
naah , i found a better way to do it
i will inject the events in the object at the instantiation
what should give me some additional functionality too
 
9:20 AM
0
Q: Need tips over improving this javascript code

John Coopervar AgeConvertor = { Age: function (formattedDate) { var now = new Date(); var yearNow = now.getFullYear(); var monthNow = now.getMonth() + 1; var dayNow = now.getDate(); // Calculating in days var ONE_DAY = 1000 * 60 * 60 * 24; var ONE_MONTH = 1000...

 
@Feeds An object with a huge single method? Eh...
 
9:41 AM
Rob Manson: "A web standards based model for Augmented Reality" http://goo.gl/j7yyo http://goo.gl/qJXox http://isweb3here.com/
 
9:53 AM
RT @silviapfeiffer: Ronny has done an awesome job of representing the WebVTT spec in images http://ow.ly/5qSos and demo cue settings htt ...
 
10:21 AM
RT @maboa: If ur interested in HTML5 audio data API and DSP check out @corban's blog http://t.co/7DteBwb
RT @silviapfeiffer: New blog post: Recent developments around WebVTT http://bit.ly/jDsNLx #webvtt #html5 #a11y
 
10:50 AM
hi, anyone here who works on Extjs
 
barely.
I know patterns and how to read documentation ;)
 
@Raynos Gosh, no wonder you've got 10k reps!
 
@YiJiang are you suggesting most SO users don't know basic programming techniques and can't read documentation?
You can solve 95% of web dev problems with those two -.-
 
1
Q: Display image instead of text for hyperlink

sunjieHow can I display an image instead of a text for a hyperlink? Please see my example, here you can see the text "x" and the background image. I want to show only the background image for the hyperlink. http://jsfiddle.net/8rfyT/

 
I already nuked a few of those
Whats wrong with image links?
I'm trying to feature detect for testing on a page.
I want to include some generic thing in an ASP.NET page where it will see whether this page has a test attached to it
What's the best way of setting up such infrastructure
 
11:52 AM
morning
 
12:13 PM
aloha
 
hey guys , i need a consultation about javascript
there are two objects ( foo & bar )
object bar contains Events which will be attached to the DOM element which is onside foo
how could i have access to foo from bar
 
is it just me or is anyone else also having trouble watching this video ? microsoft.com/design/toolbox/school/…
the sound doesnt seem to be working
 
12:42 PM
@teresko too vague.
 
yeah
 
How are foo and bar scoped?
Give us some pseudo code to work with
 
12:57 PM
Hey, I was wondering if someone could point me to a way to identify which one of several javascript files is interfering with a script I'm writing
 
depends
what are you writing
 
I wrote a javascript horizontal accordion
and it works great in a demo page
but when i load it into the site I'm building
The accordion doesn't work
 
1:22 PM
@VarunMadiath Did you run it through jshint.com ?
 
1:58 PM
It fails jshint.com because it is a jquery plugin
A lot of those errors are completely valid features when combined with hquery
 
I'm not concerned about the "We didn't know you have a plugin," but the things like "your syntax is bad here"
Alternately, put all the files into google's closure compiler and see what it says, most of the time these issues can be found with tools like this if you include all the files.
Or just concatenate the files you're including in order and send them through.
 
The syntax passed wonderfully, except for a few issues of "usage of whitespace and tabs on this line"
It's just that on the website
over 15 javascript scripts are being loaded
and about the same number if not more CSS files
 
Without seeing your code, or a jsfiddle, it's going to be hard to help find your issue.
 
I'm just unsure of what's causing the exact issue
@Incognito - If you look at chiphi.madiathv.com
you'll see what I'm referring to
 
Well, does changing your jquery version have any impact?
the plugin you dev'd under might be using a different version.
 
2:10 PM
No, I'm running it on the same version of jquery
 
http://jsfiddle.net/thomas4g/QVUHU/49/


When I delete a number by backspacing it goes to back to a seperate page anyone one why :S or how I can fix it?
 
And too boot it works when i change the theme of my CMS, so i'm guessing it's due to some interference of some other js script
 
2:21 PM
Or your css.
 
why does it keep refreshing the enitre page when i delete something?
backspace it to delete something and it will refresh entire page
 
@ErrorErrorError Backspace is the default page-back button. Have you tried returning false on keydown of backspace?
 
no thanks ill try that didnt know that
 
Err, that doesn't look like it's the problem with your script however. It's all kinda wonky.
Backspace works fine for me in chrome, it's the other stuff that's weird.
 
its weird :S sometimes it workso ther times it refreshes page or goes to another page
im runningi t there
 
2:29 PM
is there a way to "look up" through different closures ? I have an object , which contains another object in which there are callback functions for events
is there a way to to access the "outer" object ?
( because right now i end up in "window" )
 
it works fine if you delete usign the delete key
but backspace is troublesome
 
hi all
 
// Expose Constuctors to unit-tests
if ($["ipl-tests"]) {
	$["ipl-tests"] = {
		TemporaryStaffSelect: TemporaryStaffSelect,
		GroupNameChecks: GroupNameChecks,
		TemporaryStaffDetails: TemporaryStaffDetails,
		Contracts: Contracts
	}
}
Is this evil?
@teresko closures are closures and objects are objects. You can't look up objects unless you expose objects are local variables up the function chain
 
yeah , i had that feeling
 
2:38 PM
oh god this is embarassing....im following an html tutorial and im at the images section of the topic with a man in his undies n a jacket :P
a manager was walking by.....god knows what hes thinking...
 
2:49 PM
RT @maboa: Talk done. You can find my slides at http://t.co/iqQKMZZ Will be about to answer any questions. #bsw2011
"Microsoft tries to step on WebGL, stumbles on its own feet" http://t.co/xaEH7Sd
 
im surfing the web and it seems all "good" websites are comprised of light colours with menus and headings at the very top.....I dont really like light colours I prefer darker ones....Does it mean all dark coloured websites are bad?
 
yes :-P
 
cant believe discrimination still exists....even in programming :P
i had this i wanted to add to the homepage of my site......
you have to say THAT is wicked
i cant help the fact im attracted to moving objects....
 
RT @HTML5Grind: Cloudmach: WebGL When It Can Be, Server-Side Rendering When It Can’t http://bit.ly/mIFPSF #html5
RT @mathias: ☆ Everything you always wanted to know about </, aka. the end-tag open (ETAGO) delimiter: http://mths.be/notes/etago
 
3:06 PM
Hi y'all ! I'm writing a page not found page displaying a message to users that tries to enter a non authorized place of my website well page not found then :)
anyway I want to make sure the user is reading the message that he is not on a right place in the domain and displaying a message for about 3secondes
what is the function to make a sleep in javascript ?
of course I want to freeze the message and redirect the user on the home page
 
is it just me or does this lag like hell?
 
@addantfr : you may want to use window.setTimeout()
 
@kbok mm thanks :) I'll try it
 
@kbok double thank
 
3:09 PM
@kbok does this lag your browser? ow.ly/4fYZv
 
no problem :) also, this function takes callback as parameter so you have to be careful with the context which is changing. setTimeout() is kind of a hell to use..
 
lol that is crazy
 
:P is it lagging you guys?
i hope it doesnt :P
 
@error : yes but only when the tab is active
 
3:11 PM
yeah
well its slow anyway
 
but yeah it lags like hell
 
ah yeah, it is pretty laggy
tried to scroll and it was crazy
 
a good way to crash IE I think ;)
 
darn :P i think i need to lower the pixels for it to be on a homepage
 
is that neat ?
window.setTimeout(
    function(){
        window.location.href = "http://www.mywebsite.com/index.php";
    }
, 3000);

?
@kbok
 
3:12 PM
@Oddantfr what are you trying to do?
@Oddantfr just use meta refresh...
 
@oddantfr yes that's ok
 
Meta refresh is a legacy method of instructing a web browser to automatically refresh the current web page or frame after a given time interval, using an HTML meta element with the http-equiv parameter set to "refresh" and a content parameter giving the time interval in seconds. It is also possible to instruct the browser to fetch a different URL when the page is refreshed, by including the alternative URL in the content parameter. By setting the refresh time interval to zero (or a very low value), this allows meta refresh to be used as a method of URL redirection. Usability Use of meta r...
 
a 'page not found' displaying a message like 'you'll be redirecting on the home page' @Neal
 
user1385191
I'd be wary of using meta tags
 
+1 for neal you don't really need js here
 
3:13 PM
@MattMcDonald why?
 
user1385191
I know meta redirects are blocked by noscript
 
@MattMcDonald heh?
 
@MattMcDonald ?
 
@MattMcDonald: yeah, but javascript also is blocked by noscript
which is kind of logical
 
@Neal would this be good for an app that alerts for system down?
 
3:15 PM
anyway thanks for the answers that is helping me !!! :)
 
@ErrorErrorError ahhh! nooo stop trying to break my browser...
 
user1385191
generally, you want to use a location header to do redirects anyways
 
@Oddantfr no problem
 
RT @varjs: JavaScript voice debugger powered by HTML5 audio - http://bit.ly/iDzD9x (git: http://bit.ly/j1LgtZ)
 
hey guys
i have two events ( both in closures )
can they share a variable ?
 
3:25 PM
what do you mean "share" ?
 
why are "light colored" websites considered good compared to dark colored ones
 
nevermind , i figured out a way
 
@ErrorErrorError : I think it's because you browse mainly to read
 
user1385191
I don't buy that
 
and so your site should behave/look like paper
 
user1385191
3:26 PM
as long as you have a good contrast between background colors and font colors, it can work
 
yeah but isnt appeal important? some darker color websites look goood
 
@ErrorErrorError because a lot of cheap sites ( made by grade-schoolers ) happen to be black
 
yes
but I think it's harder to make a black-backgrounded site look nice
in fact i think it's harder to make a dark-backgrounded anything look nice
but it sure is a matter of taste
 
user1385191
tell me what you think of my site
 
user1385191
it's on my profile
 
user1385191
3:29 PM
I need to fix the font size but the contrast is there
 
@MattMcDonald whats w all the arrows? lol
 
@MattMcDonald I like the style (as long as the large arrows on the right are place holders). The copy, I think, needs a bit of work.
 
user1385191
yes, the arrows are placeholders until I put something interesting up
 
For instance, is your enjoyment of full interfaces and rich UI actually a consequence of your fearlessness in the face of hundreds upon hundreds of lines of code?
 
user1385191
fun fact: early versions of IE will add a newline to a hyphen
 
3:35 PM
Er... that's odd
 
yeah that shadow is what totally kills the emergency alert thing
 
Holy shit, I remember using the <nobr> tag in my naive youth.
 
:S i kinda want to put the emergency alert at the top left of the homepage on website im making
kind of like a logo to introduce the user what the software is about
 
it looks cool, just the animation kills it
 
3:38 PM
kk ill then just post a picture :P
 
do it old scool and gif it :P
 
user1385191
want to see just how well sites are really built? try disabling CSS
 
or, if your audience has modern browsers use canvas
 
@MattMcDonald Indeed. I try to build my sites such that they won't break miserably in Lynx (but it doesn't always work)
 
@teresko =.= stop asking annoying questions without code snippets. The answer is yes
 
user1385191
3:39 PM
in firefox, you can go view > page style > no style
 
I'm aware ;-)
 
user1385191
the stack doesn't show so well without CSS
 
user1385191
div soup
 
It doesn't seem as though Chrome has a "no CSS" option
 
Matt i gues its jus u n me sticknig to the darkness :P
 
user1385191
3:42 PM
ha, try disabling css on google's site
 
user1385191
you'll get a nice surprise
 
@MattMcDonald haha thats awesome
 
ryankinal.com/ballylough doesn't do too bad :-)
 
whoa. SO is hard to read w/o css
 
Does anybody ever actually discuss the "Weekly topic"?
 
3:46 PM
how do u disable css
 
@RyanKinal I disagree with your css reset article, it sounds to me like the people just didnt have any css experience. I think css reset files are great when used in the right hands.
or even partial resets, where you dont kill every style.
lol was just looking at your blog and read that :P
 
user1385191
css resets kill built-ins
 
@Loktar And that is part of the article - they are dangerous in inexperienced hands.
 
user1385191
ie: the :focus outline
 
yeah, but the overall tone of your article seems to be against css resets
I guess i normally dont use a full reset
but i start off resetting a bunch of styles initially
 
3:49 PM
@Loktar Right, and in general, I am. Modern browser defaults are pretty consistent.
 
the part where they use a character in the list cracks me up
rather than setting a list style.
 
There are a few general things I do on a regular basis that might be considered "reset", but resetting everything to 0, with no styles at all is just inefficient
@Loktar I know! I cried a little.
 
yeah I guess after talking it out here I feel pretty much the same way.
 
And on top of that, it's dangerous with inexperienced developers
So, Chrome does this strange thing when combining timeouts and jQuery fades. If I go to a page that has the combination, (such as the Bally Lough page I linked above), and then switch to a different tab for a while, the animations are "saved up" and go a little crazy when you go back to the page.
It's... odd.
 
Hi guys, I would like some guidance as to whether I should open a question on SO or no. I made the simplest of user scripts that one could image, it just adds a link to a menu, the thing is, no matter how low weight, it sort of takes some (border annoying time to load). Am I doing something wrong? or what I actually think its happening, the userscript loads after the page is loaded.
 
user1385191
3:56 PM
need...code
 
@MattMcDonald one second. sorry.
document.getElementById('hlinks-custom').innerHTML += '<span class="lsep">| </span><a = href="/questions/tagged/python">python</a>';
only that after the meta information (is that what its called)
 
@RyanKinal Nobody does :(
 
user1385191
uhhh
 
jQuery Core Dev Meeting is happening in IRC in 10 minutes: http://t.co/1qtJv29
 
user1385191
what in the world is <a = href?
 
3:59 PM
@Raynos Nobody does what?
 
user1385191
click the arrow beside the message ;)
 
Nobody clicks the arrow beside the message?
:-)
 
lol
Fair enough
 
@MattMcDonald sorrry
just a typo
 
I've been asked to teach a JavaScript class here at work. Any recommendations of books to run them through?
 
4:01 PM
I must have added it right now
document.getElementById('hlinks-custom').innerHTML += '<span class="lsep">| </span><a href="/questions/tagged/python">python</a>';
 
user1385191
as far as JS goes, the online docs are as good as any book I've read
 
user1385191
that's doubly so for the DOM
 
user1385191
but Crockford's ...The Good Parts is a good starting point
 
Crockford might be a bit much for people starting from zero.
 
Trufa, that avatar from COBRA?
er nm im retarded.. i bet its python.
 
user1385191
4:05 PM
well, the basics like literals are easy to pick up
 
@Loktar python it is
hehe
 
@MattMcDonald @codelahoma I actually think The Good Parts might be a decent starting point. It goes through basics like variables and naming, functions, etc.
Especially if the students are guided through it
On their own, I think it would, indeed, be a bit much
 
@MattMcDonald any ideas :)
 
@RyanKinal Looking back through it, I agree. I didn't recall all the basics in there because they were not what I learned from that book.
 
@codelahoma I know what you mean
I read it for the quirks and oddities as well ;-)
Also, is there a shortcut for "reply", as opposed to "tag"? In chat, I mean.
 
4:17 PM
@RyanKinal ?
 
I was under the assumption that using "@" to reference a user was different than replying to a message. Is that true?
 
@RyanKinal yes
 
@RyanKinal yes, it is.
 
click on the reply button on the message does a reply
 
user1385191
@Trufa that particular line is running slow?
 
4:19 PM
where doing the @ just pings
 
no sign in the faq of a shortcut for replying to a message.
 
Right, but I was wondering if there was a non-mouse way to reply, like there is with "@" tagging
 
@MattMcDonald that is ALL the user script!
 
:@RyanKinal
hmmm that ddnt work
 
there really wouldn't be a good way to shortcut replying without cluttering up the interface with message ids of some sort.
 
4:20 PM
@codelahoma tru tru
 
yeah, that's true.
Oh well, lunch time. Back in a bit.
 
user1385191
@Trufa "...or what I actually think its happening, the userscript loads after the page is loaded." bingo.
 
@MattMcDonald hmm ok... I'll have to rethink it a bit, because it actually moves other links, and so sometimes its just annoying when youre about to click and it moves
@MattMcDonald thanks for the confirmation!
 
4:37 PM
I need to hire someone to sit at a desk who's core skill set is JavaScript, with secondary skills in other things. Does anyone have advice for what I should be asking for?
 
... exactly that?
 
user1385191
if they're browser scripting, questioning them on the DOM is a must
 
What sort of DOM questions should I ask?
So far I've got some about jQuery plugins, refactoring code, and XSS
 
user1385191
don't ask the first idea
 
user1385191
ask about node types
 
user1385191
4:40 PM
ask about text nodes
 
user1385191
"how does one re-parent a node?" (regarding appendChild and its behavior)
 
What do you think of: "Why would you use appendChild instead of changing the innerHTML in JavaScript?"
 
heh we had a discussion about this 2 weeks ago I think
 
user1385191
yes, but then you'll have to divert to the DOM creation vs. DOM string debate
 
4:57 PM
I'm so paranoid about hiring the wrong guy who's going to write code that qualifies for dailywtf.
 
RT @HTML5Grind: What every programmer needs to know about game networking http://bit.ly/m4NiKK
 
RT @h5bp: HTML5 mobile features support http://goo.gl/uYwCL and a plethora of resources http://goo.gl/MZdNG scroll down to 'beyond mobil ...
 
5:36 PM
@Incognito look for good personality, intelligence, work ethic, and general cluefulness. Don't get TOO hung up on JS-specific stuff.
 
Ask him to do that fizzbuzz thing >.>
 
user1385191
ah, modulus
 
user1385191
so handy
 
Yep... If you wanted to spice it up a bit tell him to use functional programming
 
of course, if you have two candidates equal in general goodness, go for the JS specifics. But IMHO you can't compromise the other things for language/domain/project specific skills
 
5:38 PM
so you can easily pass in different rule sets, other than the 3,5 thing
If you want to test javascript, I'd focus mainly on JS specific language stuff, which i guess is mainly closures
 
user1385191
don't forget adaptability if you're looking for someone multi-talented
 
i had an interview with the developer of firebug
while i was in SF, for the lulz
he asked me a question
"write some javascript that will traverse all of the links on the page and add an onclick event that will alert their order, so the first link will alert 0 and so forth."
basically is was a closure test
it*
 
ok?
 
function extractlinks(){var links=document.all.tags("A")var total=links.lengthvar win2=window.open("","","menubar,scrollbars")win2.document.write("<h2>Total Links="+total+"</h2><br>")for (i=0;i<total-1;i++){win2.document.write(links[i].outerHTML+"<br>")}}
 
user1385191
vomit
 
user1385191
5:51 PM
unless that was facetious, use document.links
 
Come on, we all know you should use $('a')
 
i'd go with document.getElementsByTagName("a")
 
but it's jquery syntax
 
I'd ask SO to give me the codez
 
david is right!
 
5:54 PM
@sandeept Right. It's jQuery, and jQuery is JavaScript. So... that's the way to do it.
 
i agree with you! but it needs big javascript lib. to fulfill minor functionaliities
 
Nah, jQuery is lightweight. Says so right on the website.
 
user1385191
I got the answer, but the solution was pulled from a recent blog post I read:
 
user1385191
scroll down to "let"
 
5:58 PM
For a small example like that i'd just use built in stuff.
 
user1385191
so there's your closure
 
I'm still not sure how to add the click handler :S I went with 'addEventHandler' but that's not exactly cross browser
 
user1385191
var links = document.links, i = 0, link;

for(i;i<links.length;i++)
{
    link = links[i];
    (function(index)
    {
        link.onclick = function()
        {
            alert(index);
            return false;
        };
    }(i))
    link = null;
}
 
I dislike the let keyword :S
 
OMG it's a big article
 
user1385191
5:59 PM
yes, it's very well-written
 
00:00 - 18:0018:00 - 23:00

« first day (254 days earlier)      last day (4685 days later) »