|
11/22 |
2013/6/27-8/23 [Computer/SW/Languages/JavaScript] UID:54698 Activity:nil |
6/27 Now that ilyas is gone... tell us about the city, ausman \_ http://preview.tinyurl.com/9aatryf -a \_ Whither ilyas? \_ http://www.southampton.ac.uk/maths/about/staff/is1d12.page |
2011/2/13-4/20 [Computer/SW/Languages/JavaScript, Computer/SW/Languages, Science/GlobalWarming] UID:54037 Activity:nil |
2/13 Prototype based programming/delegation (not the pattern). anyone use this at all in real world? Does it really solve the problem of OOP brittleness? |
2010/5/25-26 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/JavaScript, Computer/SW/Languages/Misc] UID:53843 Activity:nil |
5/25 The warranty that the 2pir and Syzygryd code will ship with. It's hilarious: http://bit.ly/bqowSx -dans |
2009/6/30-7/15 [Computer/SW/Languages/JavaScript] UID:53098 Activity:nil |
6/30 Javascript, I love you: var b = new Boolean(false); b; // false !b; // ALSO false !b == b; // But this is true! !!b == !b // Negate both sides and it's false again. FUCK. if (b) { // Better fucking believe this will get executed. FUCKING FUCK. } // Better fucking believe this will get executed. FUCKING FUCK. } \_ what are you trying to do? Use b.valueOf() or b = false; \_ I don't think it was intended as a practical example. More of just a big JS WTF. --!OP \_ I take it you've never been bit by java autoboxing? This isn't unique to javascript. I'm not sure about c# but I wouldn't be surprised if it had the same kinds of issues. \_ c# will do what you would expect. Boxing has performance (not logic) penalties and only occurs when you try to use intrinsic types as objects (ex. ((bool) foo).ToString()). I agree, javascript is whacked. Give the Date object a spin for more fun. -- saarp |
11/22 |
2009/4/28-5/5 [Computer/SW/Languages/JavaScript, Reference/Law/Court] UID:52919 Activity:nil |
4/27 http://news.bbc.co.uk/2/hi/entertainment/8023341.stm SCOTUS upholds FCC's zero-tolerance obscenity policy. |
2009/4/27-5/5 [Computer/SW/Languages/JavaScript, Academia/Berkeley/CSUA/Motd] UID:52917 Activity:kinda low |
4/27 http://news.bbc.co.uk/2/hi/entertainment/8023341.stm SCOTUS upholds FCC's zero-tolerance obscenity policy. 4/27 Nice: For all you crusties out there itching to come back and troll with wall and motd, but whose accounts are still sorried from a few years back, I'd like to remind you that it's not hard to un-sorry your account. We just need some way to connect you to your name, to make sure we're reactivating the accounts for the right person. A scan/ photo of your old student ID, or a driver's license will suffice, or anything stronger if you really want to. It would also be nice to have a timeframe for when you signed up, as an additional sanity check, though it's not required. Alumni, we want you back! Andrew Toulouse CSUA President \_ translation: also don't forget to DONATE to poor students! \_ is there an alumni mailing list we should be on for announcements like this and the bbq? \_ This was an email I sent to announce@csua which an alumni kindly reposted to motd. Perhaps your .forward is out of date, or you requested to be removed from announce@csua. We don't keep an alumni mailing list, since it'd be too hard to track, and since we have a record of members with somewhat ambiguous enrollment statuses ;). have a record of members with somewhat ambiguous enrollment alumni mailing list, since it'd be too hard to track, and since we have a record of members with somewhat ambiguous enrollment statuses ;). P.S. I usually sign my posts on motd with --t. --t \_ Is that pretentious or merely annoying? \_ Dunno. You sound like an expert on annoying. I have my reasons for doing it. --t |
2008/11/19 [Computer/SW/Languages/JavaScript, Reference/Military] UID:52048 Activity:nil 85%like:52047 |
11/19 http://news.bbc.co.uk/2/hi/in_depth/7737375.stm right after http://tinyurl.com/6oocct so i guess the saudis can tell who is terror and who isn't. lolz. |
2008/11/19 [Computer/SW/Languages/JavaScript, Reference/Military] UID:52047 Activity:nil 85%like:52048 |
11/19 http://news.bbc.co.uk/2/hi/in_depth/7737375.stm right after http://uk.news.yahoo.com/22/20081118/twl-uk-somalia-piracy-saudi-20a4dd5.html so i guess the saudis can tell who is terror and who isn't huh |
2008/3/30-4/6 [Computer/SW/Languages/JavaScript, Computer/SW/Languages/Misc] UID:49612 Activity:nil |
3/28 Possibly the first computer attack designed to cause physical harm to the victims http://www.wired.com/politics/security/news/2008/03/epilepsy http://www.realtechnews.com/posts/5548 |
2007/7/17 [Computer/SW/Languages/JavaScript, Computer/SW/Languages/C_Cplusplus] UID:47313 Activity:nil |
8/23 Update your life scores, you twinks! \_ Not unless life-god gets a clue and quits classifying co-op rooms as dorms. Maggot. -john \_ Dear Maggot Infested Peon: Nowhere was it said that a co-op was a dorm. Rather, the life god sayeth: "CO-OPS count not. They make the dorms look nice." Perchance we shall allow you to return to the hallowed halls of life when you have mastered the difficult art of clue. The life god requests that you not reproduce at this time. \_ Good thing I have the life god's mother hogtied in my closet to prove my points. -john \_ That's gotta be worth at least a G, if not C. \_ What about those 4 to a room co-op rooms? Dorms like mighty nice compared to them \_ There's a lot of graduates in the wrong section of the life file, too. \_ I lost so who the fuck cares. =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= Welcome to John's special half-assed life point section. This section of the life file exists specifically for those who have it all. Sort of. Well, maybe not really. But we won't get into that right now. John .3C+.7G+.7H+.6J+172.3U 174.5 C's a '63 Mercedes in SF with a busted carb G's in Switzerland but hot H's a coop, what do you want, and J's the fixing stuff I do for it, while U's almost there, all I need is a CD drive. That, and I own soda. \_ the tank should should for an extra life point John Update: I'm not getting the tank, because I found out they wouldn't let me shoot anything with it anyway, thus making the whole exercise pointless. What counts is that I had convinced them to give me a tank. I work for a company called Bull, which is neat, because if they fail, they can easily change the logo to "Bull", or if they get bought by Microsoft, they can change it to "Bill". FDSFSDF 7/17 |
2007/6/18-21 [Computer/SW/Languages/JavaScript, Computer/SW/Languages] UID:47003 Activity:moderate |
6/18 Is this the end of the line for Chomskyan grammar? The strange language of the Piraha http://www.newyorker.com/reporting/2007/04/16/070416fa_fact_colapinto \_ Their notion of color makes more sense than ours, I think. Daniel Dennett talks a lot about this phenomenon, how seemingly atomic concepts in our language aren't really. -- ilyas \_ Chomsky: brilliant, or just good at getting on the rolodexes of anyone needing a linguistic expert? \_ dunno, but I read the article, I don't think you did. \_ You should read the article, it's really interesting. \_ I did, sorry! I thought it was really interesting, too. \_ Amazing article. |
2007/5/11-14 [Computer/SW/Languages/JavaScript] UID:46586 Activity:nil |
5/10 Let's say I have the following DOM: node1 - (contains divs with name="subject", name="author", etc) node2 - (contains divs with name="subject", name="author", etc, and contains other recursive nodes too) ... ... Yes, 1 node can encapsulate other nodes. Is there a way in js/DOM to say "From nodeX, I want to fetch all of my immediate (non grandchildren) children with name='subject'"? \_ this looks like a job for xpath \_ You can look at the nextSibling property and look for the name yourself. |
2007/4/13-16 [Computer/SW/Languages/JavaScript] UID:46300 Activity:nil |
4/13 Why I wouldn't use prototype.js -- it makes your javascript program 3-4X slower due to Array hogs and other bloated stuff. |
2007/4/6-8 [Consumer/Camera, Computer/SW/Languages/JavaScript] UID:46217 Activity:low |
4/6 What webcam does this? Is this fake? Crazy image processing software? Help!: http://www.youtube.com/watch?v=_cWzYVJQRdM \_ The comment says "its the logitech quickcam orbit MP with a robotic camera head thats also really cool, because it actually moves and follows you and keeps you zoomed in if you move around the room." I counted the comments. 70% of the comments say "Nice tits" 20% says "nice smile." \_ Nice tits indeed! |
2007/3/9-12 [Computer/SW/Languages/JavaScript] UID:45912 Activity:nil |
3/8 Say you have a javascript object, how do you list all the elements in the object? \_ If memory serves: for (var prop in object) { ... object[prop] ... } - ciyer \_ I think that's basically correct, but you should verify in a book. One gotcha to be aware of with this: you can use this to iterate through the elements in an array, but it's a really bad idea because it will break if anyone ever modifies the base Array prototype object. prototype.js the popular AJAX library does just that. -dans |
2007/3/4-7 [Computer/SW/Languages/JavaScript, Computer/SW/Languages/Misc] UID:45871 Activity:nil |
3/4 So I'm new to AJAX and I have a few concerns. Let's say I include an iframe to a completely different website, say, one of the Yahoo or Google plugin (game, fortune) or something. Isn't it possible that we'll have variable name space collision between the different iframes? My understanding is all iframes and frame variables are shared but then again my understanding sucks. \_ Yes, this is a problem, though it's a smaller problem in practice, than you might expect. By and large, it's solved the same way that the problem of name space collisions in C code is `solved'. See: http://www.google.com/apis/gadgets/gs.html and search for __MODULE_ID__ for an example. There are actually some clever things you can do with scope in Javascript to more or less eliminate this problem. If you're playing around with Javascript, you might want to check out IGMonkey, a library I wrote to make it easier to do web mashups: http://www.csua.berkeley.edu/~dans/igmonkey It's largely targeted at the Google Gadgets API, and I haven't had time to work on it in months, but there's still some useful stuff in there. -dans |
2007/2/9-12 [Computer/SW/Languages/JavaScript] UID:45698 Activity:nil |
2/9 How do I add a simple "Back" button to a .html web page? I've seen some web pages with that button, and I vaguely remember that the source looks something like "javascript(back)". How should it look exactly? Thanks. \_ quick google search says http://tinyurl.com/2wm5bw |
2007/2/9-11 [Computer/SW/Languages/Java, Computer/SW/Languages/JavaScript] UID:45694 Activity:low |
2/9 Looking for a Javascript slider bar example. The first example on Google is horrible-- initialization code all over the place, global variables, method conventions suck, etc. Thanks! \_ I don't have an answer for you, but what do you think of this article? http://ajaxworldmagazine.com/read/333329_p.htm \_ From the article: "Although it's gotten significantly better with ECMAScript standardization, I would still rather program with Java than JavaScript, the main reason being inconsistency. Maybe in eight years the current version of ECMAScript will be standard across almost all browsers. But the current version of JavaScript, despite the random implementations, is already available, and there are zero installation issues. I think that's a fairly good proof that the reason Java hasn't taken over as the RIA language of choice is the installation problem." This doesn't lend much credence to the author's argumentation or critical reading skills. That said, I think it's an interesting read, particularly some of the resources it links to. -dans \_ Whoa, didn't realize the author was Bruce Eckel. I'll chalk the bad quote up to a goof as opposed to overarching incompetence. -dans \_ Christ dans, you're an asshole. \_ Yeah, but I stand behind my words. :) Though, it does beg the question, why does pointing out a flaw in someone's argument make me an asshole? Or is it because I believe flawed arguments are a sign of incompetence? Or is it because I excuse Bruce Eckel the occasional goof in light of a long history of insightful commentary? -dans \_ I think he's saying that Java is a better language but Javascript is easy to install. Since Javascript is where so much RIA action is, that suggests the installation difficulty as being very important. \_ Yes, I get what he's saying. He's just saying it badly. Also, having read the entire article, I think it would be more accurate to say he's saying that the available implementation(s) of the Java language are better than the available implementations of Javascript. Having written a fair amount of both, I feel that Javascript is a *far* better language. -dans \_ Really? I'd be curious to know why. (not disagreeing, genuinely curious) -emarkp \_ The short version: JavaScript is Lisp with Algol (for the non-language nerds reading this, C) syntax. A bit of elaboration on the short version: Lisp (and functional languages in general) have a lot of powerful tools (e.g. lambda/anonymous functions, closures) built in that many procedural languages lack out of the box. On top of that, Javascript is a *really small* language. There's something counterintuitive there, which is that, in my opinion, JavaScript, which is a much smaller language than Java (I mean the core language, not the libraries) somehow has line for line/operator for operator more expressive power. Note that I'm not bagging on Java because it's procedural; I love C. In general, I've come to the opinion that a small (but complete) language is a sign of good language design. -dans sign of good language design. -dans |
2006/8/29-31 [Computer/SW/Languages/JavaScript] UID:44193 Activity:nil |
8/29 I hate javascript, I always disable javascripts. However, lately, I've been running into critical sites I need (information, banking, etc) and have had to enable javascript occasionally. Even popular programs like gmail and <DEAD>maps.google.com<DEAD> use javascript. If javascript is here to stay in the next decade or so, the WWW world would be a very dark place to be. Imagine all the incompatibility issues for users, write-once debug everywhere nightmares for developers, unwanted pop-ups, unwanted browser auto resize, and other things going out of control as a result of our addiction to javascript. -javascript hater \_ You, sir, are a luddite \_ I hate it too, mainly because of its use for popups, premercials etc. So I use a firefox extension that adds quick on/off buttons at the bottom. It's as good as you can get unfortunately. It's just a few sites where I need it anyway. \_ http://www.noscript.net/whats That's better. You just register those few sites. \_ Ah, cool. Seems obvious in retrospect. Thanks. |
2006/3/27-29 [Computer/SW/Languages/JavaScript, Computer/SW/Languages/Misc] UID:42449 Activity:nil |
3/27 Howdy, I just released the first beta of iGMonkey, a powerful javascript framework designed to make it easy to query, retrieve, manipulate, transform, and compare HTML and XML documents. Right now iGMonkey targets the Google Homepage API platform (http://www.google.com/apis/homepage but I plan to extend it to support others, such as Firefox's Greasemonkey plugin (http://greasemonkey.mozdev.org If you hack javascript or Google Homepage Modules, please check it out and let me know what you think: http://www.csua.berkeley.edu/~dans/igmonkey P.S. OB Dieter says, ``Touch my monkey! Touch him! Love him!'' -dans \_ Re: map() and foreach(): did you ever look at prototype.js? A lot of this sort of functionality is in there already. \_ Yes, I have. I plan to push some of my code back to prototype.js. prototype.js' map function is a crippled map that only takes a one argument function and one list. iGMonkey's map is a true generalized map that takes an n argument function and n lists. Don't get me wrong, I like prototype.js. Also, prototype.js' goal seems to be to make javascript work like ruby, which is fine, if that's what you want. Furthermore, prototype.js is monolithic, as far as I know, there's no way to pick and choose just the bits of functionality you want from it. I am working on a real #include function for javascript to make iGMonkey more component based. Hopefully the prototype.js folks will find this useful. -dans \_ That's it? That's your "I'm going to change the world" project? \_ I don't believe I said I was working on a world changing project. That said, most change is a gradual thing. Sure, if you're the leader of a major world power you can demolish a country on the other side of the world for shits and giggles (oh and because its leader was a bad man), and do it in days. Notably, the real change, i.e. the reconstruction effort usually takes longer. If Linus declared that the aim of Linux was total world domination in his original 1993 usenet announcement, I'm sure you'd have written him off as a kook. But here we are 13 \_ You've already been written off as a kook. years later, and Linux has changed the world. To me, starting small is the only sensible way to single-handedly launch a project. With hard work and a lot of luck, ambitious small projects grow up into big world-changing projects, which is to say that big projects and big ideas don't pop out of people's heads fully formed like Athena. And to respond to the snark in your comment, what have you written lateley? -dans |
2006/2/2-4 [Computer/SW/Languages/JavaScript, Computer/SW/WWW/Browsers] UID:41669 Activity:kinda low |
2/2 Is it just my imagination, or it seems like web sites these days are taking longer and longer to load? I used to be able to load http://weather.com in less than 1 second, now it takes 5-6 seconds. Ditto with http://cnn.com or other common sites. \_ Ditto with Yahoo Maps. \_ one word: flash \_ related, the flashblock extension for FF/Mozilla is wonderful \_ yeah, it's great, but i wish there were a way to say "load all movies on this page" or quickly "add this site to allow list" \_ Actually, it doesn't keep flash from downloading; you'll note sometimes you see the flash for a brief moment before the (i assume) flashblock onload takes over and replaces it with the blank play thing. It just keeps you from seeing it. \_ Sites these days expect a larger chunk of users to have broadband. \_ Sigh. I switched to DSL in order to load simple pages faster, not to deal with pages becoming complicated. \_ All that javascript and the style sheets that make the weeb purty take a long time to d/l. \_ good stylesheets should make the pages load faster. Probably does have something to do with the common use of rollovers and the fact that most sites don't have much time spent on optimization/valid html. |
2005/11/28-30 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/JavaScript, Computer/SW/Languages/Misc] UID:40749 Activity:nil |
11/28 Any recommendations for a provider of unmanaged dedicated servers. My current provider is 2 hours into a network outage today. and they don't have an ETA yet. \_ Check http://www.webhostingtalk.com and see the offer section. Then do a search to see if any of the company you are interested in has any bad review. |
2005/11/12-15 [Computer/SW/Languages/JavaScript] UID:40561 Activity:nil |
11/12 Is there a way to create a javascript pop-up window using window.open() where the content of the pop-up doesn't have a URL (i.e. it's just text not contained in a file/URL)? If not, how can I create such a pop-up? Thanks. \_ Something like foo = window.open("", "foo",""); foo.document.open(); foo.document.writeln("..."); ... foo.document.close(); \_ Try using a data: url for the url to open. Here's an example: http://bushong.net/dave/popup --dbushong |
2005/10/31-11/1 [Computer/SW/Languages/JavaScript] UID:40355 Activity:nil |
10/31 Javascript newbie question: appType2 = new Array("IESSALLO++3A - Manual EE - Single Department Input\ for ACES Group and Business", "....", "....") Trying to do some simple Javascript modifications, but don't know anything about it. What does the ++ in the string mean / do? \_ Nothing. It's just a ++ in a string. BTW, you can just say: var appType2 = [ '...', '...', '...' ]; which is much more pleasant. --dbushong \_ thanks! |
2005/7/28-29 [Computer/SW/Languages/Misc, Computer/SW/Languages/JavaScript] UID:38863 Activity:nil |
7/28 How easy/hard is it to use Google Map's interface? Do you have to be a JavaScript expert? How many lines of code to write something simple? \_ http://csua.org/u/cus You have to know a little JS, but their examples in the docs will give you the general idea. --dbushong |
2005/7/12 [Computer/SW/Languages/JavaScript, Computer/SW/Languages/Functional] UID:38561 Activity:nil |
7/12 HAHAHAHA... In Javascript, null == undefined is true. However, Number(null) != Number(undefined) Number(null) is 0 Number(undefined) is NaN HAHAHAHAHAH \_ Now is that across all Javascript implementations? Or is this one of those happy joy joy non-standard windows things? \_ This is ECMA spec. Below poster is correct about ===. \_ Programming language equality is rarely the same thing as mathematical equality. This is actually a fairly complex issue (seeing how lisp treats something is a good way to tell -- lisp has 4 or 5 different notions of equality). -- ilyas \_ All equality is equal, but some are more equal than others! \_ This is more accurate than you might think. In particular, null === undefined is false in Javascript. -gm \_ String(null) is also different from String(undefined). So? |
2005/4/21-22 [Computer/SW/Languages/JavaScript, Computer/SW/Languages/Misc] UID:37300 Activity:kinda low |
4/21 When I go to the http://www.yahoo.com page, it displays a current time that's PST. How does it know I'm in Pacific time zone? \_ Are you signed in? if you are, it uses whatever timezone in your profile. \_ No, I don't even have a Yahoo ID. \_ javascript or other client side scripting knows your tz \_ It reads the transponders in your laptop. \_ It uses GPS to bounce signals off of your tinfoil hat \_ use the source, luke. <script language=javascript>d.getElementById('nw').innerHTML=time;</script> (see elsewhere for where the time variable is set) |
2004/12/30 [Computer/SW/Languages/JavaScript] UID:35491 Activity:high |
12/29 I love using text based browser but neither links nor lynx understand javascript. What else should I try? \_ try facing reality. \_ LOL, so what do you need the javascript for, allowing popup windows rendered in ncurses? bahahahahaha... \_ You should pose this question to those who designed websites with javascripts when they could do without it. \_ Often buttons, fields, etc. use Javascript to check the inputs and submit them. -not op \_ w3m has some patches for javascript: http://w3m.sourceforge.net http://www2u.biglobe.ne.jp/~hsaka/w3m http://abe.nwr.jp/w3m/w3m-js.html |
2004/10/8-9 [Computer/SW/Languages/JavaScript] UID:33988 Activity:nil |
10/8 Is there any way to do multithreading (or even just dual-threading) in javascript? \_ you can try using a delay call to spawn another javascript function, but javascript isn't really designed for real applications, you know. |
2004/7/12 [Computer/SW/Languages/JavaScript] UID:32226 Activity:nil |
7/12 Is there a cross-browser way to have javascript build me some prototype elements, perhaps like document.parse('<div class="foo"><p>blah blah blah</p></div>')? I'm getting sick of building up all this stuff via DOM calls. |
2004/4/12-13 [Computer/SW/Languages/JavaScript] UID:13162 Activity:nil |
4/12 I'd like to create a web page with javascript that pops up a small help window when you go over certain URLs, where do I start? I've googled but there were too much crap out there. ok thx. \_ google onmouseover \_ thank you. I got it now: http://www.dynamicdrive.com/dynamicindex5/popinfo2.htm |
2003/10/27 [Computer/SW/Languages/JavaScript] UID:10801 Activity:kinda low |
10/25 To the guy who was trying to do weird slant-box effects with CSS (phuqm?): http://www.complexspiral.com/publications/rounding-tabs \_ cool, thanks. -phuqm \_ YMALTR http://www.alistapart.com/articles/slidingdoors --gabriel \_ WTFDTASF? \_ You Might Also Like To Read... Just a guess. -mice \_ HMWWAWCIAWCCW? \_ dont you mean HMWWAWCCIAWCCCW? --gabriel \_ You fail. And even worse, everyone knows you failed. \_ I gave it some thought and decided it should be 1 word. \_ I think this is the correct dictionary usage. -mice \_ Ahh, of course. My bad. --gabriel |
2003/8/27 [Computer/SW/Languages/JavaScript] UID:29489 Activity:nil |
8/26 Can someone recommend a free quick and dirty Javascript tutorial on the web? Sorry, I don't have time to go through the 900 page ORA book just to implement this silly little bookmarklet. \_ http://devedge.netscape.com has a decent reference. just stfw for some little examples. javascript is a fairly straightforward language. \_ yes, but not the various very broken implementations. \_ true, but a "free quick and dirty tutorial" wouldn't help you with this either. |
2003/3/19 [Computer/SW/Languages/JavaScript, Computer/SW/Languages/Misc, Computer/SW/Languages/Web] UID:27739 Activity:moderate |
3/18 How do I put my e-mail address in my home page and avoid being picked up by spammers? Do spammers scan for "mailto:" links or do they scan for all text in the .html files? Thx. \_ Don't worry so much about the scan part...it is too hard to maintain. I just use spamassassin now, and sometimes give out user-tag (or user+tag) type addresses. \_ put up an image of your email address. The spammers aren't going to bother taking the image file and trying to OCR it to get the email address. \_ Cool! Thanks! \_ Make a form that posts to a cgi script that sends you mail \_ post your email address to usenet then everyone will have it and you won't need it on your web page. \_ This is like that entry on the multiple-choice test your teachers warned you about. \_ "E"! It's always "E"! \_ Someone deleted my post about JavaScript obfuscation, which is probably the best way to keep the functionality of a mailto: link while hiding from spammers. ObGoogle. -tom \_ I wouldn't use a mailto: link. I'd rather just post my email address in html using '@' for '@' and '.' for '.'. This will prevent the vast majority of spammers from harvesting your email addr from your webpage. \_ This sounds good too. Thanks. \_ Thanks! -spammer |
2002/11/27-28 [Computer/SW/Languages/JavaScript, Computer/SW/Languages/Misc] UID:26647 Activity:moderate |
11/26 Can anyone point me toward a javascript that checks for the existence of a directory every X seconds and jumps there when it becomes available? I stfw but I don't think my script-describing fu is up to snuff. \_ checks for the existence of a directory on a web site? I doubt it's possible, since you'd have to be able to differentiate the error page that the web server generates from the real page. on the other hand, you probably could have a script that reloads a page every X seconds, which have the same net effect. \_ I thought perhaps that the 404 return code would be visible to javascript, but I have no idea how to do it myself. \_ Why Javascript? \_ You want perl. \_ It's a web app that people upload files to. They're given an "upload successful" page that should redirect them to where they can d/l the finished product when it's finished. Is there any other way (besides a time-delayed meta redirect, which I've got) to do this? That's why javascript sounded good. \_ Does the upload script have to be javascript? Look at something like PHProjekt for another way of placing files online. -John \_ The upload is entirely normal HTML plus PHP on the server side. Javascript is solely for the upload confirmation page, and it should take them to the download page when the download page is created. ANYTHING that would solve this problem well would be appreciated. \_ do it on the app side. i.e. keep the browser happy by sending some <!-- crap --> to it; at the same time keep checking your url (HttpUrlConnection). you can get a return code from that call. once the file is there, redirect the user - gosha \_ It's a public server so I'm running the processing function infrequently and at low priorites, meaning wait times of several minutes. |
2001/8/29-30 [Computer/SW/Languages/JavaScript] UID:22282 Activity:nil |
8/28 Is it possible in a *nix browser to turn on javascript for certain urls and to be able to enumerate those urls? For instance i want to turn it on at http://bearlink.berkeley.edu but i want it off for <DEAD>www.microsoft.com;<DEAD> and i don't want to have to keep clicking on the preferences menu to do it. \_ No. Get Zone Alarm and do it that way. \_ Konqueror, the KDE browser is really good in this respect. It has a really clean interface that allows you to turn javascript on/off on a per site basis. As a bonus, it lets you do this with cookies too. Opera may do this, though I have not personally used it. I know both run under Linux, though I don't know what support is like on other unices. -dans \_ I agree with dans. |
2001/8/8 [Computer/SW/Languages/JavaScript, Computer/SW/WWW/Browsers] UID:22045 Activity:high |
8/7 Is there a way to add elements to a form with javascript? (eg, I click a button and a textbox appears.) Thanks. \_ You can use css to set textbox so it doesn't appear on the browser (couple ways to do this), and then use javascript to toggle. \_ yes, with DHTML. You do something like <SPAN ID="foo"></SPAN> and then dynamically set the contents of it to be whatever you want with document.all["foo"].innerHTML = "bar"; you will have some problems getting this to work across different browsers, though, since IE and Netscape have a different object model for all this DHTML stuff. \_ This won't work in Netscape for two reasons. As you point out document.all["foo"] (foo is an id) is IE specific code. On top of that, Netscape 4 (may be fixed in 6) won't reflow a page, so you can't dynamically modify the content of span/div elements. If you need cross-browser compatibility, I think your best bet is what the first poster suggested -- create all the elements you want statically and use css to toggle them visible/hidden. \_ if you really care about cross-browser compatibility, you wouldn't be doing anything dynamic in the first place. \_ Don't do it on a production page. It's bad from usability standpoint. |
2001/5/14-15 [Reference/History, Computer/SW/Languages/JavaScript] UID:21270 Activity:high |
5/14 In Acrobat 5.0 Javascript, how do you break out of an if statement in a particular mouse action? 'break' does not seem to work. Thx - jthoms \_ can't you restructure it so you don't need to do this? like a while loop around it or nested ifs? \_ Let me rephrase the question. Suppose I have a button-pressed event that has the following code in it: if (some_field < 0) { app.alert ("Please enter some_field that is >= 0"); <break>; } if (some_field2 < 0) { ... } What should <break> be? In VB, you can simply do an 'Exit Sub'. \_ if it's in a function or method or whatever, can you just use a return? \_ No, that's the thing, it's not really a function. It's an event. I did try 'return' and it says 'return undefined'. \_ I'm not familiar with Javascript in Acrobat, but how about something like: do { ... if (...) { break; } ... } while (false); Also, how about putting all your event code in a real function instead? have the event call the function, where you should then be able to use "return". where "return" should be valid. \_ does your stupid language not provide an else construct? if(cond1) { .. } else if(cond2) { ... } else if(cond3) { ... } \_ First of all it's not MY stupid language. Second of all, you're missing the point... I have no problem breaking out of an if statement; the problem is to break out of the entire event. Thx. \_ it would be easier if we better understood your problem. what do you mean break out of an event? how is that different from, say, having Foo() called in response to eventX, and then having Foo() return prematurely under your specified conditions? is there some other event handling code that will be run afterward that you want to avoid? are you trying to prevent subsequent events from being generated (like preventing a mouseup after a mousedown)? postprocessing you're trying to avoid? are you trying to prevent subsequent events from being generated (like preventing a mouseup after a mousedown)? |
2000/10/4-5 [Computer/SW/Languages/Java, Computer/SW/Languages/JavaScript] UID:19410 Activity:very high |
10-04 is it possible to learn javascript without knowing java? if so, any recommended books? thanks. \_ Yes. Try JavaScript HandBook. BTW, javascript and java are not related, except that the both have the string java in them. \_ javascript syntax is loosly \_ ......? \_ JavaScript = LiveScript, or something equally dumb, originally. check http://irt.org first, then O'Reilly's 1000-pg. DHTML monster. \_ Aren't some of the JavaScript features implemented underneath with Java in the browser? This would shed some light onto Netscape's naming decision... and also why I get what seem like applet errors sometimes from what I'm pretty sure is Java*Script*. \_ AFAIR, the only thing that they share is the security stuff. |
2000/7/13-14 [Computer/SW/Languages/JavaScript, Computer/SW/Languages/Functional] UID:18656 Activity:high |
7/12 dans startup got funded. \_ so was pixelon. so? \_ but we're much hipper and sexier than they are. \_ cool. is he looking for a ceo? \_ ksinger is the ceo. \_ http://www.adjectivity.com - apparently they're doing cell phone shit, too. \_ infoP(lease) \_ http://www.adjectivity.com - \_ From the Web site: "They believed that consumer software, long been (sic) a hostage of computer scientists, needed to be designed by consumers themselves. Setting a course that would eventually lead to the creation of Project Voyager, the founders formed Adjectivity Corporation to guide the project to market." So what are they saying? That they invented the focus group and user testing as part of their heroic drive to PROJECT VOYAGER? Or that software *really* needs to be written by Joe Six-Pack using Javascript or Visual Basic for Word (languages for the "common man"), rather than by crusty old bald guys like bh, hacking away with Common Lisp in their ivory towers? \_ i think it mean that computers aren't for just a bunch of lame ass, 4 eyed, nerds anymore. \_ Like that'll ever happen when most people have trouble with the TV remote or the 2x/4x switch in their SUV. \_ when is it going to IPO? \_ Donate stock to the csua! -John \_ It will be a good tax-writeoff for the csua |
1999/5/20-21 [Computer/SW/Languages/Java, Computer/SW/Languages/JavaScript] UID:15846 Activity:kinda low |
5/19 Full time entry level javascript programmer opening at San Fransisco e-commerce startup; senior level openings too. Email for info --phr. \_ class Fool { static { System.err.println("I hate Java"); } } \_ Javascript, not Java. It's even lamer. |
1999/2/26-3/30 [Computer/SW/Languages/JavaScript, Computer/SW/SpamAssassin] UID:15485 Activity:nil |
2/26 Help, someone keeps subscribing me to mailing lists. It is overly easy to sign someone up on these web mailing lists. How do I keep from getting these mailing lists? Thanks. \_ Maybe someone as a personal vendeta against you. Have you made enemies with anyone recently? I'm not sure how possible this is but I've heard web browsers being able to transmit certain information stored on your machine via javascript or cookies or something like that (don't know much about it myself). My advice is that if the mail comes from a legit source email them back asking them not to mail you anything anymore. But usually it's illegit spam mail in which case you should complain to that person's ISP's postmaster or just ignore it. |
1998/8/13 [Computer/SW/Languages/JavaScript] UID:14450 Activity:nil |
8/11 Is there a way to check to see a certain function is defined in JavaScript? Thanks. \_ If hasClue($programmer) return true else useRealLanguage(); \_ Personally, I find embedding "Real" languages into HTML just the type of invaluble experiment in futility that one would expect suggested from JUST ANOTHER ASSHOLE LOSER PREACHING HIS IMPOTENT CASE BECAUSE IT MAKES HIM FEEL LIKE A BIG MAN TO WAVE AROUND HIS ROMANTIC SENSE OF HIS OWN INTELLIGENCE IN OVERCOMPENSATION OF HIS OWN PATHETIC TINY NEEDLEDICK. - my name is (fucker) \_ fucker, will you marry me? \_ You're too late. Get in line. -(fucker) \_ Cool. Caught you. --trolling for flames \_ The question was not asking for an alternative. If you don't know the answer, why bother posting? \_ Exactly. You don't know the answer so why bother posting? |
11/22 |