« first day (647 days earlier)      last day (4284 days later) » 

12:16 AM
0
Q: Looking for review of an open source AJAX powered forum

Jake CattrallThis project isn't complete but a good start, I want to know if this is the method I should use to continue developing this project. So you know, the ideals of the code are for the PHP to serve up minimal data and for client to do the leg-work that most scripts leave to the server. Also I didn'...

 
1:11 AM
@Loktar most of the time I just break them down. get bored / annoyed and forget to build them up
@rlemon <_<
@Esailija im not a fanatic. Node is just a good tool. Most of the node people I know are really good at it. I dont know any competent dom programmer.
It's amusing how the front-end community contains no real leaders and the node community is full of people that win
 
hi there guys, for some unknown means, I can't seem to add a jquery onclick even handler to this fiddle jsfiddle.net/UyZnb/339 What the heck am I doing wrong. Also how can I find it difficult to implement a modal-like appearance to it :(
 
1:27 AM
@Santy This selector is redundant: .tooltip[id^="tooltip_"]. And there is no click handler in that fiddle
 
 
2 hours later…
3:31 AM
0
Q: Best framework and technology for developing simple multiple web-based game

viet thangI want to develop an online browser game which is heavily in html and javascript, it's just like this game : play.typeracer.com I am new to these technologies so pardon me for any vague questions: What should be my front-end programming choices ? What should be my back-end programming choices i...

 
 
2 hours later…
5:39 AM
good morning frnds
 
Hi friends
Good mornig
i m cavallo from italy
@Praveenbabu
@labbyfrost welcome
can u help me with some javascript
 
Hello Cavallo
me too learner cavallo
hello frnds any one working with jquery mobile
 
5:59 AM
any one working on phonegap here?
 
@@BadgerGirl sorry, he's (we're?) there now. Also, he's getting a little brother soon
 
MOrgening
 
6:14 AM
Hi guys,
good morning...
 
Anyone good at http requests? i get a 401 code 3 in PG :/
 
@AndersMetnik PG?
 
Phonegap :)
 
401 is Unauthorized, so whatever you're doing, the other side wants credentials.
 
Thanks I have looked it up, I just dont get it, if I type in the same url in the browser, then there is np..
 
6:19 AM
You usually don't send exactly the same info without the browser
Look at the http request the browser sends, then look at yours, and try to see why they're treated differently
 
"http://mobilitycms.lector.dk:9090/content/picture/menu/showroom"
Wouldn't you expect that to work?
 
Expect? Yes, lacking any previous data. Assume it must? Nope
 
Hehe okay, gonna run wireshark :)
 
Just hit F12 in any browser :P
 
Ohh awesomeness
Any idea what I should be looking at ? :)
 
6:25 AM
The Network tab. Look at the sent headers
 
Request URL:mobilitycms.lector.dk:9090/content/picture/menu/showroom
Request Method:GET
Status Code:200 OK
Request Headersview source
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:da,en;q=0.8
Connection:keep-alive
Host:mobilitycms.lector.dk:9090
User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11
Response Headersview source
 
Ctrk+K codifies your message and saves kittens
2
okay, that looks standard; what does your http request look like?
 
07-24 08:11:04.135: D/CordovaLog(3084): {"target":"file:///mnt/sdcard/dk.lector.html5Generic/","source":"http://mobility‌​cms.lector.dk:9090/content/picture/menu/beskeder","http_status":401,"code":3}
 
That's the response, what's the request?
 
FileTransfer from PG :)
 
6:30 AM
erm, is this some local thing? I can't access it nvm, I'm stupid
 
Want me to paste method or? :)
 
No, just look at the request sent
 
Yeah its on our internal network, not sure if its open to outside
 
A simple get from Perl managed to get it just fine
 
Okay then it is open :)
Well TBH I don't know where to find the request :/
 
6:35 AM
I had to remove the 9090 protocol to access it, though
And yeah, I can get to it without a problem
Both me and a programmed request
 
What's port 9090 anyway?
 
internal server port
 
yeah, it's part of CiscoSecure :P
 
Not really my strong side ;)
 
6:39 AM
So if you're using both, you might get something fucked up
 
Im only using 9090 inside
So no idea ? :-(
 
My idea is to torch that port
 
Doesn't work inside without the port :) have tested that already :P
 
So it's a stupid PG bug
 
Argh
I'll make a post with PG
 
6:45 AM
gluck
@Raynos Wanna hear something funny? I got a job offer as a js consultant. Hah! I pity the fools
 
And thats not your strong side or?
 
One possible outcome: Decapitation. The target (them or me) remains a mystery
 
7:01 AM
Hmm okay ;)
 
@AndersMetnik IIRC, PG requires external url to be specified in an xml file
 
It is :)
Else it wouldn't allow the connection to try at all :)
Afaik, atleast.
Ohh well, look at that, had forgotten it in this new project :D
hugs @FlorianMargaine
@FlorianMargaine if u wan't pts from it:
http://stackoverflow.com/questions/11625710/filetransfer-in-phonegap-code-401
 
heh
add you own answer :)
 
Will just delete then :)
 
nah
other people might get the same problem
if they google and find your answer, it'll be good
 
7:10 AM
YOU CAN LEARN NEW THINGS ANY TIME IN LIFE IF YOU ARE WILLING TO BE BEGINNER
 
@AamirPathan *a beginner
 
That means if I'm moderate at something I can't learn something new?
 
(called for)
 
@AndersMetnik that means you're never "moderate" at something, you should always assume that you're a beginner and be open minded
ideologically, of course.
 
