« first day (19 days earlier)      last day (4934 days later) » 

12:00 AM
how r u @Johnson ? i have a question about java script
can i ask u
 
ask away
 
?
okay
 
@Nickcraver is ready...
 
i want to detect wither my browser has java script enabled or not , before start processing any other thing , how can i make that?
 
<noscript>
 
12:02 AM
If it's disabled nothing in JavaScript will be processed (or the files even fetched, in most cases)
what is it you want to prevent from running?
 
You can do
<script>if (true) { process your stuff }</script>
 
i want to make form validation using java script , i don't want empty fields to reach the server , so i want to prevent any user from entering the form if his browser doesn't support js
 
@Alaa Why don't you want empty fields to reach the server?
 
Ok why dont you make this validation in JS and one in PHP that checks, then you got both
Do you work with your form in PHP on submit ?
 
it's not possible to not let it reach the server if javascript is disabled
 
12:05 AM
i don't want empty fields to reach server
 
@Alaa - check for empty fields server-side always, if I'm trying to bypass your validation, it's the first thing I'd try.
2
 
but it's best practice to do a check in the server anyways
 
@tpae i think he means that if javascript isnt enabled then it wont validate and see if the fields are empty
 
@tpae That's not best practice, that's common sense, or intelligence
 
ok , i'll make server side validation , but i think it's good practise to stop him in client side
 
12:07 AM
yeeee
i don't do it sometimes if app is really simple and unimportant :P
 
now i am working in a real system which need high security . so i think that is important
 
@tpae Do you also do "SELECT $queryValue from users" if the app is simple and unimportant? :P
 
high security == not client-side
3
 
@IvoWetzel of course :D sometimes i just have "crash app" button
 
