« first day (589 days earlier)      last day (4345 days later) » 

3:00 AM
When I put text only in one box, it doesn't alert the user. Why? Thanks in advance
Also, it seems like this should definitively work...
 
Hello Outlaw Lemur, the code looks fine but I don't know about the document.{name} selector, doesn't seem to work even like this:
document.firstname.value = "stuff";
But I can use document.getElementById("firstname").value and it works fine
In your comments, you specified an array index of [0] after getElementById, but this isn't necessary, as Id's must be unique.
 
 
1 hour later…
4:23 AM
Good Morning my friends
 
0
Q: Google chrome extension: How to get unread mail count using javascript

Gevorg HindoyanI have wrote a extension for google-chrome, and the extension must check mail count when you click. All stays to do is function getUnreadMailCount(). How can I get it using JavaScript. If there is need for source code please write comment.

 
 
5 hours later…
Tom
9:37 AM
Why does the switch here execute the test statement?
 
@Oleg if u wanna chuckle read that :-)
btw .. holy mother of god!!
what the heck did you did !!! omg thats just so brilliant <3
 
lol
It's not me who did that.
 
@Oleg: Good one
Thought, these shape printings only possible in high level languages
 
9:52 AM
Well, you can do that in SVG/VML too.
 
I would always use SVG btw :-)
despite of the fact that i can do it with CSS
but i dont really feel like making the invader with code :-) complexity :(
 
hi guys
how can i replace values numbers by variables in jsfiddle.net/uHTbQ/1
i tried to make <td><?php echo $num ;?></td> which $num =6 but it didnt work
 
Len
10:13 AM
@gosto have you considered asking in the PHP room? chat.stackoverflow.com/rooms/11/php
 
@Len no , i thought this is javascript and html so why php ?
 
Len
@gosto wat. What about the bit where you wrote <?php echo $num; ?>?
 
this is what i have tried to do
 
@Oleg That's pretty neat, thanks!
 
Len
10:16 AM
That's PHP, and you have to use and install PHP for that to work; it's not plain HTML, and there's no JavaScript involved.
@gosto you're referring to "jquery.charts.js", but those aren't installed on jsFiddle.
 
@Len "jquery.charts.js" is this javascript i have writed there
 
Len
@gosto uh, so it is. You can remove that line from the HTML part, then.
@gosto You need to wrap the call to $("#stats").charts(); in a document.ready block.
(that's a link: jsfiddle.net/uHTbQ/7)
Reason being, it hasn't finished loading the JavaScript part of the fiddle before you try to call charts(), so it fails.
 
@Len yes like that :)
so now im trying to replace those values by variables
@Len if i replace by variables they dont work !!
 
Len
@gosto What do you mean by "replace by variables"?
 
@Len you see between td tags ? there is simple numbers , i want make variable which is number instead , forexemple <td><?php echo $num ;?></td> , which $num=6
 
Len
10:26 AM
@gosto That only works if you're running PHP on your server. jsFiddle doesn't do PHP.
 
@Len not like that <td>6</td>
 
Ali
Morning everyone & @Oleg
 
@Len yes i just post it there u can try it in your localhost
 
Len
@gosto It would work like that, so long as PHP is configured correctly.
 
@Len instead of <td>6</td> i want make <td><?php echo $num ;?></td> , which $num=6
 
Len
10:27 AM
You said "they dont work !!"—what happens, exactly?
 
@Len they dont show at all , the charts of this td disapear
 
Len
@gosto could you send me the latest attempt in another fiddle? And what do you see in the source code if you use your browser's "View Source"?
 
@Len take a look at it pls in localhost , so u can understand exactly
 
Len
A look at which? I need you to show me what you see.
 
@Len this is how it appear in source code codepad.org/bvliSoRT
@Len if u see line 43 , it didnt transform to a value
 
Len
10:33 AM
@gosto the PHP code is still visible. This suggests it's not actually being run … but you see the first line? That's an issue! PHP may be thinking your XML declaration is a PHP statement. Try removing that?
 
its something with this javascript file
 
Len
If you still see the PHP in the "view source", it's because PHP is not configured correctly, and you need to address that first.
It's noooothing with the JavaScript …
 
need some advice.. FB has its own scroll bar on the ticker.. web-kit comes with features to design/change the scroll bar (gmail on webkit - re-designed scroll bar,but they've left Gecko with the default scroll bar).. is it advisable to come up with ur own scroll bar framework - like FB?.. or,just use web-kit's feature and give up on others like gmail ?
or.. is it best to use jquery provided scroll bar framework ?
 
@Len codepad.org/Qb0uNIFj i removed it
 
Len
Okay—so this is the source code being reported by the webbrowser, right?
 
10:36 AM
yes
 
Len
If it's still not working, @gosto, then you don't have PHP configured correctly. That's all there is to it.
What's the URL you're visiting? localhost ... ?
http://localhost/ ...?, rather.
 
@Len yes its still didnt appear this chart of this td
@Len yes im in localhost
 
Len
Yes, but what's the full URL?
I need to see exactly how you're accessing it to work out what's going on.
 
Len
Rename that to test.php and retry.
Your server won't interpret PHP as PHP unless the file ends with .php (by default).
 
10:40 AM
@Len hahahahah yes it works good :) , you look to everything who is small :) , i didnt notice that :) , thanks so much len , u wonderful
 