@FlorianMargaine hehe okay, well that's one way to interpret it ;)
But it's really not a problem for me, I am a beginner as you know ;)
 
7:13 AM
Need To be DownTo Earth Moderator:P
 
7:38 AM
When I have a function like filetransfer, which has a callback. Is there then anyway to make that callback return a variable to the method that started all this.
There aren't, is there? :)
(Does it make sense?)
Danm ya'll left
 
@AndersMetnik yep, using parameters
function someFunc( callback ) {
    // get some datas
    callback( datas );
}

// then you can use like this:
someFunc( function( datas ) {
    // use "datas"
});
 
Yeah it's just because i'd like to keep my old MVC patterns somewhat alive. You don't really do that in JS do ya?
 
of course you do
// controller:
pageModel( function( datas ) {
    // work with what the model sends
});

// Model
function pageModel( callback ) {
    // Connect to database, whatever, then:
    callback( datas );
}
 
7:54 AM
Hmm think I get it now, let me try it out :)
Thanks :)
 
if you're using jquery
and ajax requests to get your datas
 
I do somewhat :)
 
you can do something like this for your model:

function pageModel( callback ) {
    $.ajax( {
        url: '',
        success: callback
    });
}
just passing the function reference will call it with the parameters sent by jquery
 
Yeah It's a bit more complex, thats the problem ;)
 
you get the idea
 
7:57 AM
Somewhat :)
Can I pick your brain in a private room?
Ohh well will do it here:
What I need is something like this senario:
It's because I do 2x json calls. before it needs to be implemented with stuff from both of them.
So call getJson1 - doJson1Callback (have properties id, action) - call getJson2(id) - doJson2Callback(with json1.Action + json2(picturepath))
 
let me look for a link
 
Sweet :D
 
but what you're looking for is "deferred"
are you using jquery?
 
Yes
Hehe have seen you writing that deferred before, no idea what it is though :P
 
@AndersMetnik this fiddle is a pretty good example.
 
8:04 AM
Yeah it's pretty good, I just also need 1 thing from method1 before I call method 2 :)
 
oh
yeah I see, wait
 
But it really is a nice example for something else I need to do later :P
 
you're looking for then
@AndersMetnik in recent versions of jquery there is always, that's the same concept as complete in $.ajax
@OctavianDamiean o/
 
I'm reading, thanks so far :)
 
8:07 AM
how are you doing?
 
I'm good thank. How's you?
 
@AndersMetnik javascriptplayground.com/blog/2012/04/jquery-deferreds-tutorial , you can chain as much as you want ofc
@OctavianDamiean good too, thanks.
 
Not quite sure I get it / I made myself clear. I'll try and fix a fiddle :)
what I have right now is this:
http://jsfiddle.net/7uvZJ/
@FlorianMargaine does it make sense? :)
 
@AndersMetnik that's a way to do it, but you're not using then or whatever there
 
No my problem in mine is, how do I get json2 to return the path :)
can i write:
success : return path;
?
 
8:24 AM
where is json2?
 
still no json2
oh wait
just saw the comment :p
what do you want to get in json1 from json2?
the path
makes sense?
 
from json1 i get the ID, and the action, (and some other stuff but i dont use them atm.)
from json2, i download the picture, and return the fullpath.

When json2 completes i insert the picture in html
 
I understand I can have callback, but then I lose my Action from json1
 
8:31 AM
pass it like this then: jsfiddle.net/Ralt/7uvZJ/6
 
Okay, just didn't like it :)
Thanks for the help, and introduction to deferred :)
 
heh, not really :p
 
not really?
 
"using" deferred is using when, then, etc
you're just passing function references around there
 
Ahh I know, you still introduced it though ;)
 
8:39 AM
Hello everyone, I'd like to run a script every time a specific page (data-role="page") is loaded, using jquery + jquerymobile. What function do you recommend using? I tryed .on("pageload"..) but it gave me some problems.

thanks
 
$('#first').bind('pageinit', function(event) {
initPage();
});
 
o/
 
will work with pageload too?
 
@AndersMetnik I didn't bother, but you're calling start() somewhere, right?
 
thanks anyway, i'm gonna try it
 
8:41 AM
@GNi33 \o
 
@FlorianMargaine yeah I am :) will test it soon.
@BeNdErR don't know, I have only used pageinit, does the trick for me :)
 
@AndersMetnik ok :) to make it work do I have to wrap it inside something like "$(function() { ...})"?
because as it is is not working :\
 
@BeNdErR And the script is loaded at the html ?
 
yep
I mean, the script is inside a file.js and then loaded in the html
 
ahoy mateys
 
8:48 AM
Same here.
You load it on index.html right?
 
so, I have a web page that is currently using an ajax request to load a xml file to process. I want to change this, so that you can drag and drop the file into the page, and it will then process it. any suggestions? Google is mostly giving me file upload stuff
 
@AndersMetnik yes
 
show me how you write it. and what is your pagename?
 
$('#pageView1').bind('pageload', function(event) {
alert("lol");
});
that's what I call. with pageinit something happens
mmmmm
 
Then use pageinit?
 
8:55 AM
i need to run the script every time the page is loaded
not only when is initialized
@AndersMetnik i found something that works..

$(document).delegate("#pageView1","pageshow", function(event) {
alert("lol2");
});
maybe pageshow was the word.
 
Depends on what ya need it for, when you should call it and how, afaik. :)
But have fun with that one :) Havn't tried it either
 
@AndersMetnik i confirm that, bind with "pageshow" works :)
thanks!
 
yw w/e i did :)
 
uhm w/e means :O?
 

« first day (647 days earlier)      last day (4284 days later) »