« first day (292 days earlier)      last day (4647 days later) » 
00:00 - 16:0016:00 - 00:00

12:22 AM
0
Q: gRaphael plugin best practices

climboidI'm looking for best practices when creating a plugin for gRaphael. I'm looking for something like jquery where in its documentation you have the best pracitces of how to write a plugin. So far I haven't found nothing so I'm starting to imagine that it just comes down to best practices with javas...

 
1:08 AM
If you thought reading ECMA 262 was hard, try having Windows Narrator read it out load to you. O_O
 
 
1 hour later…
2:20 AM
0
Q: Why would a language let programmer to handle divison by zero

JohnWongThis happens in Javascript, for example, that division by zero is not handled by the language itself. Is there's a valid reason for this? I see this as a very basic exception that a language should be able to handle (they even handle 0/0 as NaN NaN). or take the square root of a negative nu...

 
 
1 hour later…
user1385191
3:49 AM
lol, only IE >= 8 implements the q tag
 
user1385191
how could you screw that up?
 
RT @annevk: Skype is using VP8 all over now. When will WebM be in Internet Explorer? http://t.co/Dt82Ail
 
user1385191
4:06 AM
> A story which suggested that users of Internet Explorer have a lower IQ than people who chose other browsers appears to have been an elaborate hoax.
 
RT @kylebarrow: And without JS too: RT @garazi CSS3 Transitions Without Using :hover - http://www.impressivewebs.com/css3-transitions-wi ...
RT @mozhacks: You know about requestAnimationFrame and use it instead of setInterval… But do you know how it behaves in inactive tabs? h ...
 
4:21 AM
RT @brianleroux: Clearest description of the CSS3 flexible box model I've read: http://t.co/6klA0iH
RT @ericlaw: 8.4% of all IE9 hangs last month were caused by XMLHttpRequests blocking the UI thread with a synchronous request. http://t ...
RT @ebidel: Demo: generate -> name -> download a file using BlobBuilder, blob urls, and a.download or file drag out from browser: ...
 
5:02 AM
Hi all.
Hoping someone in here has had experience working with the jQuery plugin as well as niceforms.
 
Mayday
i need help with jQuery myself but i can work wit hit ^_^
 
like what
 
* i mean i can create anything u want with jQuery and forms
i am working on a chatbox atm.
which has a features of an MMO (unlockable powers etc) using jQuery and node.js
 
5:25 AM
that sounds quite cool dark
 
^_^ thank you :)
well i am having issues
changing tabs via jQuery
.click(function(){
$("#messages").tabs("select",1);
hideTab(userid);

});
this should hide the tab and select the 2nd tab.. but it dosnt does so.
tabhead gets hidden though
any clue any1 ?
epic the thing works from console but NOT from script
 
5:57 AM
fixed it !
jQuery follows a chain of events .. click initiates the event but its overridden by the tabs inbuilt shown event
Hey Omeed
 
Hey @Darkyen
 
u know jQuery right ?
i need a bit of help with my chatsite ^_^
its 99% done with jQuery and Sockets.io
 
yup but not a jquery ninja though
 
with an epic amount of drag & drop and contextMenu influency
 
hemmm, spit the problem bro
 
6:03 AM
dual events
i mean a click should expand the childdivs and a drag should allow drag and drop
but sometimes a click / right click( for context Menu) starts drag
events
 
jQuery -> JavaScript -> ECMAScript [No real asynchronous events]
 
so whats happening ?
 
hemmm, I really don know.
can you explain again waht you want ?
 
okay theres an anchor tag
in my document
 
6:07 AM
which has to handle 3 mouse events differently
but sometimes they are fired occur togethers
making a right-click (contextMenu) and drag together(not pretty impressive)
1 more question how to define a fixed size for all headers.. a bigger font makes them bulky and a smaller one makes em look unreadable
fixed it btw xD... FIREBUG ROX!!
 
 
3 hours later…
9:09 AM
Morning
 
9:47 AM
got this error: cannot use object of type stdclass as array == when using soap why?
@Nyuszika7H hi
 
10:37 AM
hi all can i have basic ebook or any link for jquery???
 
posted on August 04, 2011

John Gruber points to and agrees with this article that says that many activated Android phones are not used as smartphones, proving that iOS is more important in the smartphone market than the sales market shares show. They could be right, they could be wrong. The question is: How do you measure a platform’s “smartness?” Unfortunately the article does not offer any answers

 
J82
Anyone know why Fancybox is showing a slight overlay after it's closed? stackoverflow.com/questions/6920754/…
 
 
1 hour later…
J82
1:09 PM
I edited my question to include video of what I mean. Video can be seen here: crackpixels.com/weird/cpix.htm
 