Len
no problems! Glad I could help, gosto. :)
 
@Len look now ur points they are +30 ;)
 
Len
@gosto: thanks! But, I'd prefer I really only received upvotes where people necessarily agreed that the question was good.
Anyway, it's getting late, so I'll be off! Good luck with the rest of it. :)
 
 
3 hours later…
1:25 PM
anyone here ?
 
you know how to follow scripts which are connecting to website ?
 
What exactly do you mean?
 
i have script block addons of firefox , and i see some scripts blocked , so i want see from where it comes or from where it connects this script twitto.ru
 
Oh... no sorry
 
1:28 PM
or from which file it connects
 
No, but that would be nice
 
i want follow this script
because he get me nervous ,
 
I have to go....sorry
 
i everytime put new file in my website , iget strange rusian site connecting to my website :(
 
 
2 hours later…
3:52 PM
need some advice.. FB has its own scroll bar on the ticker.. web-kit comes with features to design/change the scroll bar (gmail on webkit - re-designed scroll bar,but they've left Gecko with the default scroll bar).. is it advisable to come up with ur own scroll bar framework - like FB?.. or,just use web-kit's feature and give up on others like gmail ?
or.. is it best to use jquery provided scroll bar framework ?
 
4:45 PM
It really depends on what you want for your users, what you want to develop, and what you want to maintain
Hum he is not here anymore
 
 
1 hour later…
5:47 PM
 
LOL
 
Seriously if he does that i will use IE 8 for a month !
 
0
Q: Visual Studio build everytime JS and CSS changes?

AndyI am relatively new to Visual Studio Development and I was wondering - it seems that everytime I make changes to my JS or CSS in my project - I have to "build" the project again. Is there any way to simply refresh the browser as opposed to building everytime ? My understanding is that all the fi...

 
 
1 hour later…
7:13 PM
0
Q: What strategies are you using to migrate your web site from Silverlight to HTML5 + JavaScript?

Shardul KulkarniMicrosoft released Silverlight 5 but there has been no news of any future versions (except service releases) being released. Combined with the increasing visibility of HTML5 and modern JavaScript libraries it now makes a lot of sense to start adopting the new and emerging technology instead of re...

 
 
1 hour later…
8:36 PM
Anyone got any code lying around that allows Function.prototype.apply to be used on any function regardless of the value of Function.prototype.apply, assuming it initially has the built-in value?
 
does the delete trick work
I see it doesn't :p
so unless you can save a reference before it gets overwritten I can't think of anything
 
Yeah, I'm assuming you have a reference.
But how does this help?
 
applyRef.call( fn, ctx, [1,2,3] );
 
That relies on Function.prototype.call having the original value.
 
fn.applyRef = applyRef;
fn.applyRef( ctx, [1,2,3] );
 
8:49 PM
Assume nothing has the original built-in value, and don't mutate the function…
(I'm just wondering if you can actually get something identical to [[Call]] in arbitrary JS)
 
but you have reference to apply?
hmm
maybe in chrome with the valueOf bug
but that's specific to chrome
var EQUALSref,
    o = {
        valueOf: function(){
            EQUALSref = arguments.callee.caller;
        }
    };

5 == o;
false
EQUALSref
function EQUALS() { [native code] }
 
Assume you can get a reference when creating the function to the initial JS engine state, but it might not have it when it runs.
i.e., you have:
var foo = (function(){
  var apply = Function.prototype.apply;
  return function(){};
})();
 
right, without using call or apply the only way to set this is to mutate a function I think
 
Yeah, that's what I think.
Was just wondering if anyone could come up with something.
@Esailija I guess given __proto__ extension you can, actually.
 
I see
how? :P
just by setting .__proto__ = Function make something callable or?
nope :d
 
8:59 PM
Have var p = {apply: applyRef, call: callRef}, and then var old = fn.__proto__; fn.__proto__ = p; fn.call(); fn.__proto__ = old;
Though that doesn't work given ES6 and __proto__ being deletable.
 
how is that different from mutating temporarily
fn.applyRef = applyRef;
//call it
delete fn.applyRef
(function(){console.log(arguments.callee.caller);})()
function eval() { [native code] }
lol
 
@Esailija Object.defineProperty(fn, "applyRef", {configurable:false}) makes that not work
 
well you could call the property itself whatever
there is infinite amount of different property names and they can't all be set to configurable false
 
True, and they do have a finite number of properties.
 
!!> arguments.callee.caller
@Esailija TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them
meh
forgot the bot runs in strict mode
or rather the user code
 
9:24 PM
hi. if ($(this).val() != "e73e4a3f-8426-4d89-954f-ac00efcd9b1f") {//block} where $(this).val() in console is "e73e4a3f-8426-4d89-954f-ac00efcd9b1f" but still it enters the block
 
need some advice.. FB has its own scroll bar on the ticker.. web-kit comes with features to design/change the scroll bar (gmail on webkit - re-designed scroll bar,but they've left Gecko with the default scroll bar).. is it advisable to come up with ur own scroll bar framework - like FB?.. or,just use web-kit's feature and give up on others like gmail ?
or.. is it best to use jquery provided scroll bar framework ?
 
Depends on how good you are with designing the scroll bar
And also if it is really that relevant. If the rest of the site is not that flashy, or if it doesn't need graphics that badly, then customizing a scroll bar is definitely going to be gold plating.
 
5 hours ago, by DieVarDump
It really depends on what you want for your users, what you want to develop, and what you want to maintain
 
@jjpd - I was not able to reproduce your problem.
 
having it really is an upgrade on the site.. my question is shd i go ahead in designing my own framework.. ?.. or use jquery ?
 
9:37 PM
Just to style a scrollbar?
 
The question is : do you really need to style a scrollbar ?
 
I mean, is it going to look like some sort person or animal crawling up and down the page depending on how you scroll? Or do you just want it to look blue with a light blue background
 
i'll try to be more specific,is the scroll bar something of just a "meh.." factor for users ??.. i mean,do they care enf ??.. if they dont.. then,the i'll leave it with the default scroll bar.. if they do on the other hand,shall i put my own effort or jquery ?
 
custom scroll bars annoy me
They can be hard to grab with the mouse
 
if i go ahead in designing it - i'll keep it plain and simple.. a bit like FB itself perhaps..
@TravisJ i agree..
 
9:40 PM
So if you agree, just let the scrollbar user KNOW
 
if you do style it, I would suggest going with something quick, so if you already have the guts of a framework available that you can adapt go for it
otherwise, jquery might be best
 
that's what i wanna know?.. the users point.. is it a "meh.." - dont realy care factor or do they consider it ?
 
Unless your site is running a ton of graphics then it is kind of a mute point
if your whole site looks glittery and amazing, and you have this dull scroll bar, then I could see styling it
 
@LiamNewmarch Hi. Your website is really not clear for color blind people. You really have to work on contrast
 
i'm keeping it simple.. but,elegant..
not flashy,,.
 
9:41 PM
then go with jquery
 
admire trello/stackoverflow...
so.. keeping it along those lines..
with the design
 
I like #3
Keeping the width standard is important I think
 
i've found loads.. was skeptical in using em,,,
i mean in jQuery..
right now.. not using any jquery plugin...
was wondering how much effort it might take to right my own..
and trying to asses whether its worth the effort or not./.
from ur inputs here.. guessing jquery's worth a try..
 
Well if you want to try, then do your own
 
wud it be too much of an effort?.. a bit of a beginner..
 
9:49 PM
and how do you want to learn if you don't try to do things you don't know ?
 
reusability is also there.. just concerned with the amt of effort.. from my research,custom scrollbar framework's not all that easy..!! ppl tend to use jquery,..
anyhow.. thanks for the inputs..
 
So pretty much what you would want to do is wrap your whole site in a div, and then have that div's overflow: auto; css style set, and then you could go about customizing that div's scrollbar
 
10:09 PM
Hi, can I ask a question here?
 
Yes
 
Is it possible to do this with jQuery?
$("button").on(["blur","mouseout"],function(){});
 
you mean without?
or do you mean passing in an array of events
 
passing in an array of events
I just want it to do the same thing when blur and mouseout
 
I tested it and it seems that it does not work
 
10:14 PM
So is there a way to achieve the same thing?
 
At least not with that syntax
 
so I have to do this instead?
$("button").on("blur",function(){}).on("mouseout",function(){});
 
??
 
declare your function outside
 
10:17 PM
^
 
$("button").on("blur",a).on("mouseout",a);
var a=function(){}
 
BUT
you can separate you events with a space
 
$("button").on("blur mouseout",function(){});
 
$("button").on("blur mouseout",function(){});
here we go
just read the doc
 
This sounds cool
 
10:18 PM
    function myFunction() {
        //todo: something
    }
    var myButton = $("button");
    myButton.on("blur", function () { myFunction() });
    myButton.on("mouseout", function () { myFunction() });
 
...
@TravisJ WTF ? are you kidding 6
 
let me try it out
 
just pass your function don't create a new one
 
Won't that only include a callback and not actually run the function?
 
function myFunction() {
        //todo: something
    }
    var myButton = $("button");
    myButton.on("blur", myFunction);
    myButton.on("mouseout",myFunction);
why would you put it in another function, this will be enough
 
10:19 PM
I always leave it the other way in case variables need to be passed
from an examples standpoint
 
yes but you can not remove the events.
 
It works
Thanks
 
what do you mean you cannot remove the events
 
:)
 
Should I start with normal Javascript or with Coffee-script?
 
10:22 PM
@TravisJ well, stop listening an event on an element.
removeEventListener
 
 
@DieVarDump - You are not really making any sense. I am not sure how you got stuck on removing events at the moment or how it even has any context.
 
What ?
An event on a element is linked to the function
If you don't store the function and then just : element.addEventListener('click', function() { myFunction() }, true); you'll never be able to element.removeEventListener('click', myFunction, true);
 
confused
 
"never" is not really that accurate
 
10:30 PM
time to waste more time of my life...
 
I gave you an example. if an example is not " that accurate" for you, i won't be able to help you.
 

« first day (589 days earlier)      last day (4345 days later) »