« first day (642 days earlier)      last day (4311 days later) » 

12:13 AM
Hey @copy, you helped figure out how to make javascript wait till jquery was completely loaded. Could you tell me a little about how javascript works? I'm still having trouble with this loading of external files and missing definitions
In some cases it works (when everything loads first) and some cases i only get partial results (code executed before code loading completion)
 
I helped you ? Woah, I must have been drunk
 
To be more precise, In my script I load jquery
lol
Well, then I hope you are drunk right now then
 
Not really, no
 
So I load jquery (well, attempt to load it)
and then comes some definitions that use jquery
question, does javascript need to know that jquery is there for my functions definitions to execute correctly?
 
Well let's try
jQuery("body")
ReferenceError: jQuery is not defined
Nope, doesn't work yet
 
12:18 AM
/* Code to load jquery goes here */
function doSomethingWithJQuery(){
/*some jquery stuff*/
}
function runWhenLoaded() {
if (typeof JQuery != "undefined") {
doSomethingWithJQuery();
} else {
setTimeout(runWhenLoaded, 50);
}
}
runWhenLoaded();
I believe you gave me the function runWhenLoaded
before I had code inside the if statement and things were working fine
but now that I define things outside, I don't know, this is just giving me a headache
 
s/JQuery/jQquery
 
huh?
 
You shall replace JQuery with jQuery, I say
 
@jmlopez you can edit your chat messages. Just click the arrow that appears when you hover over and click edit.
 
@SomeKittens, thanks, how long do I have till that option goes away?
Ok, I got an idea. I will just place everything inside the if statement. And if that doesn't work well then ...
I better go get a drink.
See ya
 
12:28 AM
I could go for a drink too
 
Does anyone see anything wrong with this bit of code?
' $(".Agthumb").click(function(){
var location = $(this).attr("src");
$("#theImage").attr('src', location.substring(1));
});'
I am trying to replace a large image by selecting a thumbnail
the substring function is used because there is a period that needs to be stripped off of the original filepath
 
 
2 hours later…
2:14 AM
0
Q: Making javascript button function for game

akamercI have made up some javascript codes to try and make them function the way I need them to, but can't get it the way I need them to work out. What I need is to get this code to work with an iamge Javascript code: function NewGame() { document.forms[0].reset(); location.reload(); } Html code:...

 
3:06 AM
hello everyone, :)
could you help me here http://stackoverflow.com/questions/11553356/how-to-post-query-sql-that-user-typed-from-jquery-mobile-form-to-wcf-service-and
I can't post my form in json format.
 
3:19 AM
Hi everyone!
 
hello
 
What is a good way to make a webpage that will respond to different size of the window?
 
using div?
 
using javascript
 
3:27 AM
Only CSS?
 
so far what I get
 
I was thinking about this: responsejs.com
 
that's a tools for make a responsive web page, isn't it?
 
it's a jQuery plugin
 
can someone answer me a usability question. suppose their is prev,next button on a site. which thing work better. hide the prev when their is no element on left side or make the opacity less and make them visible. which one is best idea.
 
@blankon91 Cool, I love videos
 
@AnkitGupta I prefer with the second idea
@Derek hope it help :)
 
@blankon91 thanks
 
@AnkitGupta you're welcome :)
 
4:36 AM
RT @shs96c: .@detronizator is doing great work with GhostDriver (#webdriver for #phantomjs) http://blog.ivandemarino.me/2012/06/26/GhostDriver-almost-50 Feel free to give him a ...
 
@blankon91 Just finished watching the video, it did help!
 
4:58 AM
0
Q: Jquery thumbnail buttons not working

atomSmasherI want to change a larger picture by clicking on a thumbnail. For whatever reason, it's not working. I have no clue what I am doing wrong and I have wasted too much time for something so simple. Thanks for looking: HTML - Head.php ....... <section> <img id="theImage" src="images/mods/...

 
5:38 AM
@Derek glad to hear that :)
 
 
1 hour later…
6:44 AM
'ello
have a question.. keypress = 44 denotes which key.. had some random code (js) on my site was wondering what it did
 
