« first day (316 days earlier)      last day (4629 days later) » 

12:04 AM
hey guys I have an interesting problem i am stuck with
I have a json string stored in my DB , and when I do $.parseJSON('<?php echo json_string?>';)
I get a json parse error
what should I be doing?
this is the json string
{"patches":[[{"diffs":[[1,"\u000a\u000a printhellon() {\u000a\u000a\u000a}d\u000a\u000a\u000a"]],"start1":0,"start2":0,"length1":0,"le‌​ngth2":26}],[{"diffs":[[0,") {\u000a\u000a\u000a}d"],[1,"s"],[0,"\u000a\u000a\u000a"]],"start1":15,"start2":1‌​5,"length1":11,"length2":12}],[{"diffs":[[0," {\u000a\u000a\u000a}ds"],[1,"d"],[0,"\u000a\u000a\u000a"]],"start1":16,"start2":‌​16,"length1":11,"length2":12}]],"times":[1314489779299,1314489779408,131448977958‌​1]}
 
is it in variable $json_string ? you should do <?php echo $json_string; ?> and not "echo json_string"
 
I am doing a php echo
yes it is in json_string
 
you forgot the $ and the ; .. if not then i cant really help you with the error
 
I have both of them in my code
0
Q: printing a PHP string and it as parsing a JSON in javascript

SAnandNarayanI have a json_string in my database. I echo and parse it to an object in javascript I do $.parseJSON('<?php echo $json_string;?>'); I get a json parse error. What should I be doing? This is my json_String {"patches":[[{"diffs":[[1,"\u000a\u000a printhellon() {\u000a\u000a\u000a}d\u00...

 
12:26 AM
?!?
anyways
Finally have a decent benchmark of worst case performance of JS arrays
 
 
2 hours later…
2:06 AM
Does anyone know why the DOM would not be updating the height of an element when I insert it using jQuery's append method?
 
2:33 AM
1 message moved to bin
 
2:52 AM
@IvoWetzel you recommend python over js?
TRAITOR
@IvoWetzel is DOM3 that bad?
 
3:26 AM
figured it out - the element i was appending to had a display: none; style set on it
 
4:01 AM
RT @erikjmoller: Blog updated, loads of Emberwind html5 stuff uploaded on github. http://t.co/5N5ZM5s
 
4:14 AM
RT @assaf: Just released Zombie 0.10 — uses latest JSDOM to solve the JS context issues, testing with jQuery 1.6.2 http://t.co/zTYYxhP
 
 
4 hours later…
7:48 AM
0
Q: Is the JavaScript syntax the same for all browsers?

vemvAs for interacting with the DOM, different browsers will offer methods -and results- that are different between them to some or other extent. But how about JavaScript itself? Do all browsers (or platforms e.g. Adobe Reader) implement the same syntax and behavior? Aspects that particularly worry...

 
 
6 hours later…
1:25 PM
Hmmm, lag?
Yes, quite a lot. Or is it because someone hasn't said anything in a while? Yup, not lag. Odd.
 
 
2 hours later…
3:12 PM
0
Q: Google image relinker script for greasemonkey / chrome that works?

cwdThere used to be two scripts that helped relink images from the Google image search, directly to the image instead of to google's preview. Here are two that look to be most recent: http://userscripts.org/scripts/show/5059 https://chrome.google.com/webstore/detail/ecfjhfglbnbhmpehpjfdoklmkbnbkn...

 
4:07 PM
Does anyone have a good way to replace highlighted text with jquery? Specifically in a a contenteditable div.
 
@Nathan What's highlighted text?
 
Like double clicking on a word and then it's highlighted.
 
Basically, I'm trying my hand at a simple Textile editor.
Haha, thanks. I've tried a few of those so I'll go down the line now.
 
 
1 hour later…
5:28 PM
@IvoWetzel So, what, basically anything on sparse arrays? :P
 
@gsnedders Basically anything with splice :P
 
@jAndy did you win?
I lost :(
Checked jsconf.eu @ 6PM
realise its 6PM CEST == 4PM FFFFFFFFFFFFFFFFFFf
 
still needs to decide whether he wants to go or not…
To speak, that is.
 
JSconf will be great :)
 
I'm more likely to go to Velocity, if I go to either.
 
6:22 PM
ok, Chrome is messing with me. Source is shown correctly, inspecting the function in console and executing it shows previous version...
 
6:37 PM
One thing I definitely would like to have is a no-cache mode in browsers
because developing is starting to suck because of aggressive caching
safari is worst
clear cache = no effect
restart = maybe effect
-.-
 
@IvoWetzel Dragonfly exposes such a mode in Opera, at least
 
hm
But nobody develops for Opera, we're all about WebKit/Mobile
IE9 also sucks
there are cases when it just doesn't redraw the document...
even though stuff is changing a lot :(
 
6:53 PM
This is really weird. Every editor shows the correct version, even the chrome script inspector. But document.writeing it and inspecting it in console shows incorrect one
Weirder, same thing happens in IE
 
7:11 PM
Somebody herE?
I need some help -.-
stackapps.com/questions/2177/… tryint to run it on my server
However when sending, I'm getting 88Unsafe JavaScript attempt to access frame with URL phpcode.eu/circles/process.php from frame with URL stackapps.com/questions/2177/…. Domains, protocols and ports must match.
 
user1385191
1
Q: Is oncontextmenu cross browser?

Davidwindow.oncontextmenu = function() { return false; }; Will this work on all major browsers such that the right click will not be initiated?

 
@Raynos lol. Was trying to do this, too
 
 
1 hour later…
8:59 PM
hello all
 
9:48 PM
posted on August 28, 2011

You know what the DOM is, and if you don’t it’s easy enough to find out. What isn’t so easily discovered is the answer to this: how should your code communicate with the DOM API? Should it be treated as just another API? Is it…

 
Does anyone know where I can find the MDN entry for Array.forEach? I've only been able to find Array.prototype.forEach
 
hi anybody experienced with using Elgg?
 
10:11 PM
Maybe more up-to-date people already know, but I just found out that all the jQuery form element selectors (:input, :text, etc) will probably be removed in future versions. So please don't use them in answers anymore... (attribute selectors are much faster anyway ;))
 

« first day (316 days earlier)      last day (4629 days later) »