1:32 PM
@RyanKinal I tried reading it but the stupid floating header on the page making things jumped around is bothering the fsck out of me. Why do people feel the need to do this stuff? I know what I'm reading, I don't need to see the heading at all times.
 
sigh of relief
 
iknorite?
 
Is this your writing?
 
No, I found this article through Google+ sparks
 
1:35 PM
I've never found anything useful on sparks =/
 
I set up a JavaScript spark.
 
link?
 
Ummm. I don't know how to link a spark.
I just put in "JavaScript", and then saved it.
 
It's a good article, but one thing I'd like to see (and never do) is a visual explanation of things. Something that's a quick UML-like (not UML, just lines and boxes), that explains what it is.
 
Understood.
What do you think of the pattern, though?
 
1:41 PM
It reads like I've written it all as object literals, but it works the way the language designed to use OOP.
It looks like a nice way to encapsulate things, and emulate a class.
But I can't see how you would do anything polymorphic or inheritance with it, for instance, if you wished to extend this to a scientific calculator.
 
That's my problem with any pseudo-classical patterns I've seen in JavaScript.
 
Because JS isn't a class based object oriented language, it's a prototype based model.
 
Well, of course. But most people tend to use a pseudo-classical model anyway.
 
Because people grew up on C++ and Java, and were told that classes means they're doing it right.
So they try really hard to do it right.
 
Either because they don't know any better, they're familiar with it, or they simply don't need inheritance and polymorphism.
 
1:47 PM
Instead of seeing that objects work differently in the prototype world, where you can emulate classes, but in classes you can't emulate a prototype.
 
Right
 
Well, you could work this pattern to deal with extending classes, and it's been done elsewhere, but why?
That's the thing about javascript, you can write it like it's supposed to be the language you came from, and it'll still work.
 
Hah, yeah.
I mean, before I really understood OOJS, I came from a background in C++ and Java. And when I started writing complex OOJS, I definitely used the pseudo-classical pattern. It worked just fine.
But I don't think, if I had even a two-level inheritance model, I would even consider pseudo-classical JS at this point. I would immediately go with Object.create
Anyway, time for the company meeting. Laters.
 
Adios.
 
jQuery anyone ?
having wierd.. epicly wierrd bug :'(
 
2:00 PM
Hi
I neeed help :)
 
@Ic
@Incognito u der ?
@Mirgorod with ?
 
with ajax and dom
now i'll show code
 
@Mirgorod Why don't you ask the question right off the bat?
 
dunno how to explain
 
2:01 PM
i asked
I solved but not for every time
 
@Incognito does jQuery differntiates between a rightclick and left click ?
or its just the click to handle them both ?
 
I have function this.processLink
and this function send post request and get response from server and use it
 
@Darkyen What does javascript documentation say about mouse events?
 
this.loadContextMenu loads context Plugin
 
2:04 PM
which one ?
 
but after second response from server this plugin doesnt working
 
@Incognito i was asking specifically of jQuery .being a library it might support something better :P
then standard DOM events
 
@RyanKinal traits and objects. use them
 
.click( handler(eventObject) )
The event is passed in the arg from click.
 
Who can help me with my problem?
 
2:06 PM
okay
 
The .click event simply passes it in.
 
the trouble i am having is
my click or contextClick sometimes fires my drag based event
and setting minimum distance or delay aint helping >.<
 
@Darkyen How are you delegating your events?
@Mirgorod I don't know what you want. The page just has a mountain of code.
 
@Incognito my english is a bit bad ... what delegating means ?
 
Ok, look at $('.message').contextMenu('myMenu1', {
this is plugin
for Context Menu emulating
 
2:09 PM
yes
i am using something like that aswell .
 
this works fine but after updating dom it doesn't work
 
Hmm
are u updating its parent ?
accidently ?
 
yes
I have:

<div id="ajaxLoadPlace">

</div>
And I get Answer from Server and insert as HTML into ajaxLoadPlace
 
$(Header).draggable({
// Drag and drop takes place on only those ranks smaller then yours so this must be explained laters
revert:'invalid',

scope:'users',
helper:'clone',
cursorAt: { left: 0, top:0 },
appendTo: '#userlist',
revertDuration:250
});
$(Header).contextMenu({
menu: 'contMenu'
},
function(action, el, pos)
{


});
and a similar $(header).click( function() { } )
to delegate them.
ah i decreased the code a bit (x
 
hmm)
server sends me

<p class="message" id="1">some text</p>
<p class="message" id="2">some text</p>
<p class="message" id="3">some text</p>
etc
 
2:13 PM
got it!
i think we are using the same plugin .. is that the one from a beautiful something blog ?
if thats the same plugin then u require <a href"#xyz">Hello</a> to be able to be shown in the plugin.. and adding content to dom wont help as the plugin assigns class and makes the setup of the contextMenu automatically
 
once u call the .contextMenu( ) function
 
look at this link
Is it same?
 
similar approach
the contextMenu function
 
One strange thing is that this plugin work one time after updating dom
 
2:17 PM
What browser are you using ?
 
firefox and chrome
 
try inspecting DOM on chrome
while the events are happening
 
hmm
jqContextMenu
element was created
 
i think thats ur ContextMenu .. try adding ur <p> to that
and see what happens
 
<p> to jqContextMenu ?
 
2:21 PM
yes
i am reading the JS source code of it
 
hmmm not helped
 
let me finish reading.
may i ask you what are you exactly trying to do ? with AJAX ?
 
Chat
 
i mean you wanna add stuff to your right click menu or just the page ?
and ZOMG i am making a chat aswell
 
wow))
 
