« first day (1570 days earlier)      last day (3603 days later) » 

00:40
quick question
01:14
@Steve That phrase usually followed up with a quick question
@OliverSalzburg sorry
can you help me write functions using youtube videos
im not sure how to do that
here is example jsfiddle.net/xanw09u2
im going to be using the script for multiple videos but soemone advised me to use functions for it
i donot know
will you be able to help @OliverSalzburg
@Steve Have a look at this: stackoverflow.com/questions/17012886/…
I think if you just duplicate the code it won't work because you can't have onYouTubePlayerAPIReady be called multiple times
01:45
@joshhunt trying
user3117575
02:13
ayy lmao
user3117575
Oh wait, gotta read the rules.
user3117575
aye, cool
Has anyone ever seen / knows where to find a 3.5mm female to 1/4in. female coupler?
hello
how to arrange cube faces
cause its indexing each other
 
2 hours later…
ASR
ASR
04:13
Hi all [email protected] is a proper email address????
woooooot damn working on this react toy app most of the day..
finally starting to understand it.
well not react, react is easy, flux is the part where I'm like wtf.
04:54
Hey guys, I am trying to get the current geolocation of my device in a cordova application but it never prompts me to switch the GPS on and still provides me a location based on my network. I have set highAccuracy to true in the options as well.

Any hints on how do I prompt the user the same way, it happens in a native app ?
 
2 hours later…
06:24
user4202350
07:15
Hi Guys, have some query
In my web application i am using one drop down button , to make it look good i used background-color: #9366B4 in CSS and it looks good , but some times i need to disable the same dropdown , and with this bg color it looks blurred.,
user4202350
07:31
user4202350
Just see the difference
user4202350
.dropDown{
color: #FFFFFF;
background-color: #9366B4;
height: 2px;
width: 120px;
font-size: 11px;
font-weight: bold;
direction:ltr;
}
For both disabled and not disabled
same dropDown
@ShaU fiddle?
user4202350
i dont use fiddele
user4202350
@jdphenix did you see the pics? -->http://www.uppic.com/uploads/14228620471.png
07:40
That's how it renders on my browser (Firefox 35) , why is the height set 2px?
user4202350
@jdphenix o.0 ?
user4202350
I using IE 11
jsfiddle.net/jdphenix/s5nfyxLm is that close to what you have?
user4202350
<select styleClass="dropDown" disabled>
<option> This is a Choice! </option>
<option> This is a Choice! </option>
<option> This is a Choice! </option>
<option> This is a Choice! </option>
</select>

<select styleClass="dropDown">
<option> This is a Choice! </option>
<option> This is a Choice! </option>
<option> This is a Choice! </option>
<option> This is a Choice! </option>
</select>
user4202350
But why color is not appearing?
07:43
Stupid downvotes.
-1
A: Need REG EX for following condiions

Rahul Desai/[a-zA-Z]+.*/ will do it. Checkout the demo here: https://www.regex101.com/r/qL8hD6/2 Explanation: a-z matches a single character in the range between a and z (case sensitive) A-Z matches a single character in the range between A and Z (case sensitive) + matches a-z/A-Z between one and unlim...

