|
rotor posted:HTml Application. It's basically a balled up wad of html & scripts (vbscript usually) that looks like an application to the user - sort of like a CHM. I don't think it has fwd & back buttons, hence the question. Ah, OK, so it's like Adobe AIR, but windows-only. I wondered why AIR was never more popular, but the more I thought about it, when you start developing these things(AIR apps and HTMs,) you generally get more complex than "just a web page" and are tracking view states, need to swap objects on screen out, need to write out data to files, have to have more complex error-handling, etc. So many who would find the ease of entry ("hey, you already know HTML and javascript!") are a bit un-prepared / overwhelmed by all the additional stuff they need to code, and those who are prepared for all the extra bits probably just say "gently caress it, I'll write it in C, C#, Java, Objective-C , [INSERT LANGUAGE HERE]" Thanks for the info on HTAs. I actually have a "web" app deployed that is IE-6 only (used internally in a call center) that I frequently wish I could bust out of the browser sandbox a bit. It requires OCX controls, so I couldn't do it in AIR, but this might be the bee's knees.
|
# ? Mar 11, 2009 15:34 |
|
|
# ? May 4, 2024 16:14 |
|
Lumpy posted:Ah, OK, so it's like Adobe AIR, but windows-only. You have absolutely no clue what AIR is! edit: I stand by my point since you argue that all the extra "stuff" (i/o, state, etc) that AIR provides to Flex is somehow comparable to a few static html files bundled together. And if you want to use all that extra "stuff" you're going to have to go with a more complex language like C#. That makes no sense at all because that's exactly what AIR does: gives you functionality that would be pretty drat useful if you wish to write a true application in flash. karms fucked around with this message at 16:27 on Mar 11, 2009 |
# ? Mar 11, 2009 16:12 |
|
Mercator posted:You have absolutely no clue what AIR is. Really? Wow, then I better trash all the AIR apps I've written. It's likely I don't understand what HTAs are, but don't let that stop you from being a douche.
|
# ? Mar 11, 2009 16:14 |
|
FWIW, HTAs let you read/write to the filesystem, so comparing them to AIR is at least in the ballpark.
|
# ? Mar 11, 2009 19:38 |
|
sonic bed head posted:They are IE/Windows only AFAIK. something being IE/Windows only never really had much bearing on whether it was popular or not.
|
# ? Mar 11, 2009 19:42 |
|
code:
code:
|
# ? Mar 12, 2009 16:24 |
|
joojoo2915 posted:
Without seeing the HTML it's impossible to tell if what you are doing is "correct" but if you are getting the value of a SELECT you need to do something along the lines of: code:
Or, use jQuery and do $('#selectID').val();
|
# ? Mar 12, 2009 16:36 |
|
joojoo2915 posted:
First guess: define GOGRAIN_XML_URL outside of the if statement, then inside it do not use "var". Right now it looks like you're probably passing "undefined" to buildMovieFromXML as GOGRAIN_XML_URL doesn't exist outside that if statement in your code. Try this: code:
|
# ? Mar 13, 2009 14:48 |
|
Melraidin posted:First guess: define GOGRAIN_XML_URL outside of the if statement, then inside it do not use "var". Right now it looks like you're probably passing "undefined" to buildMovieFromXML as GOGRAIN_XML_URL doesn't exist outside that if statement in your code. Huh? He passes it as an argument before the function ends, and javascript passes by value, not reference, so it's not undefined. Using 'var' twice like that is ugly, but it works in javascript. code:
Lumpy fucked around with this message at 15:19 on Mar 13, 2009 |
# ? Mar 13, 2009 15:07 |
|
Lumpy posted:Huh? He passes it as an argument before the function ends, and javascript passes by value, not reference, so it's not undefined. Using 'var' twice like that is ugly, but it works in javascript. Well drat, you're entirely correct. I was thinking that the variable would fall out of scope as soon as execution left the if-block. Tested and I was wrong, dammit.
|
# ? Mar 13, 2009 16:00 |
|
Is it possible to dynamically change the size of a canvas in javascript instead of specifying like below?code:
|
# ? Apr 2, 2009 00:32 |
|
Sylink posted:Is it possible to dynamically change the size of a canvas in javascript instead of specifying like below? This resized for me, so I'm guessing yes: code:
[EDIT] This made a new one and sized it appropriately: code:
Lumpy fucked around with this message at 04:46 on Apr 2, 2009 |
# ? Apr 2, 2009 00:50 |
|
I got it working but not to my liking, I realized that the canvas is a bitmap so resizing makes it look like rear end.
Sylink fucked around with this message at 03:22 on Apr 2, 2009 |
# ? Apr 2, 2009 02:06 |
|
I don't think this is worth it's own thread so here goes. Does anyone have/know of a site that has a free time entry code to be used on a web form? I want to have the user be able to enter a valid time by either giving them a drop down for hour, month, AM/PM that looks somewhat clean. Currently, I am using an Ajax time extender on a texbox (ASP.NET), but that is utterly atrocious and the time entry is very obscure. So that's why I would rather user Javascript if possible. Thanks!
|
# ? Apr 3, 2009 20:16 |
|
This is a simple question but I cannot figure it out. Please help.code:
code:
|
# ? Apr 7, 2009 05:40 |
|
Hi I am a Snake posted:Two alerts come up: the first reads "undefined" and the second reads "100". Why aren't they the same? Because this does not refer to bob. I'm not sure why you think it would, really. The onclick event you specified has nothing to do with bob at all.
|
# ? Apr 7, 2009 05:48 |
|
Man I'm dumb.
|
# ? Apr 7, 2009 05:54 |
|
Anyway, if you want something like bob.test() you need to specify test as a method:code:
|
# ? Apr 7, 2009 05:59 |
|
Hi I am a Snake posted:This is a simple question but I cannot figure it out. Please help. What Avenging Dentist said, and here's some good reading on this stuff: http://javascript.crockford.com/private.html
|
# ? Apr 7, 2009 06:43 |
|
Lumpy posted:What Avenging Dentist said, and here's some good reading on this stuff: http://javascript.crockford.com/private.html That's a nice link (as much as that stuff looks like a hack than a programming "convention", it's cool that that stuff is possible). On that note, are there any good reference books that examine JavaScript outside the context of web development? JS has some interesting and powerful capabilities on its own as a language (especially in the latest versions) and I'd love to read a volume on advanced techniques like the one above. (This was spawned by my using JavaScript as part of the Eclipse BIRT reporting engine in order to transform data in reports I'm working with.) Unfortunately I've never seen such a book -- everything published about JavaScript seems to focus on "here's how you make your web page to wacky things!!!"
|
# ? Apr 7, 2009 13:10 |
|
Actionscript . There's always Rhino.
|
# ? Apr 7, 2009 16:07 |
|
Mercator posted:Actionscript . Err, I think you misread my question. I'm not looking for a JS interpreter (in fact BIRT comes with Rhino for doing its reports), I'm looking for a comprehensive reference that talks about advanced JavaScript feature more in terms of a programming language in its own right and less as a web development add-on.
|
# ? Apr 7, 2009 17:29 |
|
Flobbster posted:Err, I think you misread my question. I'm not looking for a JS interpreter (in fact BIRT comes with Rhino for doing its reports), I'm looking for a comprehensive reference that talks about advanced JavaScript feature more in terms of a programming language in its own right and less as a web development add-on. Douglas Crockford's books are pretty good for this. His latest, java script: The Good Parts is a great resource and is probably along the lines of what you're looking for. Take a look through the Table of Contents.
|
# ? Apr 7, 2009 17:44 |
|
SuckerPunched posted:Douglas Crockford's books are pretty good for this. His latest, java script: The Good Parts is a great resource and is probably along the lines of what you're looking for. Take a look through the Table of Contents. Awesome, that's exactly the kind of reference I was looking for (and it looks fairly recent which is probably why I never came across it before). Thanks!
|
# ? Apr 7, 2009 18:12 |
|
Flobbster posted:Awesome, that's exactly the kind of reference I was looking for (and it looks fairly recent which is probably why I never came across it before). Thanks! Crockford's awesome do whatever he tells you.
|
# ? Apr 7, 2009 18:27 |
|
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:code:
|
# ? Apr 7, 2009 18:38 |
|
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 |
|
sonic bed head posted: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. 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. The server can respond to this load just fine. It's an internal app that at most 3-4 people are going to be using at once, and the cluster it's on handles thousands of requests per second.
|
# ? Apr 7, 2009 20:30 |
|
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 |
|
Anyone have idea why this won't generate markers in an embedded Google Map under Chrome but works on every other browser I've tested it under? I know it can stand to be refactored, but I can't figure out why the gently caress this basic code doesn't generate my markers.code:
Roseo fucked around with this message at 01:57 on Apr 8, 2009 |
# ? Apr 8, 2009 01:50 |
|
I am a java developer primarily, and my knowledge of javascript is pretty limited. I've come into a requirement for a project that takes a giant chunk of html (mostly text, a few bold, italic, or underline tags, and images are possible), and instead of displaying it in one page with a long scrollbar, the requirement is to paginate it so that the viewers can click a navigation bar on the bottom (first, next, page 1, 2, 3, .. 10, last etc). Initially, this requirement was only for a chunk of text, so server side my java code would count characters and lines and line breaks, and break the text into several page objects, which were easy to paginate. However it never felt right because it seemed like this was something a browser was meant to do, and now that html is possible, I can't run the same algorithm because I can't compute the size of the images and i'd have to strip out all the tags and whatnot. Can you think of a way this may be accomplished with javascript, or should I try to do it with java still? One thing that may be an issue is if the browser will know when to break apart the text in order to paginate it correctly. Any ideas?
|
# ? Apr 8, 2009 19:24 |
|
Pagination is generally not done client side and is done server side(in your case, with Java).
|
# ? Apr 8, 2009 23:13 |
|
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 |
|
sonic bed head posted:Does anyone know why 3rd party JS libraries never throw any errors? I noticed this too, and some library sites actually advertise that as a feature. I guess it increases market share among people who want just "plug and play (or don't play)" rather than actually writing try catch blocks when appropriate. I wish at least there were an option you could set before loading the library that would turn on/off "throw errors" mode.
|
# ? Apr 9, 2009 20:27 |
|
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:code:
|
# ? Apr 9, 2009 20:37 |
|
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 |
|
sonic bed head posted:Why on earth are you using the RegExp constructor? Why not... Umm, I don't know, but I'm doing it your way now.
|
# ? Apr 9, 2009 20:43 |
|
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: Have you tried the alternate syntax to see if that makes it shut up? code:
|
# ? Apr 9, 2009 20:45 |
|
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: People have explained how to use the regex /.../ syntax to fix this, but let me explain why it's happening real quick. What you're passing into the RegExp constructor isn't a regex, but rather a regular old string that represents a regex. So, you have to follow character escaping rules inside that string, and "\." isn't a valid escape sequence. You would have to say "\\." to get the correct result. That's why using the /.../ sequence is better, because you're entering the regex verbatim instead of encoding it as a string, so the escaping rules don't apply and you can avoid the double-backslash nonsense that can get really messy.
|
# ? Apr 9, 2009 21:16 |
|
|
# ? May 4, 2024 16:14 |
|
I need to determine what the input focus is without touching any elements directly - so no onfocus injection. I also need to do this within an iframe which has arbitrary contents. The only method I've been able to figure out so far is to inject a style element that has such a condition as: code:
This works and should be portable but I wouldn't want to run it on a massive HTML file or one containing a huge number of focusable elements. AFAICT there is no standard solution. I've found the one that should be in Gecko, and now I mostly want to know if there's one for WebKit. FateFree posted:I am a java developer primarily, and my knowledge of javascript is pretty limited. I've come into a requirement for a project that takes a giant chunk of html (mostly text, a few bold, italic, or underline tags, and images are possible), and instead of displaying it in one page with a long scrollbar, the requirement is to paginate it so that the viewers can click a navigation bar on the bottom (first, next, page 1, 2, 3, .. 10, last etc). You don't need to count characters/lines, just walk through at the document.body level testing node.getBoundingClientRect(). Once that exceeds a page, make a note to cut the document at that point and continue. When you've gathered all the pages together, blank the document if it's displayed, transfer nodes into your pages, and then show the first page. This won't work for everything, and there can't be any general rule because the page could be dynamic or use CSS to break position order. But it'd be easy enough to chase the rabbit down the hole far enough to work for whatever it is you need. That leads to a second question, is there any god-damned reason to be using offsetLeft/offsetTop/offsetParent when getBoundingClientRect does the same thing without a loop? I only started doing it because I had a page in Gecko flat-out fail when I tried the offset method, and AFAICT it always produces the correct result.
|
# ? Apr 14, 2009 23:35 |