@NickCraver (:
 
12:10 AM
ok many thanx. i am going to work on server side validation.
 
@tpae Gnah, crash app button isn't fun, I'd like more people to implement the "Send me tons of stuff for free" button, like Amazon did in the beginnings.. oh wait that was the "send me money" button, since you were able to enter negative quantities
 
LOL
 
@tpae Somewhere on the interwebs there's a video interview with one of the Amazon founders were he talks about this and other fun/not so fun issues they had
 
@IvoWetzel I know all about sql injections, xss attacks... i ran old oscommerce and it was full of openings... got sued and lost :(
going home from work. later guys
 
@tpae Ah that's bad :/ Cya
 
12:17 AM
home from work? it's 1:17 am :P
ops
another time overthere...
 
Dude, stackexchange chat login is still broken in FX 4-.-
 
I'd phrase that differently :)
as in FF4 doesn't handle SO chat correctly :)
 
Gnah, Script from stackauth.com tries to write to localStorage on chat.stackxechange.com, you want that to work?
 
it's supposed to work in that direction, yes
that's FF4 incorrectly handling SOP directions
 
i have an idea that can get me to be like mark zuckerberg
we all have facebook
we now need bodybook :-D
creative huh
 
12:28 AM
@Johnson Yeah, but every link to bodybook would be NSFW, although you could have cool flash games too! Like "Chat Roulette"
 
@IvoWetzel what does NSFW mean?
 
@Johnson Not safe for Work
NSFW stuff's most likely contains nudity or other things you don't want to have your boss spot on your screen
 
@ivowetzel well thats the point.. the human people generation explore them self more and more and its time to discover eachother behind the clothes....
ok
 
@Johnson You sure you want to discover the bodies of random people on the internets?
 
well....
@IvoWetzel Can't see the negative about it, then you could rate armpit hair 1/10 and other options..
 
12:35 AM
Johnson - research chat roulette for....let's say 7 minutes, see if it changes your mind
 
@Johnson "Frederic would like to become your friend! Frederic has a PE*** rating of 9.0" >_>
 
@Ivowetzel that's just positive. then you know that atleas someone wanna be friends with you with a PE*** rating of 9.0...
@NickCraver yea seen that, nice way to meet people, although it became a pedo site pretty fast
 
@Johnson I expect Bodybook to become... oh wait! Before that happens you get sued by Facebook for using the word "book"
 
@ivowetzel what have they copyright on "book" now or what...
 
12:41 AM
@Ivowetzel that's really lame. Seriously
Now i understand why the f***book got banned too =P
F*** It who reads a book nowadays? I call it BodyDoc or BodyPdf
shit im creative as ** today
 
@Johnson Adobe will sue you for PDF and... uh... MS for DOC? :P
And I'm sure some hillbilly lawyer in some hillbilly lawyer shack will find a way to sue you for the word "body" too.
 
@ivowetzel wow......guess this is failure
atleast i believed in it for a second....
 
Just like those crazy newspaper freaks here in Germany, they recently had the great idea of copyrighting there headlines... they still have to do it though...
 
HAHA!!
what the f...
is that possible?
 
Remember: The more stupid an idea is, the more feasible it is.
 
12:48 AM
everyone here in sweden votes for the "pirat" democrates just because they run thepiratebay and will legalize downloading somehow... but they dont know shit about politics
and society rules and stuff.. wonder how theyll manage that stuff
if they got in
 
Most people are stupid, so they need some intelligent people to take care of them, problem is that in most cases those people are stupid too...
That's especially the case when it comes to internet things here in germany...
 
germany is nice though
they cant be stupid
they made audi, bmw, mercedes...i know stuff :D
 
Most of the production gets outsourced to east europe these days...
 
o
are you from the frankfurt area
been there like 4-5 times
 
Well if you make the area a circle of around 150 kilometers in diameter, then yes :P
 
12:56 AM
Ohw... :P
German is hard and fun language
 
Tek
that's what she said?
 
Well it's often more hard then fun
 
Tek
ah damn, I should've waited to say it
 
remember when you have to pay the german dude in the toilets where you tank fuel
and i didnt got anything on me
he got mad
 
Tek
lolz
 
12:57 AM
German gramma rules are outright ridiculous in some cases
 
:P
It's not so much the gramma and stuff its how you speak
 
I hate to be the one doing this but eh... the trending topic right now is a little far off from Javascript, don't you think?
 
Yes you're right hehe
We made this to MSN :-D
 
@YiJiang Well we could speak about parsing german gramma in JS? :P Gnah, you're right
 
@Johnson There's always the General Room
 
12:59 AM
We turned this into MSN
Yeah, which nothing happens in
 

The SO Tavern (Free Snacks)

Room 5 was frozen for inactivity even though it was once an ac...
 
I like this room. You learn alot of new everyday
 
Tek
@YiJiang I think it's all right as long as nobody else is talking about JS or needing help?
 
Opera's text upscaling in canvas is... not so great...
 
 
1 hour later…
Tek
2:25 AM
hey @JayD3e
Are you in the room?
 
 
4 hours later…
6:16 AM
Poke @NickCraver
0
A: Pulling and placing ahref with jQuery

ProdacI finally managed to put a working solution together. A big thanks to everybody! :) The code can be viewed at http://jsfiddle.net/prodac/qvBn2/. Feel free to use and edit a!

Mind telling him why his code is really, really bad?
 
Tek
@YiJiang
Hey buddy!
Isn't @NickCraver asleep?
 
@Tek He just posted an answer to a question about five minutes ago
 
Tek
O_O
Must be up late, eh?
Or is a orbot
I take it back
it's 6:00am longon time
I guess that's reasonable
 
@Tek 17 minutes, sorry. Still...
 
Tek
London/UK time
I almost said 6:00 am logon time, hehe
 
6:24 AM
I don't know, maybe he connected his clock radio to the internet which pulls the jQuery RSS feed through, alerting him every time someone posts a new question with that tag
 
Tek
LOLZ
I wouldn't doubt that at all
 
I for one would definitely not wake up at 6 to answer jQuery question
 
Tek
:p
Did you stay up
or did you just wake up?
I'm not sure what time zone you are from.
 
@Tek GMT +8, mate, it's 2.30pm here
 
Tek
Ah! I see
The mate confirmed it
=p
@YiJiang Quick question. $.post(
"questions.php", $(this).serialize(),......

How could I get an echo questions.php?id=<?php echo $id; ?>
would that work?
 
6:27 AM
@Tek Erm... I don't get the question
To receive the stuff returned by question.php
You can use the success event handler
The syntax is $.post(url, data, success)
Where the event handler would look something like
 
Tek
nvm it works haha
I wanted to post to a certain $_GET
 
@Tek Oh, right
 
Tek
$.post(
"questions.php?qid=<?php echo $q_id; ?>", $(this).serialize(),
function(data){}); works
I didn't think it'd be so easy!
yay
 
@Tek You don't need that empty handler if you don't use it
 
Tek
Usually JS likes to make my life complicated. Then again, I've only worked with it very little :p No worries though! I'm getting better at it every day. =D
 
6:29 AM
Just pass two arguments instead of three
 
Tek
Oh, I do use it, I just did it so I didn't have to post the whole code
a div is created with the data requested from the server in the function callback
=)
it's a simple comment ajax comment form
a fancy one that is!
 
@YiJiang I dunno what you're talking about, that's beautiful code!
it's 2am here, just couldn't sleep
 
@NickCraver Eh, you're in New York?
Weird, I thought you were in Britain. Hmmm..
 
Tek
^same
lol.
maybe I just got you two mixed up.
or someone else...
 
@Tek I live in Singapore, GMT+8, I thought Nick's profile used to say somewhere in Britain, or is it my memory messing up?
 
Tek
6:35 AM
something like that
run memtest86+ =D
$(".jquerydatabox").append("<div class="">" + data + "</div>");

Should the class="" double quotes give me any issues or do I have to escape them?
 
@Tek Use single quotes if the outer ones are double
Or, better still, $('<div />').html(data).addClass('myclass').appendTo('.jquerydatabox')
 
Tek
and vise versa?
ohhhh snazzy
 
NYC time yes
i'm in NC
 
Tek
NC is in NC
nice.
 
you're thinking of Skeet/Gravel in UK
well, lots of UK users, but they're the most visible/active
 
Tek
6:39 AM
Well, good thing I already slept. I will keep company to my buddies over @ the UK. =)
 