jquery mobile popup will change the hash of location, how to avoid this behavior?
@ShaU, That's how it renders on my browser (Firefox 35) , why is the height set 2px?
Changed it to something sane (like omitting it completely) and got this,
I tried 'history:false', but my phoneGap still will jump to a blank page.
user4202350
@jdphenix Size thing is working in my browser
user4202350
@jdphenix the first one is disabled?
07:48
Yes, it is in fact on the fiddle. I'll even collaborate with you
user4202350
Can you update the link for fiddle?
user4202350
@RahulDesai busy?
user4202350
@jdphenix Hey It is working there.. But why not in my Browser?
07:53
In your browsers developer tools check the css styles for the disabled element
user4202350
@jdphenix It is blocked for me :(
user4202350
@how to do i check it in developer tools?
08:10
@argentum47 not much. Whats up?
going to play ping pong, brb
@RahulDesai I am trying to make a small one-to-one chat application, I can't get how to restrict, I mean create one channel per connection and limit to two users. I am using socket.io, and mongoDB as DB for the time being. Shed some light
08:28
hello, I have a newbie question, why is my change method only works once?
@anathema 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.
here is the code:
$('#drop_down').change(function () {
if ($.browser.msie && $.browser.version.substring(0, 2) === '8.') {
$('#footer').css('marginTop', '0');
}
});
08:49
Is adding to obj.__proto__ roughly the same as adding to obj.constructor.prototype? (Aside from the fact that the second one will affect all objects of that prototype and the first won't)
09:00
__proto__ is the reference in the constructed object to the prototype used to construct the object
maybe reference isn't the best word
@argentum47 See this if it helps: github.com/rahul-desai3/chat
you can check the user count to limit the users to 2
9k user acts retarded and says it doesn't work without telling what he expected
@dystroy halp why does console.log return undefined!? Pleze tel me I cant us gogle
I can't close for poor quality?
09:11
"too broad" works
"too broad" as in "I would have to start explaining life and computers from the very start"
Once upon a time, there was a guy named Von Neuman who came up with model of the modern computer....
@dystroy He said what's wrong... don't confuse acting retarded and being confused...
oh, why does map work and not forEach? — alexchenco 17 mins ago
09:26
Hi. I'm trying to find a script which "flip"site ( for multilanguage) so all float:right would become float:left, same for text-align ,margin-left , direction... but I can't find any. (which is really weird).....does anyone met something like this ? ( the problem is that a css can be inherited....
(the closest thing I've seen is this) , but problematic with margin-left (for example)
film?
09:43
?
do JS event listeners write to the windows application logs?
my page keeps freezing and i need to find out why
mr5
mr5
Anyone here have used QuoJS?
hi guys
hi dystroy
is it good to load country list from server and put it in ng-repeat of AngularJS to be displayed on webpage
09:46
how would you guys create a meter readings dials input, I'm thinking of use 5 inputs
and wrapping each in a border
how can i add an event listener then retrieve the log so that i may work out why my page is freezing
can i simply use console.log on my functions?
smth like:
10:07
@SuperUberDuper you want to make something like that?
why use 5 inputs and not just display a number?
user4202350
@jdphenix It did not helped me much...
my design team wants them seperate to look like a meter reader..
the client knows best @DrogoNevets
you can make them look seperate though can't you?
design team are not client though, they are a design team
hmm, how would the css be?
yeah but business team wants it like design
again not hearing a client
user4202350
10:15
Can anybody tell me -- if we are using any background color in text field and if it is disabled why text looks like it is blurred?
do whats right. not what youre told
@ShaU Convention. It would be awful if nothing was visually different when disabled.
user4202350
@RoelvanUden Can we do something about it . i am using IE 11
I think not, and I don't want to, but I might be wrong. Ask on SO.
user4202350
Nah...if i ask anything ...people will start down voting till it get deleted....
user4202350
10:18
or else can you frame some question ?
dont ask people to do the leg work for you!
we don't help vampires, thanks.
user4202350
come on again...
user4202350
dont kick me for silly reasons
user4202350
Till now i was very serious about my query.. dont make me turn into Troll again
10:21
hello
@ArshvirKaushik 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.
oka
my question is:
Range slider does not slides in mobile view or touch devices
1 down vote favorite


I've already tried as mention to this site (http://touchpunch.furf.com). But still i am facing the same problem. I want to make it work whether it is on touch devices also. please suggest me any working code of slider in mobile view also. Here is a code on which i want to apply in mobile view(make it moveable).
@ShaU we dont make people turn into trolls! you were vamping plain and simple
@ArshvirKaushik simple answer is probably the touch device differentiates between mousedown, and mouse move, and touch and drag
user4202350
@DrogoNevets hmmm... may be you dont know about me!! Never mind .... if anybody have got something please let me know.
10:27
@DrogoNevets how can i apply this to my code.
i dont know, i dont know what slider youre using, what your code looks like, its a known struggle for mobile dev
wait sir
<div id="distance-range" class="ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all">
<div class="ui-slider-range ui-widget-header ui-corner-all" style="left: 0%; width: 100%;"></div>
<span class="ui-slider-handle ui-state-default ui-corner-all" tabindex="0" style="left: 0%;"></span>
<span class="ui-slider-handle ui-state-default ui-corner-all" tabindex="0" style="left: 100%;"></span>
</div>
i want to make it(ui-slider-range) movable whether in mobile versions.
like normal
make me a working jsfiddle and i might look at it if i have time - thats just HTML
how would you style a text input to make it look like seperate dials for a meter reader?
10:37
@SuperUberDuper dont keep reposting the image - a monowidth font for starters, with a background image
@SuperUberDuper why would you want to style input to look like output?
@BartekBanachewicz there is also that, but im thinking "submit meter reading" type thing
hello
gif from Sippy was moved
@DrogoNevets "submit" "reader"
those things aren't typed in directly
you could always use separate spans and only provide +/- buttons
10:39
@BartekBanachewicz as in gas meter, over here (in UK) we type them in directly
@DrogoNevets into the device with such a rotary counter, or somewhere else?
onto a website, the meter itself has a rotary meter like that, so one could argue it is trying to make it so the user can see the similarities
How to execute jquery script after all other scripts
I have hyperlink that when it clicked , i want a confirmation message but when i select this link through $("#mylink") , it can't be detected because it placed in the page on the fly
so how can i select such elements ?
@DrogoNevets and my point exactly is that it's made to be read from, not typed into :P
@Bassem doesn't matter whether is placed in the DOM dynamically, you fucked up your query.
@BartekBanachewicz , it can't be fetched .
!
user4202350
10:45
@Hi Bartek
@Bassem that means the computer doesn't like you.
@BartekBanachewicz mmmmm , so should i smile :) :D
10:50
@FlorianMargaine thats exactly what i search for
thank you so much :) :)
Hi all,
i have this function which appears correct but its writing to the console like its inside the loop
function getSystemMessages(x) {

        x.success(function(real_data) {

                    $('#msg_alerts').find("tr:gt(0)").remove(); //TEST - REMOVE PREVIOUSLY LOADED MESSAGES?
                    $('.tbl_messages').find("tr:gt(0)").remove();

                    //console.log(real_data);
                    var result_array = "";
                    var result_row_array = real_data.split("^");
                    for (i = 0; i < 20; i++) {

                        var current_row = result_row_array[i];
@DrogoNevets nice thanks!!
even though console.log func is outside the loop it performs like its inside
@Corbo152 how often are you calling getSystemMessages?
@DrogoNevets think you may have just found the issue for me... i have a timer which runs on page load... which calls this function... that timer is never stopped
so every 2 seconds its executing the function again?
11:01
@Corbo152 is it appearing in the console every 2 seconds ish?
hard to say changing the interval to 10 seconds now to check
changed to 10 seconds and can confirm its writing every 10 seonds
added function to stop timer on success of function
still writing to the console every 2 seconds but now only one row of data twice
function getSystemMessages(x) {


            x.success(function(real_data) {

                $('#msg_alerts').find("tr:gt(0)").remove(); //TEST - REMOVE PREVIOUSLY LOADED MESSAGES?
                $('.tbl_messages').find("tr:gt(0)").remove();

                //console.log(real_data);
                var result_array = "";
                var result_row_array = real_data.split("^");
                for (i = 0; i < 20; i++) {

                    var current_row = result_row_array[i];
                     result_array = current_row.split("¬");
here are my functions to start stop the timer etc
function startAlertTimer() {
            AlertTimer = setInterval(function() { getKioskMessages() }, 2000);
        }

        function stopAlertTimer() {
            AlertTimer = clearInterval(getKioskMessages);
        }

        function pageLoad() {
            if (kioskMachineID !== "" && kioskMachineID !== "-1") {
                getKioskMessages();
                setInterval(function() { getKioskMessages() }, 2000);
            }
        }
11:18
where is AlertTimer defined?
sorry missed the var of the front
ok, that's an issue
clearInterval takes the value that is returned from setInterval not the function
eg:
var timer = setInterval(myFunc, 2000);
clearInterval(timer);
^ dat
but putting var infront of AlertTimer in the function there will mean it doesn't exist outside of that function (scoping)
@DrogoNevets Which is generally what you want.
11:23
@DrogoNevets thanks i am aware of that... if i return the alert timer to the function it wont be outside scope tho right
@Corbo152 Correct.
@SecondRikudo agreed, but not necisarily in this case (looking at the code)
@DrogoNevets If you want something in an outside scope return it.
@SecondRikudo yes but I wasnt going to do all the work for him!
Alternatively, define the variable on an outside scope and have it propagate inside (but returning is better)
@DrogoNevets :P He seems to have it figured out
11:25
yea, so all good
is it bed time now?
i wish lol
this looking better
   function startAlertTimer() {
            var alert_timer = setInterval(function () { getKioskMessages() }, 2000);
            return alert_timer;
        }

        function stopAlertTimer(alert_timer) {
           clearInterval(alert_timer);
        }
@Corbo152 You can simplify to return setInterval(...)
Actually
crl
crl
it's a pain that we can't read pixels from a cross-domain image...
return setInterval(getKioskMessages, 2000)
11:29
no it's a pain that we can't read keyboard inputs from a cross-domain page...
all my dreams.. dest, of getting bank accounts and stealing millions of ca$h !!!
function MyTimer() {
   return {
       start:  function(func, time) {
           time = time || 2000;
           this.timer = setInterval(func, time);
       },
       stop: function() {
          clearInterval(this.timer);
       }
   };
}
crl
crl
@jAndy ok but for simple images, why this limitation? it won't harm anyone
just download the image of desire from your backend/server script and do the work there, interacting with your client
on the client it's just a huge potential security issue
@Neil thanks... now not running the getKioskMessages function
function alert_timer() {
return {
start: function (getKioskMessages, time) {
time = time || 2000;
this.alert_timer = setInterval(getKioskMessages, time);
},
stop: function () {
clearInterval(this.alert_timer);
}
};
}
gone back to this
 function startAlertTimer() {
     return setInterval(function() {
         getKioskMessages()
     }, 2000);

 }

 function stopAlertTimer() {
     clearInterval(startAlertTimer);
 }
and the function call to stop the timer
function getKioskMessages() {
            if (kioskMachineID !== "" && kioskMachineID !== "-1") {
                var promise_msg = doAjaxReq('/active/NovusSystemMessages.ashx?m=' + kioskMachineID + "&c=1");
                getSystemMessages(promise_msg);
                stopAlertTimer();
            }
        }
11:44
@Corbo152 func is the parameter name
That means when you call it, you should call it using myTimerInst.start(getKioskMessages)
It is done that way on purpose so that you can use it for other functions
user4202350
0
A: Same CSS Different Look and Feel

Swapnil MotewarYou should be able to target it with CSS using the :disabled pseudoclass. select:disabled{} For IE, it's only supported in version 9. All other modern browsers support it. In older IE versions you can use: select[disabled] { background-color: blue; } But it only allows you to change the back...

@Neil oh so like this
 function alert_timer() {
            return {
                start: function (alert_timer, time) {
                    time = time || 2000;
                    this.alert_timer = setInterval(alert_timer, time);
                },
                stop: function () {
                    clearInterval(this.alert_timer);
                }
            };
        }
window.onload = function () {
            window.addLoadEvent(pageLoad());
            //addLoadEvent(startAlertTimer());
            window.addLoadEvent(alert_timer.start(getKioskMessages));
        }
works mate thanks :)
been banging my head on the wall for ages trying to fix this
Why does the direction of text is not changing here ? jsbin.com/qixahamuki/3
now to just work out how to stop up from loading all 10000 messages at once so the page doesnt crash lol
in ember do templates have to be lowercase? I have an error like this: : Unable to find partial with name 'partials/readingsout', where as the actual file is named readingsOut
12:00
Any help ?
@RoyiNamir direction doesn't work like that on inline elements.
<td class="ui-pg-button" title="Clear saved table settings">
<div class="ui-pg-div">
<span class="ui-icon ui-icon-closethick"></span>
</div>
</td>
How would i know if td tag with title="Clear saved table settings" exists in DOM
12:22
!!tell ScoRpion mdn querySelector
@CapricaSix Thankyou, I already did that with
$(".ui-pg-button").each(function() {
if( $(this).attr('title') == 'Clear saved table settings' || $(this).attr('title') == 'Clear saved table settings') {
pagerAlreadyExist = true;
break;
}
});
You can search for an element with an attribute value.
Thats what I have done @RoelvanUden
No, that's not what you have done. You can do it in one line with a selector.
12:27
@RoelvanUden Let me check
I am not able to understand how can i do it with class
css
Oh shit, arr.splice(i,n,undefined) isn't the same as arr.splice(i,n)
I want to store HTML as text in an element. Is CDATA a good solution to avoid having to &lt; everywhere, or is CDATA not supported in HTML?
@KendallFrey Eh?
Why no textContent ?
el.textContent = '<this>works</this>'
12:40
@dystroy Because then I'd have to put it in JavaScript, which has its own escaping requirements.
first and foremost being \n
A/S/L?
(This is a moderately large HTML string, including <script> tags)
@KendallFrey you mean you're doing that server side and you don't have a function server side for that ?
@snowYetis Hu ?
12:42
@dystroy I'm doing it serverside in the sense that I'm just writing an HTML page by hand.
@KendallFrey select, ctrl-h ? Or write 2 lines in io.js or go and call that a site generation platform ?
@KendallFrey Couldn't you store it in an HTML5 data attribute?
Should I or should I not use CDATA?
@snowYetis How would I store a large multiline string in an attribute?
define large
@KendallFrey define larg
50 lines of assorted HTML and JS
12:45
@KendallFrey haha, ya use CDATA
@KendallFrey Can you store this block of HTML and JS in an XML file and then read it from the XML file when you need it?
I'm hoping to avoid AJAX
it is not that hard
I know, I'm just hoping to avoid it
@KendallFrey You can use CDATA tags outside of an XML file?
That's my question.
I know CDATA is an XML construct, but I've seen answers using it in HTML.
12:48
@KendallFrey CDATA is meaningless outside of xhtml
@KendallFrey I am too lazy to read, it is 7:49 AM, here.
I'm still pretty sure that textContent can do that @KendallFrey
Do you have an example string?
(Where does it come from, the server?)
@KendallFrey One last thing... If you put a bunch of JS in HTML, the potential of someone changing it and submitting back to the server is pretty damn high.
<div id="foo">
  stuff
</div>
<script>
  stuffity("stuff", stuff());
</script>
@SecondRikudo It comes from my magical fingers
@KendallFrey use a script tag with a custom type of a template element.
12:51
@snowYetis I don't know what you mean.
Those are your two realistic options.
@BenjaminGruenbaum I'd still have to escape closing tags. I want my HTML to look clean.
The script approach is common in backbone apps and when using handlebars. It works pretty common just give it a custom type.
@KendallFrey no you don't - that's why a script tag is used and not another tag - since the browser doesn't touch it:
<script type='template' id='foo'>
    arbitrary HTML here, won't be escaped
</script>
Just remember to set the type so it won't get processed as JS and you'll get errors.
@BenjaminGruenbaum I have script tags in my string
2 mins ago, by Kendall Frey
<div id="foo">
  stuff
</div>
<script>
  stuffity("stuff", stuff());
</script>
That's generally what the strings will look like
Ok, then what about a template tag?
12:53
What do you mean?
Why are you including external scripts in a template by the way? That almost never makes sense?
I think it's time to stop playing X-Y
@KendallFrey if you only have to support new browsers there is a special tag called template that is designed for templating new content - even comes with data binding and all the fun and puts it in a fragment.
So here's my full situation:
@KendallFrey I think that's a good idea.
12:54
@KendallFrey Probably is, spill.
I want to make a code sample page, where one element displays a certain HTML string as text (in a <pre>), and another one displays it as rendered HTML.
hi guys im getting undefined is not a function on this line
I don't want to duplicate my code, for fear of typos
alert_timer.stop();
12:56
use a statically compiled language
iv tried
I also don't want to have to write strings full of escape sequences
@Corbo152 alert_timer.stop is undefined - next time you should learn how to read errors.
alert_timer.stop(jJquery);
@KendallFrey then what Dor said should work: fetch the .innerHTML of the rendered result and put it in a .textContent of the <pre>
12:57
That's what I did at first
user4202350
@BenjaminGruenbaum Please dont delete it
But the HTML was modified by the script
@Corbo152 I can see your error, but I don't want to tell you how to solve it because you can figure it out. Make a fiddle and isolate it.
@KendallFrey hmm, interesting. The other way around is as problematic since if you attach <script> tags dynamically they won't run IIRC.
12:59
wait, really?
Don't take my word for it (mainly because I'm not sure) - but that's how it works. Lemme try real quick.

« first day (1570 days earlier)      last day (3603 days later) »