!!>String.fromCharCode(44)
@Zirak ","
 
jsfiddle.net/y6BCP/14 works on Chrome, Safari and FF but not working in IE, any workaroud ?
 
guys, i'm a cpp programmer and new to js, who can explain the code blow means what
(function() {
if (typeof jQuery === "undefined") {
// jQuery code as it is goes here
}
// my code
})();
when these code will be executed?
 
7:00 AM
sorry, i mean
<script type="text/javascript">
(function($){
///mycode
}
})(jQuery);
</script>
when 'mycode' will be executed
 
hello friends
difference between ui-hidden-accessible and ui-hide-label ????
 
7:18 AM
@auxten First of all: (1)Learn javascript, (2)use a library, not the other way around. Second, I think Paul Irish made a video explaining that and some other stuff; search for something around the lines of "10 things I learned from jquery source"
 
@auxten u have any idea about my question
 
7:51 AM
0
Q: Testing Backbone Model using Jasmine

Lorraine BernardIt is the first time I write a javascript test for a Backbone Model. Looking in the web resource there are not so many items about this subject. I found this one, Testing Backbone applications with Jasmine and Sinon, which is pretty old (mars 2001). Anyway I would like to know: 1) there ar...

 
8:22 AM
Yo.
 
Hi everybody!
How come that
$.getJSON("index.php", {q: newValue}, function(data)
{
// alert(data);
$.each(data, function()
{
addElementToList(this.ID);
});
});

is only executed if the alert is set??
 
That's because of solar flares.
 
says the "unicorn whisperer" ;-)
 
That's what my unicorn told me, I swear!
 
o/
 
8:36 AM
\o
 
^^
no honestly, any idea? it's basically the same example as in the jquery docu:
http://api.jquery.com/jQuery.getJSON/
 
Does it enter the loop?
 
no
 
8:59 AM
hi anyone familiar with phonegap+ sencha + android?
 
0
Q: Why does XMLHttpRequest not seem to follow a naming convention?

AlecI've been working with the XMLHttpRequest object in JavaScript recently, and I couldn't help but notice that the casing of this name makes no sense. Why is 'XML' all in caps while 'Http' is not? They're both acronyms! Surely it'd make more sense for the name to be one of the following: XmlHt...

 
anyone used this History.pushState(null, null, URL );
 
yay, got the yearling badge \o/
 
@FlorianMargaine do u know History.pushState?
 
yeah, we got a beer last time. It was fun.
@OctavianDamiean Hey.
 
9:14 AM
I like Android, Phonegap is funny and Sencha is meh at best.
@FlorianMargaine Yo. :)
 
how ya doin?
yo mama
 
Fine fine.
 
cool
I'm giving a training this morning
about javascript!
 
Oh nice!
 
@OctavianDamiean could you help me with it though?
 
9:15 AM
What audience?
 
having problems with using the camera
 
@Urban I can't with Sencha.
 
a new trainee
he's having fun with the checkSpam function there right now: javascript.info/tutorial/string#highlighter_355976
 
@OctavianDamiean can Phonegap use the camera? If so, can i somehow link phonegaps camera functionality with sencha?
 
he has to replace me, I'm leaving in two weeks
so... well
training him the basics of javascript will help him, I hope
 
9:17 AM
Oh. Are you going for better position?
 
(and no, no jquery training!)
 
1 min ago, by Octavian Damiean
@Urban I can't with Sencha.
 
yup, I was still a student in alternation up till now, having a real job starting september
 
:-/ Thats why I asked if PhoneGap can do it.
not Sencha
 
9:19 AM
> ... If so, can i somehow link phonegaps camera functionality with sencha?
...
 
Did you answer my first question? The second had an if so
 
Well, I can answer your first question. Look up the documentation.
It is all in there.
 
wow thx. So helpful.
 
It is the truth. Spend two minutes on the documentation of Phonegap and you'll find the answer to your first question ...
I'm not a manual-to-user interface.
 
9:45 AM
Octavian, y u no helpful?
 