2:24 PM
xD
 
I want to make delete function and edit function
 
epic what are you using right click for ?
 
like in Skype :)
and you?
 
i am using it for admin job (i am making a multichat server)
 
hi all
 
2:25 PM
well its just a fallback method.
 
help on here plz
 
me too :)
 
0
Q: refresh pie on tab click / extjs4

astrocybernautefor my application that im developing with extjs4 and c#, im basing on the browser-layout example. so i have a menu on the left side and tabs, in each tab i call my components (grids,trees,charts..) what i need is to refresh my pie on tab click so i added a listener on my tab, but i dont know ...

 
basically it all happens with drag and drop for me (x
 
hehe
 
2:25 PM
rightClick is the fall back
 
I think that contextMenu works only one time
 
Mine works forever :S
 
heh
 
i edited half the original source code for it though
 
Is this source code will works same in my situation?
 
2:27 PM
i d k
mine is edited to be dynamic for each and every user its invoked by
 
wow
 
so basically uses server generated events :$
 
)
 
not wow that was easy because of node.js & socket.io ...
you should see Ivo's orbit ^_^
that was ozome!
right Raynos ?
 
Node.JS :)
wow
i tried to use it :)
 
2:30 PM
i tried .. then gave up .. then tried again after getting frustrated of php
 
))
hmm
 
.. gave up again .. started writing similar thing on C++ .. learnt an ugly lesson so now using node.. for sure (XD)
 
after every refreshing of server contextMenu need to work with new elements
I tried to call it after every post request
but it doesn't working and no errors :(
 
ask your trouble to jAndy i have a feeling he should be able to solve the problem
btw Mirgorod what are you using for connection b/w server - client ?
Long Poll / Forever Scripts / Sockets ?
 
aa Long Poll
I think so )
But this is not the best way
to much requests
 
2:34 PM
i had ~1 million
hits on server in one day using long poll
but then i was requesting in every 100 millisecond x(
 
))
jAndy, are you here?
 
whats your scale btw ?
 
I making corporative chat
 
i can suggest a solution for less users.
use forever scripts using php
something like 1 request keep it open forever open (using AJAX)
 
hmm
Yes
I know
 
2:36 PM
and process the data as soon as it comes into it
with something like
 
I used it for my izq bot ))
icq*
 
if (data.length > oldLength) { process }
cool!
my chat will be up later tomorrow :)
 
I want to finish my chat today
I need to make delete and update functions :)
but engine almost ready :)
 
^_^
so what scale of users you aim ?
i mean how many at max at a time ?
@Mirgorod
?
 
100 people in one time :)
 
2:41 PM
oh then xmlpolling is no hard deal
:D
 
Does anyone on here use JavaScript to solve Project Euler's problems?
Also, do you guys think it'd be a good idea to make some old school game remakes in Canvas?
 
Amazing one
 
@Darkyen In reference to what are you saying that?
 
Hello
 
2:52 PM
anyone works for Square or Twitter here?
 
Not me, why?
 
I wanna apply for a job there
 
This could help - twitter.com/jobs
 
3:08 PM
can u please take a look
0
Q: listener on tab click or activation not working properly / extjs4

astrocybernautefor my application that im developing with extjs4 and c#, im based on the browser-layout example. so i have a menu on the left side , then on clicking on each item of that menu i have on the right side all my tabs now the listener im using on the tabs only work when i do click on the tab, but d...

 
3:28 PM
How can i express in jquery that when someone clicks in a input, select and textarea the next div needs to show
 
I don't know about jQuery, and I didn't get what you mean to say exactly, but I'm guessing you'll need to use something like this.nextSibling or something. That wouldn't be perfect, though, because modern browsers consider new lines a nextSibling as well.
Why don't you elaborate on what you're trying to do?
 
Here's a question. How do you get a question bumped? Because I don't want to just make another question about it and dupplicate it.
 
user1385191
edit it
 
Well, if you didn't get your answer in the old question, you can ask again, and mention that you weren't looking for an answer like the one's given in the old one
Or do as Matt says.
 