$('.genu').live('click', function(){
    $.get($('.hlinks-user:first').children('a:first').attr('href'));
}
^ This up here == bliss
 
$.get($('.hlinks-user:first').children('a').attr('href')); :)
no need for :first when calling .attr()
 
Oh, it should turn the envelop off too when clicked
 
for that matter...
$.get($('.hlinks-user > a').attr('href'));
 
Tek
@NickCraver What was your blog again? I remember there was "headsaid" in the url but when I googled I ended up in theheadsaid.com
 
6:42 AM
@Tek That's @AndyE's
 
Tek
OH
myyyyyyyy bad
What's the correct url?
 
Tek
errr close enough
Thanks Nick.
 
I spout enough nonsense in here, no reason to blog it where people can see :)
 
Tek
lol
 
6:44 AM
$('.genu').click(function(){
    var l = $('.hlinks-user > a').first();
    $.get(l.attr('href'));
    l.children().attr('class', 'envelope-off');
});
No need for live either, the thing should be there when the page is loaded
 
Tek
Out of curiosity. How long have you guys been working with JS?
 
Hmmm... to use it for GM without evoking unsafe window I think I would have to do without jQuery though
@Tek 1.5 years, but not professionally
 
Tek
If not professionally, then?
Out of fun so to speak?
 
@Tek I'm still a student - I don't get paid for any of the stuff I do
 
Tek
Oh I see.
Internship?
 
6:50 AM
unsafeWindow? oh how I envy you - chrome security suuuuucks
 
@NickCraver There's always the script injection method
@Tek No, as in, erm... you know, student
^ Look at my age
 
Tek
Oh no way.
Impressive. =)
I thought you meant college student.
Or I assumed anyway.
@NickCraver Checked out some of the links on your profile. And I must say, you have a gorgeous wife!
 
Hello @Everyone
 
aye, I'm lucky...just gotta keep up drugging her daily so the effects don't wear off
 
Tek
lmfao...
 
6:54 AM
@YiJiang yeah...sucks you have to tho
 
Tek
Hey @NickCraver
err
Hi @NiteshKatare
 
can it possble to read <td> value on click of the <td> using jQuery or Javascript ?
 
Tek
@NickCraver Lovely story, I still have my AIM screen name since I was 11. Which is like what, 10 years ago?
 
@Tek can it possble to read <td> value on click of the <td> using jQuery or Javascript ?
 