0
Q: How to Minimize my jQuery Dialog?

Fawad Ghafoori am using jQuery Dialog to show video.video is working nice. what i need to do is that i want to Minimize the Dialog just like in OS . A small icon like (" - ") that would minimize my dialog. and When i press (*) this is closing the dialog but Not video ? Here's my code //Watch Video $(".watc...

 
0
Q: Closure handling in javascript / jquery ajax

KevinI'm using this pattern (for want of a better word) repeatedly in my code to call a REST API in my javascript code. Some particulars of the code below. I have a ConfigViewer javascript class that is responsible for creating, populating and handling events for DOM element. This class constructor ...

 
Hello everyone!
 
@Killah hi
 
oh wow
15
A: Is it worth moving from Microsoft tech to Linux, NodeJS & other open source frameworks to save money for a start-up?

Florian Margaine£100/month? How much do you cost? How much is going to cost your training? If it's £100/month but you can get a .NET app up in a month, while you will need at least 3 to 6 months to get your node.js/C++ app running, go for the .NET. Seriously. Your time is way more expensive than these little £1...

15 upvotes on this :o
10 upvotes since this night, what happened?
 
9:55 AM
Define night in your timezone ;)
 
we formed an alliance to upvote a random answer of you
 
hello everyone!
 
Anyone here tried to implement Perlin Noise in JS? Or in any language?
@Kirzilla hi
 
Please tell me, how to understand this: (function($){ ... })(jQuery)
Ususally jquery plugins being wrapped with this constuction
 
This is so called closure
Function that is executed immediately.
 
9:57 AM
looks like we're creating function and passing jQuery to this function as argument to ensure that $ is real jquery, but not something another, right?
 
It's helpful because it limits the scope of anything you do there.
 
yeah, I know about closures, but this syntax seems to be something not regular
 
It is ;p
 
@GNi33 haha
 
it just makes sure that $ is jQuery in the context of your wrapping function
 
9:59 AM
It's like (function (window, body) { ... })(window, document.body) or whatever
 
as there are several other lib's and whatever using $
 
Aha, I see! Thank you very much!
 
people do this with undefined too
 
@GNi33 I just couldn't find the right words to describe that ;p
 
@GNi33 can you show me how?
 
10:00 AM
function($, window, undefined) { ... }(jQuery, window)
so undefined will be undefined in that scope for example
 
Can undefined be ever defined?
 
makes no sense in strict-mode (thankfully), because you can't define undefined anymore
 
Why we need var undefined?
 
@Kirzilla how long are you programming in JS?
 
10:02 AM
not so long
 
you'll need undefined ... a lot
 
We can always check if ver is undefined just using something like typeof variable == 'undefined'
 
Ok, so this was understandable.
 
undefined is falsy, which makes checks easy
 
I should be checking var == undefined instead of typeof var == 'undefined' ?
 
10:05 AM
depends
 
I thought that undefined is reserved word in js
 
if you can leave out all the other falsy-values like null or 0, you could just check for !var
 
If someone ever tried Perlin Noise algorithm, could you check what I did wrong here: killah.killahforge.com/JavaScript/Misc/PerlinNoise.js ?
 
@Kirzilla both are fine, the latter is preferred for compatibility
 
10:38 AM
Can anyone please help me?
http://stackoverflow.com/questions/11558167/checking-a-directory-for-a-file-in-phonegap
 
Hi guys, does anyone have any experience with SOAP in Javascript?
 
0
A: Checking a directory for a file in phonegap

