|
rotor posted:I've always been surprised that they're not more popular. They are IE/Windows only AFAIK.
|
# ¿ Mar 11, 2009 14:11 |
|
|
# ¿ Apr 30, 2024 02:59 |
|
Sock on a Fish posted:I've got a really simple call to a really simple Prototype function that appears to be timing out after about five minutes or so: That's a hell of a lot of AJAX calls without a decay option. I don't know how fast your server can respond, but I'm pretty sure that one open AJAX call/second is screwing something up. I would say at least add a decay of 2 or 3 and see what happens. Also, are you sure that the log file is changing in the interval where you see a timeout?
|
# ¿ Apr 7, 2009 20:25 |
|
Sock on a Fish posted:I think the timeout occurs during a period when the log isn't being updated. The first step in the log reflects the beginning of a tarball unpack, and depending on load that can take from 1-12 minutes. What do you mean by timeout? Is the div id "log" not changing? Are you getting a javascript error? Or are you falling into the failure side of the AJAX Request?
|
# ¿ Apr 7, 2009 20:53 |
|
Does anyone know why 3rd party JS libraries never throw any errors? I just spent 4 hours today trying to figure out what I had done wrong after adding Jawr to my web app and the problem was that Nick Stakenburg's Starbox plugin doesn't throw an error when there's something wrong with the image url. It just completely silently fails and doesn't try to create anything. I've seen this problem in Prototype, JQuery and ExtJS, even in the debug versions. A lot of problems could be solved much easier if informative errors were thrown. I do it in my own code, is this not a best practice?
|
# ¿ Apr 9, 2009 20:03 |
|
Kekekela posted:JSLint gives me a "Bad escapement" message on the following line, I'm guessing its something with that which follows the backslash but I suck at regex and can't get it cleaned up, halp: Why on earth are you using the RegExp constructor? Why not... code:
|
# ¿ Apr 9, 2009 20:39 |
|
argz posted:
Sadly I'm pretty sure that javascript in a browser does not give you access to MIME types of the Image() object. Maybe you can make an XHR get the image and check the response headers, but I think that might be a lot of work for this problem.
|
# ¿ Apr 18, 2009 17:00 |
|
diadem posted:Thank you so much. This bug was a huge pain. A non breaking space would work there too . Apparently you can't type & nbsp ; here, let me try it in a code block code:
sonic bed head fucked around with this message at 20:38 on May 7, 2009 |
# ¿ May 7, 2009 20:34 |
|
FateFree posted:Thanks alot lumpy I appreciate it. It works fine in IE but not in FF so im looking into that, but otherwise does just what I wanted. .value should work in both.
|
# ¿ May 13, 2009 13:51 |
|
FateFree posted:Eh that didnt work for either, I think because its not a form field, rather just text. Oops, I completely misread that code. I thought you were trying to get what was inside the form field.
|
# ¿ May 15, 2009 21:02 |
|
Does anyone know of a multiple select javascript code that works with Prototype JS core? I don't want to use any other add on libraries like livepipe and I don't particularly want to roll my own.
|
# ¿ Jun 3, 2009 15:23 |
|
I am trying to write some animation javascript code that will make it look like there was suddenly gravity and every element is falling to the bottom of the page. I have no idea where to start with this. I've tried using prototype's absolutize on all of the elements in the body of the page, but that doesn't work. Can anyone give me any advice on where to start? I have no idea of 2D physics but I don't really know where to learn anything. Thanks.
|
# ¿ Jul 17, 2009 17:26 |
|
Nigglypuff posted:You might start by viewing the source of this. savetheclocktower posted:Also, Someone ported the Box2D physics engine to JavaScript. Thank you both! That's exactly what I needed. The google gravity thing actually uses box2d so it's a good practical example.
|
# ¿ Jul 24, 2009 12:54 |
|
rt4 posted:I'm trying to keep track of the URL of a frame on my page. Is it possible to do this with JavaScript? If you want to get the URL after a change in the src, to make it cross browser compatible, I think you have to use DOM methods, not jQuery methods. Try this: code:
|
# ¿ Feb 1, 2010 19:31 |
|
subx posted:Can someone point me to a good reference of how javascript "objects" actually work? Coming from normal programming languages trying to work with javascript objects is just flat out loving confusing. For the first question - What language is the "normal" language you are coming from? It might help if I can explain in those terms, but the misunderstanding here is straightforward. Names[0] is an Array, not an Object. It is an Array of one item, as per what you've copied from firebug. Try Names[0][0].FirstName, and that should be what you're looking for. A Javascript array is just a HashMap in Java, an associative array in PHP, a dict in Python. Second question - In javascript, no, there is no difference. The reason that quotes are sometimes used is because there is a data serialization format called JSON (Javascript Object Notation), which requires the keys of an object to be quoted. Javascript interpreters interpret them in the same way, but if you have a key with a keyword in it, you need to use quotes. For example {"for":"you"} will not produce a syntax error, but {for:"you"} will.
|
# ¿ Jan 6, 2012 20:51 |
|
subx posted:I think it was mostly just the tutorials that were confusing me. Thanks for clearing up the quotes thing - I didn't notice any difference when I changed them in code, but I wasn't sure if it changed how they were being referenced or something like that. I'm pretty sure it's called a dictionary in C# too. You can think about it as a basic hashtable [String -> Object].
|
# ¿ Jan 6, 2012 21:13 |
|
|
# ¿ Apr 30, 2024 02:59 |
|
Munkeymon posted:Oops, drat typo. Yes, Object, not array. They are deceivingly similar.
|
# ¿ Jan 6, 2012 22:16 |