@NiteshKatare $('tr').click(function(){ console.log($(this).children('td').text()); } like this?
 
Tek
6:57 AM
@NiteshKatare I'm certain, but I'm a jQuery newby. You're better off asking... err too late there you go
 
yes, though I'd use .delegate() as to not attach a click handler to every call, for example:
 
@YiJiang k and how to get the <td> header name ?
 
$("#tableId").delegate("td", "click", function() { alert($(this).text()); });
 
@NickCraver Do i have to write the code in document.ready Event ?
 
yup!
 
6:59 AM
@NiteshKatare Erm... using delegate, $('#tableId').delegate('tr', 'click', function(){ console.log($(this).children('th')); });
 
you want the text of the <th> that's for the column the clicked <td> is in?
 
@NickCraver yes
 
(alt-tab, sees IDE and half finished script) Arggg!!! Must get back to work, must get back to work!
 
@NickCraver @YiJiang I need the <th> Name and <td> value on the click of the <td>
@NickCraver @YiJiang Can it possible to get ?
 
@NiteshKatare Well, what do you mean by the <td> value and <th> name?
 
@YiJiang I have a Grid in page and on click of any <td> I need to pass the <th> Name (Column Name in the Grid ) and the <td> value to the code Behind page
@NickCraver Thnks a lot
 
@NickCraver www.jsfiddle.net is this online Editor for jQuery and javascript ?
 
7:41 AM
yup
 
Tek
8:03 AM
Nick, any chance you know php? I have a puzzling boolean question
(php room is dead =x)
or actually, it's more of an operator question
Javascript has === as well right? that checks if it should be the same datatype?
nevermind, just digged into the manual. I was comparing 1 int to TRUE. It might be the same datatype but it's not "identical".
 
8:31 AM
PHP and JavaScript both have ===
 
8:48 AM
morning all
 
9:01 AM
Hi all
Seriously, now everyone think jQuery can solve everything...
And I really mean anything...
0
Q: Disable the firefox default image resizing

vishnuHow to Disable the firefox default image resizing behaviour using jquery.

makes me wanna cry :'(
 
yeah but now it seems jQuery == javascript == magic
 
@Greg What? You mean $.cureCancer() doesn't work!?
 
@Greg Well, I know, but before jQuery, a lot of people hated javascript... The same people that now think it's easy and so powerful it can correct browser configuration \o/
@YiJiang Only if you and @rchern create it ;)
 
when hospital equipment starts running on javascript, it will be a bad, bad day
 
You've never seen what they use right now huh ?
 
9:22 AM
cobol?
 
Tek
9:41 AM
Welcome @AndyE!
 
Hey
 
@Tek: mornin'
 
Morning
So I've got this IE < 8 bug. Anyone fancy having a shot at it ;)
 
@Tek Bootlicking ? :D
 
Tek
o.O?
I'd respond if I knew what that mean.t
meant.*
 
9:46 AM
@Raynos hit me with it, I'll have a go
unless it's that alert bug from yesterday
 
0
Q: Issue with dynamic rendering a select box with jQuery

RaynosI'm dynamically creating a select node with option nodes inside. The code works fine in FF & IE8. But it refuses to work in IE8 in quirks mode or ie7 compatibility mode. And it refuses to work in IE6. The option nodes do get added to the DOM. Example code is http://jsfiddle.net/jKmh4/3/ D...

IE8 & IE8 with IE7 standards works. IE7 IE6 & Quirksmode hate me
 
I honestly thought using "jQuery" in the title and tagging it "jQuery" would develop enough interest. Turns out people only answer easier jQuery questions.
Its not an alert bug as such. Its the same thing except passing it through an eventhandler rather then putting an alert in has the same effect
 
@Tek I could have used "sycophant" which seems to be rude. But english is not my primary language so excuse me if I'm wrong with this, I trust google too much.
 
Tek
9:51 AM
lol
 
@Raynos: fixed it, answering your question now.
 
Tek
@Chouchenos Yeah a bit rude. Considering I'm not sure how greeting someone could possibly mean that
 
@AndyE I noticed the bug. using $("<option attr=val>") breaks using $("<option>") works
 
Tek
@Chouchenos That reminds me, you're not getting your lottery numbers now
 
@Tek oh noes D: !
 
Tek
9:56 AM
:p
 
0
A: Issue with dynamic rendering a select box with jQuery

Andy E The option nodes do get added to the DOM. Yeah, it's definitely a rendering bug. The only real workaround I could find was to hide the option box and show it again, after adding the <option> elements: PersonnelSelectorListBox.hide().show(); This forces the browser to re-render the ...

^ @Raynos
 
Tek
@Chouchenos I do have to thank you for the new word of the day though, I didn't know of it until you mentioned it. Or wait, am I being a sycophant again by thanking you? I'm not sure :p
 
@AndyE thank you. My bug fix wasnt a bug fix. i got confused between ff & ie
 
@Raynos: np. IE is getting confused and forgetting to render the option elements somehow. I don't think you'd have the same issue with a drop down select.
 

« first day (19 days earlier)      last day (4934 days later) »