Florian Margainereader.readEntries(function(entries, filename){ This is the function defining entries and filename. For example, this function might do something like: readEntries: function( callback ) { // do something, then callback( some, datas ); } If you just want to use filename in this funct...

@AndersMetnik read some basics about js :]
javascript.info is a great tutorial
@GNi33
would you answer this?
Okay I see, I'm a horrible @ JS. Can you tell me how I can get true/false back from the function checkIfFile....? — Anders Metnik 57 secs ago
(see the answer, about "the second part")
 
10:58 AM
Thanks.
 
@AndersMetnik: I don't mean to be rude, really.
TThe problem is just that younre not executing the function
 
if(doWeHaveIt())
amiright?
@AndersMetnik do you understand, why the if - clause always gives you true?
 
I didn't take it as an offensive action mate
Yes i do now, somewhat. but I really wan't to learn this stuff, so im reading the guide @FlorianMargaine gave me. I'm so tired of not getting this instantiation and etc. what he called it ;)
I'm just a poor java/android programmer thrown into the deep end with the assignment "make this in html5" ;-)
 
you're checking if doWeHaveIt exists/is defined
 
pretty new to javascript myself, but it looks like doWeHaveIt is being declared as a function
 
11:09 AM
but what you want to do is instantiate / execute the function
 
is that right? so as Gni33 said, checking if it exists/is defined will always result as true
 
doWeHaveIt !== doWeHaveIt()
 
correct me if i'm wrong here
 
it will, because it is defined
right before the if-clause
 
woo, 10 points for me ;)
imaginary internet ego points, that is
 
11:12 AM
Haha ;)
 
i haven't got many of those :(
 
Hey guys !
 
@Gni33, you're awesome
how's that? ;)
 
yfrog.com/oeko4hlj <- Reading this i really dont wanna live on this planet no more
 
woohooo ;)
@Abhishek o/
 
11:13 AM
now that I've buttered you up about, have you any experience with SOAP in Javascript?
 
Guys, i will come back and ask again after readying the guide, how that ok, thanks for helping though :) But I need to understand this better, basicly.
 
@GNi33 \o , me is back from a long tiresome day at college expect me to be a bit out of mood today
 
@Abhishek that is depressing
 
@AndersMetnik so you are already on a good way
 
@breadbin This college will send me to chronic dipression for sure
 
11:14 AM
cheer up, mate!
 
oh I meant the link you sent :)
 
@Abhishek my day/week isn't very good either, we'll survive. Some gif to cheer you up ;)
 
and if you really need cheering up, watch the Laddergoat video on youtube. There's no way to not laugh at that video. And laughing releases endorphins that make you feel better!
 
 
@breadbin that one is even worse.
circles ?
 
11:16 AM
nah, i guess that gif is huge...
 
seems like it
 
and i should really stop posting gif's
 
erm i get dipressed because of the simple method they teach us :-/
what they have command on :-((
 
Thanks @GNi33. And btw, I can suggest that you try out Crossfit if you wanna feel better, it's the best stress reliever I have ever tried for sure :)
 
Crossfit?
 
11:19 AM
Juggling is what usually does it for me.
 
skateboarding for me
 
a lot of my friends used to skate. i saw/learned a lot from them. and i could never understand why rodney mullen isn't more famous.
 
he isn't?
man, the guy is an icon
 
-4
Q: Subtract percentage

S VarunI need to subtract some value as a percentage, like 200 - 12%. How can I do it with PHP?

did he skip like every single math lesson at school?
 
hehehe
 
11:22 AM
ah yeah, but what i mean is, Tony Hawk is famous as hell. but no one who doesn't skate has heard of rodney mullen.
hehehe
 
@ThiefMaster I don't know how these braindead people can even turn on their computers
 
@breadbin probably because he hasn't got his own video-game
 
yeah i guess so. he's a god.
i was never really entertained watching any other skaters. but he's amazing.
no homo ;)
 
I mean, it would be different if he knew what to do but just not in php
 
I smell the question-ban-hammer hitting him hard in the face soon
 
11:27 AM
Hi i am use to javascript in php in javascript late responce ?
how to incress the javascript responces;
 
you what?
 
oh dear god
 
wow, now that question really sucked ...
 
Might be a very very young programmer that havn't had math yet.... :P like 4years or so :P
 
@GNi33 :-)
 
11:29 AM
it's not math
 
not even once
 
@ThiefMaster Probably he is a jQuery developer
 
algebra then :)
 
@NikunjAkabari: I'm sorry but my crystal ball is foggy today.
 
11:30 AM
@Esailija NO, THIS IS SPAARTAAA!!
 
