Ask MetaFilter questions tagged with javascript Questions tagged with 'javascript' at Ask MetaFilter. Thu, 03 Jul 2014 13:49:19 -0800 Thu, 03 Jul 2014 13:49:19 -0800 en-us 60 How can I recreate this website on a service like squarespace or six? <a href="">This</a> is my company's website/portfolio. It was not created by me. It's not built well (slow and javascripty) and I want to replicate it using either squarespace, wix, or some other platform that will allow it to be very easily updated. My plan is to embed the videos from vimeo as opposed to having them actually hosted on the site. I'm trying to figure out how I can recreate the navigation for the different videos as you now see it. Is that possible?,2014:site.264612 Thu, 03 Jul 2014 13:49:19 -0800 matt_od I need to write a Node.js UDP Echo Server I need to write a UDP echo server in Node.js, but I'm having trouble parsing the available tutorial, could use some expert help. Thing is, I'm a total Node.js noob - this is my first time using it. I come from a PHP background. A very kind person has already solved my problem in PHP and <a href="">posted it here</a> on the web.<br> <br> This works perfectly, whatever I send gets echoed back to me with an OK, making it easy for the client to confirm receipt of the datagram.<br> <br> The only tutorial for Node.js that comes close is <a href="">this one</a>, but I can't figure out how to make the server echo what it receives back to the client, or how to make the client display that echo.<br> <br> Help me socket jockeys, you're my only hope.<br> <br> By the way, I can add any module you like, and already have, so that's the environment I'm in.,2014:site.262652 Wed, 28 May 2014 13:24:42 -0800 signsofrain Mobile Web App difficulty level: low end android So, I'm going to be building some web/phonegap apps for low end android phones. What frameworks should I be looking at for maximum performance/compatibility?,2014:site.262630 Wed, 28 May 2014 09:36:17 -0800 Freen Anonymous JavaScript advice Hello, Could someone please tell me where I can get advice on the design of code on a particular website? I'd be interested in learning how the design of a particular website incorporates Flash and JavaScript. I've recently completed an O'Reilly's School of Technology course on JavaScript but I'm not familiar with Flash so I don't understand the code on a particular site.<br> <br> Ideally, I'd like comprehensive advice without having to display my message in the public domain online. I'd be willing to pay for advice, approx. $10 for a brief explanation of code.<br> <br> Thanks for any help with this.,2014:site.259974 Tue, 08 Apr 2014 00:17:59 -0800 Musashi Daryl Blocking traffic to my blog Is there a way to block links from a certain referrer from viewing my Tumblr page, say through a javascript redirect to a blank page or a different page altogether? My blog has appeared on a site known for abuse and harassment and (though I have luckily not received any yet) I'd love to keep it from happening eventually. I'm aware that it can trivially be circumvented through noscript or ghostery or things like that, I just want to do all I can to avoid harassment.,2014:site.258449 Mon, 10 Mar 2014 07:55:24 -0800 Anonymous Where to find frontend web development job at the lead/architect level? I've been doing frontend web development for around 15 years and want to find a new position at the lead/architect level. I know a few sites to look at, and plenty of recruiters contact me, but what else can I do? My issue is that most of the jobs I'm hearing about are still more "Sr. Frontend Developer," which is a step down in title (and usually in salary) from where I am now.<br> <br> Venues I've explored:<br> Putting my resume on Dice and waiting for recruiters to call<br> Linkedin<br> Personal networking via twitter, etc.<br><br> I am aware of but haven't tried it yet<br> <br> But I feel like I'm missing something as far as finding the more senior jobs (though I have been contacted about a few.) Are there any other sites I can try? Should I look at company websites directly and if so, can anyone recommend any in particular? Are there any reputable recruiters who specialize in this area?<br> <br> I'm in L.A. and not looking to relocate, though I would definitely be open to remote work. In a *very* extreme edge case I might be willing to start for a few months in the Bay area, if I could work remotely from L.A. after that.<br> <br> I'm confident I have the background to land one of these jobs, if I can find them. My work is largely in Javascript, which is currently a growing technology. I am getting interviews and will probably be getting offers soon, I just want to make sure I am not leaving any stones unturned. Thanks!,2014:site.258232 Wed, 05 Mar 2014 16:17:59 -0800 drjimmy11 How to download WIX javascript gallery images? I'm trying to help my cousin migrate his WIX photography site to an actual host. His backup drive with all of his photos died and the only place these images exist is on wix, who doesn't support downloading the content. I tried httrack and a couple online website rippers but none are able to pull the images. Is there any way I can avoid doing this the amazingly hard way?,2014:site.257705 Mon, 24 Feb 2014 16:22:14 -0800 mrflibble Why won't's notes show up in Firefox? The notes (aka comments) on don't appear to load on firefox, but load correctly in chrome and mobile safari. <a href=",0ssgSYn#0">See these screenshots</a>. Everything else appears to be loading correctly except the 'read next' button in the lower left of the page and the menu button in the top left. For the Menu button, the box/button itself shows up, but not the medium icon (the 'M'). The scrolling elements seem to load correctly.<br> <br> I've tried some simple troubleshooting by disabling extensions (flashblock, adblock, IEtab) and inspecting the page source to try and identify the issue but so far no luck (I have a pretty basic to fair knowledge of HTML and CSS but don't know much about HTML5/CSS3 stuff, so I got lost pretty quickly. <br> <br> I'm guessing there's some javascript related reason why these elements are not loading correctly, but I have no idea where or what to look for and googling didn't produce any results for similar issues or how to fix it.,2014:site.257154 Fri, 14 Feb 2014 14:24:12 -0800 TwoWordReview How do I web? Big picture. Can anyone recommend tutorials or books about web development that don't focus on the tiny details of JS/CSS/HTML? Basically what I'm looking for is something that will teach me how to take this piece of javascript that I wrote and actually stick it on a website that can be accessed. I pick up scripting languages pretty quickly, so I am not looking for a javascript or HTML tutorial- rather how all the pieces fit together.,2014:site.256146 Tue, 28 Jan 2014 17:44:05 -0800 dilaudid Hourly contract rate for SQL in the UK? I'm an American in the UK and have been hired to do some freelance work for a tech company in Northern England. I'm not sure what to charge for my hourly rate. I am working in SQL, writing queries and turning them into data visualizations for the web (using Ruby and Javascript/HTML). I am very junior, although quite competent at SQL; I'm coming up (and quickly) in the other areas. I am a senior graphic designer and extremely competent in the design/layout side of things, but those skills are not required here. I only mention it because I had been doing freelance work in the States for ~15 years and so there is some crossover with understanding workflows, computers, freelancing, etc. I just don't know how the rates and this new skill set I'm acquiring translate and add up to an appropriate hourly rate here. What is the range I should be thinking about? I want to make sure I'm not selling myself short, but also not asking for something overinflated and ridiculous for my competence level; I've done some internet searching but I can't seem to figure out where the upper and lower limits are. Thanks!,2013:site.252470 Sat, 23 Nov 2013 08:29:59 -0800 Anonymous Is there anywhere decent to look for freelance web work? I'm a frontend web developer with quite a long resume. I work full-time but I'd like to pick up some freelance, remote work in my spare time. I'm wondering if there are any places to look besides my personal network, Craigslist, and those awful "Rent-a-coder" sites where you get underbid by overseas folks who'll do it for $9/hr. I'm pretty sure I'm not going to get the answer I want, but I figured I'd try anyway. I'm just not interested in "lowest-bid" sites. Anything that pays under $50/hr or so is just not worth my time- I'm sorry if that sounds bad, that's just how it is. (If I was going to freelance at an office, the market rate for my skillset would probably be around $80-120/hr, but I'm willing to take much less b/c I need to work off-site on nights and weekends, and I can't afford to be picky.)<br> <br> My skillset is mostly on the frontend- html, css, advanced js architecture and ability to pick up flavor-of-the-month js frameworks as needed. I can also do enough Rails to get by if the "full-stack" buzzword comes into play. Overall I have 14 years of experience as a programmer.<br> <br> I've asked people personally and had one "almost" that fell through, and I've browsed CL until the people wanting professional devs to work for literally a cup of coffee makes my eyes roll back in my head, but I'm kind of at a loss of what else to do. If there is any resource or technique I'm missing, please let me know. Thanks!<br> <br> (I'm sure other questions like this have been posted; posting this anyway b/c things change so fast in tech),2013:site.251445 Tue, 05 Nov 2013 22:34:42 -0800 drjimmy11 JavaScript Design Pattern for Text Input I'm writing a simple game in JavaScrip that needs to occasionally ask the user for text input. I don't want to use the JavaScript prompt() method. I want to display an HTML textbox and have my JavaScript code display the textbox and wait for the user to fill it out and hit ENTER. This seems like the sort of pattern that someone would have devised, but my Google-Fu is weak on this. Any help would be appeciated. Not looking for external libraries if they can be avoided, although JQuery would be acceptable. Thanks!,2013:site.250692 Tue, 22 Oct 2013 16:31:37 -0800 DWRoelands Email current page as attachment? I need a bookmarklet, preferably, that will send an email with the current page as an attachment -- not just the link, the actual file. Bonus if you can pre-specify the email address (or otherwise make it 1-click). I will settle for an IFTTT recipe that makes this happen (maybe through automatically saving a page to a dropbox folder?), or *possibly* a browser extension, though I hate the idea of giving out yet more permissions to unknown developers. Greasemonkey would be ok. <br> <br> It must physically send the current page as an attachment, not just a link, and it must be the file that is on my computer (not one re-requested by another server).,2013:site.250494 Sat, 19 Oct 2013 12:55:03 -0800 tintexas Making a single mega-image site with jQuery navigation? I've got limited HTML and CSS skills, and I'd like to make a Web site that's basically one really, really, really gigantic picture and uses jQuery to jump around from point to point inside it. What's the easiest way to do that? In keeping with<a href=""> my current site</a>, which has been under construction for a billion years, I'd like to "draw" my new site, and ideally have it all just exist as one really, really big image that the user sort of flies around above. <br> <br> This seems roughly, approximately possible -- initially I wanted to do a parallax thing, but it seems like everyone and their donkey is doing parallax sites, and since one of the sub-goals of this site will be potentially job-seeking as a creative guy in the ad industry, being somebody who comes across as Late To The Trend would be kind of embarrassing. <br> <br> I'm not super-gifted at Web design, but I'm good at finding ways to innovate with limited resources (see my current site). But I'd like some guidance on how to approach this before I launch in (if it's even approachable). <br> <br> My figgerin' is that I make a really, really, really big (but very simple, for file size reasons) image, map the coordinates on it, and use HTML mapping to turn various points on this mega-image into links to other parts of the mega-image. <br> <br> What I'm not sure of how to handle is the transitions from one part to the next. <br> <br> Searching for "large-image Web sites" etc. pretty much just deliver lots of pages on how to have full-screen images on your site, which isn't what I'm after: I'm looking for a ridiculously huge image as the background, and a script that turns transitions into fast "flyovers" to destinations on that image. <br> <br> Possible for a programming numpty? Or a fool's errand?,2013:site.249596 Thu, 03 Oct 2013 14:03:11 -0800 Shepherd Security issues to consider? I'm making a small app (website) that stores arbitrary encrypted data on a server. It's always encrypted on the server; encoding and decoding the information takes place in the browser via JS using the <a href="">Stanford Javascript Crypto Library</a>. I'd like to avoid any serious security issues that are avoidable. Some stuff is beyond the scope of the app, like keyloggers. There's only so much I can do! But what <em>is</em> within the scope of the app that I need to be aware of?<br> <br> Aside: I also think things like malicious code in a second browser tab somehow gaining access to keystrokes, or to the JS running in the app window, is a browser security issue and also beyond the scope of the app. Should I rethink that? Any steps to minimize danger from the browser's sandbox becoming compromised?<br> <br> The primary use case is to provide quick and easy access to my passwords in an environment where I have access to the web, no ability to use KeePass, and a reasonable belief that the machine is free of malicious monitoring.,2013:site.247285 Sun, 25 Aug 2013 14:06:00 -0800 jsturgill Does anyone know how to make a PDF act like Excel does? How do I make a PDF fillable form do a few of the things that Excel does for me easy, like turn the Trademark notation into superscript TM, like this? ™ So... I'm kinda new to writing javascript, and I'm making a PDF fillable form. The original form was made in Excel, so I'm using Adobe LiveCycle to make a PDF fillable out of the fields on the Excel form. I'm not converting or anything, I've created the PDF from scratch.<br> <br> Something I can't figure out how to do is to recreate the "TM" field in subscript like Excel does when you type in (TM) into a field. For example, if I typed in MetaFilter(TM) it would make it look like MetaFilter™. Is it possible to have a bit of code across any fillable text field that would allow that little bit of change to happen to make a form easier for the users of my form?<br> <br> I've been fighting this all day long!,2013:site.246994 Tue, 20 Aug 2013 14:04:22 -0800 Jim On Light Intensive programming "bootcamp" in California? I'm interested in taking a month or possibly two off work and focusing intensely during that time on a very practical course of study related to web development. What are my options in California <a href="">similar to this program</a>? I'm not completely averse to a focus on ASP.NET, Ruby on Rails, or Django, but I currently do most of my work in PHP and JavaScript, and wouldn't mind something centered around Drupal, WordPress, Laravel, Symfony 2, or similar. <br> <br> I currently only have experience with PHP, Python, and JavaScript.<br> <br> I'm looking for:<br> <br> <ul><br> <li>Peer and expert code review of projects</li><br> <li>Learning through practical application</li><br> <li>Experienced instructors</li><br> <li>Networking opportunities</li><br> <li>Job placement as an integrated part of the program</li><br> <li>A physical, shared space for the class (not online)</li><br> <li>Strong JavaScript component using a framework like Bootstrap or similar</li><br> <li>Condensed timeframe</li><br> <li>Strong teaching component: instructors who actually are good communicators and take student failures personally</li><br> <li>Git as an integrated tool, using many of its features</li><br> </ul><br> <br> Is there anything like that in California? If not, what about some other state?,2013:site.246797 Fri, 16 Aug 2013 15:16:54 -0800 jsturgill Scroll Follow Box I am a novice at html, but I have found code that I've used to create placeholders for images on the right side of my page that don't move when I scroll down. I want to hyperlink each of five images in that scroll follow box to a different audio file. Each audio file corresponds to one of five explanations grouped together on the left side of the page. There are dozens of five explanation groupings and the follow box helps users remember what the terms mean by clicking a close by box when they need to. I am using Serif WebX6 to build the website. And I've been referring to a book I have on .html. I found lots of code that uses .css or javascript, but I have no training with these, and when I pasted them in, the website didn't accept or run them. I do have a better understanding of .html though. And I have been able to move the box I made around, and create placeholders for my images, but no images. This is the code I found.<br> <br> <head><br> <br> #fixme { <br> position: absolute; <br> right: 250px; <br> top:400px<br> }<br> <br> div &gt; div#fixme { position: fixed; }<br> <br> pre.fixit { <br> overflow:auto;<br> border-left:1px dashed #000;<br> border-right:1px dashed #000;<br> padding-left:2px; }<br> <br> #header {<br> top:200px;<br> left:20px;<br> height:200px;<br> }<br> <br> <br> <><><br> <br> div#fixme {<br> right: expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' );<br> top: expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' );<br> }<br> <br> <br> <><><br> <br> function reposition(){<br> var el = document.getElementById('fixme');<br> <br> var ScrollTop = document.body.scrollTop;<br> if (ScrollTop == 0)<br> {<br> if (window.pageYOffset)<br> ScrollTop = window.pageYOffset;<br> else<br> ScrollTop = (document.body.parentElement) ? document.body.parentElement.scrollTop : 0;<br> }<br> if(ScrollTop &lt; 200)<br> = 200 - ScrollTop + "px";<br> else<br> = "0px";<br> }<br> <br> </></></></></head><br> <br> <br> header<br> <br> <br> <br> long content<br> long content<br> long content<br> long content<br> long content<br> <br> <br> </body><br> </html><br> <br> How do I get my images, add mp3 files and know what I can get rid of. I've gone to several discussion boards, but no help.,2013:site.246139 Tue, 06 Aug 2013 12:49:12 -0800 CollectiveMind Looking for a user script to improve the tumblr dashboard: 5-6 columns? I'm hoping to find a user script for Tumblr that will go from the default 1 column layout to something that has 5-6 columns to take advantage of my widescreen monitor. I've found a userscript that gets partway there (<a href="">"minimal three column layout"</a>), but it suppresses the Like &amp; Repost buttons. I've tried modifying it to have 5 columns instead of three, but I don't know java for beans. Would someone in the hivemind be able to tweak this appropriately, or know another way to get a better layout?,2013:site.244695 Sun, 14 Jul 2013 15:50:52 -0800 Decimask Sequential numbering of Tumblr posts? Is there a clever way to have sequential numbering on Tumblr posts? What I'm looking for is a way to have my posts numbered "Week 1," "Week 2," etc. I figured out a way to add JavaScript, by making a Global var in the head (weekNum=0;), then in the relevant section adding:<br> <pre><br> <br> // in script tags, of course...<br> w= "Week " + (weekNum+1) ;<br> weekNum++;<br> document.write(w);<br> <br> <br> </pre><br> This works like a charm, except because the posts are generated from the newest to the oldest, the numbering is backwards. <br> <br> Thanks in advance, all you cleverer than me folks...,2013:site.243991 Tue, 02 Jul 2013 08:32:38 -0800 jpburns === JavaScript is actually not that ugly. === I'd like to learn basic CoffeeScript for a one-off project, but most of the books I've seen come from the perspective of the JS developer making the leap to CS. JS is ubiquitous and will no doubt come in handy in many more situations. What is a good pocket library of 3-4 books for someone new to JS and front-end web dev stuff, but not new to programming concepts? (For example, my C pocket library is K&amp;R, Deep C secrets, and C: A Reference Manual. I know that the front-end web world is a lot richer than C-world, but do what you can to help me.),2013:site.242766 Wed, 12 Jun 2013 12:12:07 -0800 Nomyte What are the best sites for hiring front-end developers in the US? Stackoverflow has been great for back-end developers, but not so much for the front-end people - I mean javascript frameworks + html5 + css. What are the best job sites for hiring front-end developers in the US?,2013:site.241608 Fri, 24 May 2013 11:00:37 -0800 grubby Help me create a secondary dev environment, either Windows 7 or Ubuntu I'm a Mac-based webmonkey, and I need to sett up a secondary dev environment on an old Thinkpad X200. It currently runs... or rather slow-jogs Windows 7. I don't need the setup to be perfect, just something on which I can run an Apache / LAMP stack and occasional Sinatra / Rails apps without supreme annoyance. My goal is to put no more money into the software than I did the hardware ($175). This machine is for occasional light use, except for the month I'm taking it with me to Russia. So, umm, security tips would be helpful too! Thanks!<br> <br> My current standards in OS X land:<br> Espresso<br> Git<br> MAMP<br> Sequel Pro<br> Chrome<br> Mou<br> Mountee<br> Cyberduck<br> Terminal<br> Textexpander<br> Propane<br> Sparrow<br> Jumpcut<br> Adobe CS5<br> Spotify<br> 1Password<br> Adium<br> Harvest<br> Writeroom<br> <br> I've checked, but am curious about the opinions of Mefites.<br> <br> ps I've seen <a href="">this question</a> but I assume that there will be updates in the last 5 years.,2013:site.240644 Thu, 09 May 2013 01:57:45 -0800 nímwunnan Show me the quick and dirty road to jquery/javascript proficiency I am hoping to become a fairly nimble noob with jQuery (and understand the javascript logic that goes with it) in about 3 weeks. What is the smartest way forward? I have been through a fair number of web tutorials (code school, codecademy, lynda, safari books) and I pretty must have the basics down. Can write functions, handle events, understand objects, etc..<br> <br> But now that I've done that I don't know what the smartest next move is. There is a ton of documentation out there and I don't want to waste time getting in over my head. I am looking for more structured exercises or tutorials that take you all the way through building mock apps but don't know where to find them.<br> <br> If I had unlimited time I would just start working on small projects and building them for fun for myself and/or on github--but I need to work smart and be as efficient as I can with my time.<br> <br> Obviously I can't learn it all or become a pro but I hoping up to be able to make the leap to backbone and be able to contribute to a few small-scale web apps. As a noob, but at least a competent one!,2013:site.240565 Tue, 07 May 2013 17:06:38 -0800 OlivesAndTurkishCoffee I can FizzBuzz! Where do I go from here? I am teaching myself how to program. But there seems to be a big gap between intro courses/resources (CodeCademy, O'Reilly books, Learn X the Hard Way) and Actually Doing Things. Help me figure out a road plan? I know HTML and CSS pretty well. I know a teeny bit of PHP and JS and MySQL, and even less of AJAX/JSON, but enough to mess around with existing CMSes and hack together simple custom solutions from StackOverflow and Google. I'm starting to learn Python (I've gone through Zed Shaw's <a href="">Learn Python the Hard Way</a>). I've also done the Javascript track on <a href="">CodeCademy</a>, and I'm starting on the "build a search engine" <a href="">CS 101</a> course on Udacity. <br> <br> I'm finding that a lot of the recommended intro resources for these things kind of start off at the same place - basic logic, loops, conditionals, etc. - and then say "Okay, go do stuff". But the stuff I want to do tends to be several orders of magnitude beyond what the intro books have taught. Shaw's book is a good example of this: I can build a CYOA game in terminal! Great. How does this translate to...actually writing a program with a GUI and how do I integrate this with some form of data storage and oh god there's this thing called garbage collection that everyone talks about and ahh. <br> <br> A lot of advice you see out there is "just start programming!" but I honestly don't even know where to begin. I see cool projects on Github and I can't begin to understand the source code. I also know enough to know that it's really easy to screw things up, and I feel like I don't know nearly enough (or anything at all) about best practices for writing secure code, minimizing run time. <br> <br> <strong>What I'm looking for:</strong> <br> I do really well with structured/project-based learning, which is why the Udacity course seems promising. Just straight-up reading the documentation of the various languages tends to make my brain spin. Can you recommend a guide / a road plan for how to incrementally step up from FizzBuzz to something resembling Actual Skill? Maybe something like <a href="">Project Euler</a> that isn't quite as math based.<br> <br> <strong>[Extraneous info, possibly useful]</strong><br> What I'm already doing: <br> <ol><li>Trying to work on personal projects that are just a little bit beyond what I feel comfortable with. This is fun, but I also can't help but think I'll have a lot of gaps in my knowledge if I only work on things that I can envision, and I can only envision things that are based on the skills I already know. </li><br> <li>Reading StackOverflow to see other people's code, posting stuff on CodeReview when relevant.</li><br> <li>Slowly (slowly) working my way through the <a href="">Python Challenges</a>.</li></ol><br> <br> What I would like to do with this skill: <br> <ol><li>Professionally: be a kick-ass web developer. I work as a front-end dev now, but most of what I do is CMS customization (WP, Drupal) and while that is its own niche, it also seems very limited in terms of professional advancement.</li><br> <li>Personally: be one of those people encounters a problem / has an idea and can write a script to fix it. This might include stuff like "I need to find a way to integrate RSS content from disparate sources into a uniform-looking output" or "I want to interact with the Twitter API and do cool textual analysis with it" or anything else.</li><br> <li>Blue-sky thinking: get to a place where I could build a web-app/service that is actually helpful (or entertaining) for other people. Not because start-up VC blah, but because helping people is awesome. For example, a thing that I'm building for myself right now is a habit-tracker with lots of built-in data-wankery with respects to streaks, averages, trends, etc. It's just PHP and MySQL right now (I haven't gotten to the "graph this data" stage yet) but I could see this being something that people might want.</li></ol>,2013:site.240447 Mon, 06 May 2013 08:26:41 -0800 Phire