3:35 PM
@Raynos If you could provide links to the techniques you suggest, it would be very much appreciated.
 
The Awesome One a div is display:none i want to show it as soon as an input or textarea or sleect is clicked
 
user1385191
please tell me it has an id
 
i want to show the "next" div based on where the user clicks
 
Yeah, say it has an id.
 
no ID i want to do it using next
 
3:39 PM
Okay. Is this your own website, or is it an extension you're building?
 
my website
 
If it's your own page, some of the code would have to be hard coded.
 
why hard coded? .next jquery?
 
Oh, then you'd have to tell us what kind of a structure you're using. Next as in, it's right after the input, or are there tags in between?
 
user1385191
^^^^^^^^^^^^^
 
3:41 PM
the div right after the input
 
Because there would be very few easy ways of knowing if the nextSibling is indeed the one you want to make visible
 
user1385191
so it looks like this then?
 
<input>
<div style='display:none'>
 
user1385191
<input>
<div>
<input>
<div>
<select>
<div>
 
Ugh what happened to the three rules
 
3:41 PM
Is it like that?
 
here is the why: its a form so i dont want to show all the fields so i hide a div with some fields and when the user clicks an input for example it shows the next div, etc
 
@RyanKinal
Jul 28 at 20:59, by Raynos
// The 3 rules of prototypical OO:

// - Use Object.create. Don't use new, don't use .prototype
// - Prototype chains should only be one level deep
// - use traitsJS
 
If it's your own website, why won't you simply use id's?
If you still insist, you could use nextSibling
 
user1385191
which is iffy
 
@Raynos Why should prototype chains only be one level deep?
 
user1385191
3:43 PM
you'd likely have to use a while loop
 
You add a onclick event on the inputs and add the code this.nextSibling.style.display='block' or something
You could add that code manually or with a loop in JavaScript
The loop would depend on if you have any stray inputs and selects on the page as well, though
 
the reason why is becuase there are multiple divs so the script would be extense, it would be better to simple use .next() jquery and make it lighter but i dont know how to express it in jquery
 
user1385191
no, add the onclick to the form
 
user1385191
let the clicks for the inputs, selects, etc bubble up
 
Oh. Even easier. Don't use a loop, simply use
document.onclick=document.activeElement.nextSibling.style.display='block'
That'll work for ANY input or textarea
I'm sorry, but I don't use jQuery, so I can't help you specifically for jQuery
Normal JavaScript should let it work for you
 
3:48 PM
I'm not sure about cross-browser(-version) compliance/behavior with document.activeElement
 
@Ryan You said you use jQuery correct?
 
Yeah, I was wondering if that'd work for all browsers too
 
why dont you use jquery?
 
@RyanKinal: I guess the deepth from prototype chains should be one for performance reasons. However, I don't see that reason, since any browser which supports es5 Object.create() will have an advanced js engine which optimizes scope- and prototypechain access with lookup hashes
 
@JeffDavidson I do, yes
 
user1385191
3:51 PM
I wish element nodes had a childIndex property for quick access
 
@sebas I just don't. I would, but I don't like using libraries. (I know it sounds weird, but I don't.)
 
@JeffDavidson Is there a question involved?
 
yay - whats the use of all that optimized code and browser-abstraction ajax/DOM-wise
 
1
Q: Error Placement of a Form

Jeff DavidsonI'm trying to use the following plugin wiht the second form where it places all the error messages inside of its separate div. Only difference is they place it above it and I'm placing mind below. However its still not displaying the messages inside the div for me. Not sure why. http://jquery.b...

 
lets just throw away all those libs :p
 
3:53 PM
Ryan do you know how to express it in jquery?
 
@MattMcDonald I don't know what childIndex is, but if you mean to be able to refer to any child directly using a number, I'm pretty sure you can do it
You'd have to loop throw all the children of the parent and keep pushing them into an array, and voila, you have an index
 
@jAndy I can understand the performance concerns, but OO in general is a performance hit. It's often more for programmer understanding and code organization than anything.
 
@RyanKinal: Well I don't know where those rules are written, I just guessed that. However, there is no performance leak in cutting edge engines even with pretty deep scope/prototype-chains anyway
 
@jAndy Right. I have to wonder where @Raynos got them.
 
@MattMcDonald: what is your requirement ?
 
3:58 PM
@JeffDavidson Why are there random <li> tags scattered around?
 
no idea.
 
Oh.
Oh I see.
I think you need a different (better) plugin. Or maybe just custom code.
    <div class="NFTextCenter">
        <input type="text" name="description" id="description" size="54" class="NFText error">
        <li>
            <label for="description" generated="true" class="error" style="">Please enter a description!</label>
        </li>
</div>
 
00:00 - 16:0016:00 - 00:00

« first day (292 days earlier)      last day (4647 days later) »