ah, SE - pages like these always make me feel so stupid
 
@NikunjAkabari you indian ?
 
@Abhishek yes
 
do you know hindi ?
 
11:31 AM
" Hi i am use to javascript in php in javascript late responce ?
how to incress the javascript responces; "

Over there did you meant to say that javascript is slower then php ?
 
@Abhishek my english is poor
 
you can speak hindi , i will translate for you. [ if i am available ]
and kya tum ye kehna chahte ho ki javascript php se slow hai ?
 
Heh, do you actually have the word "slow" in hindi?
 
google translate is giving me nothing on that
 
@Abhishek Yea, PHP is slow as hell. I agree.
 
11:34 AM
Man that is some service you are running there @Abhishek ;)
 
i don't mean to be spamming the room with this, but it's gotten no response so far... has anyone got any experience working with SOAP webservices in Javascript?
 
Sorry none what so ever, if you hadn't allready guessed ;)
 
@Abhishek mene javascript use ki hai but javascript me alert box late responces de rha hai
@Abhishek php me javascript use ki hai mene javascript me alert ka use kiya hai.but alert box late display ho rha hai
@Abhishek jo late responces arha hai vo browser ki problem hogi kya ?
 
lol
 
@ThiefMaster \we call it dhere
@NikunjAkabari okay people here is what he wants to say
he has used javascript but the alert box responds very slow. now he probably has delivered the page using php [as an additional info] . He is wondering if this slow responce is problem of browser
@NikunjAkabari kya tum apna code share kar sakte ho ? [ can you share your code please ]
 
11:42 AM
yes
 
@OctavianDamiean @OctavianDamiean that sentence mean javascript is slower then php
@NikunjAkabari so please share!
 
function addtofav(favid){
var videofavid = favid.title;
$.ajax({
type: "GET",
url: "protected/views/site/ajax_addtofav.php",
data:"favid="+videofavid,
success: function(resp){
alert(resp);
}});
}
 
@NikunjAkabari sun , yaha ho ye ra hai ki
too ek page ko request send kar ra hai to jo time tujhe alert box dekhne me lag ra hai wo asal me poori request ka time hai
 
@Abhishek alert dialog box 6-7 second ke bad display ho rha hai
@Abhishek ok
 
@Abhishek good thing they have nothing to do with each other
 
11:46 AM
its normal dont worrry! haa 6-7 seconds lag is slow!
 
birnen und äpfel :P
 
@Abhishek fast responces mil skta hai ?
 
@NikunjAkabari apna server code dekh tere server code ka time depend karega.
 
@Abhishek LIES!
 
@All well his code [shown above] responds in 6-7 second. [ by responce he means the alert box ]
and he is wondering if he can get faster responce.
@OctavianDamiean ofc. javascript is faster then php
 
11:49 AM
ok
 
Wait, what?
 
how can you compare stuff like that? that doesn't make sense at all
 
(o_O)
calculations per second
js wins!
@GNi33 though he is not at all wondering about which is faster he just wants his code to run fast
 
in what environment?
 
Php.
as u can see his code
he fires a request to server via $.ajax and wants to see the alert(); box
which comes in 6 seconds / 7
knowing JS this wont be slowdown by JS rather PHP could be the culprit in here
 
11:51 AM
or the whole server is just slow as hell
 
unless he is making about 10 ajax calls per second in that case they will queue.. [ but i hope he is intelligent enough to not to do so]
@GNi33 that too
 
hello everyone
kindly look this question please
0
Q: How to Minimize jQuery Dialog?

Fawad Ghafoori am using jQuery Dialog to show video.video is working nice. what i need to do is that i want to Minimize the Dialog just like in OS . A small icon like (" - ") that would minimize my dialog. and When i press (*) this is closing the dialog but Not video ? Here's my code //Watch Video $(".watc...

 
Thank you
@Abhishek Thanks
 
@NikunjAkabari np
who is using fedora in here or debain/ubuntu who wish to test a module for me
 
im running ubuntu
 

« first day (642 days earlier)      last day (4311 days later) »