Google Closure minifier online?
Has anyone setup an online copy/paste utility for Google's Closure minifier? I'm working on a project and I want to minify part of the code manually without having to setup the entire project on my own. ...
Has anyone setup an online copy/paste utility for Google's Closure minifier? I'm working on a project and I want to minify part of the code manually without having to setup the entire project on my own. ...
Lets say I have a couple of CSS classes: .tickup { color: green; } .tickdn { color: red; } .tick { color: black; } Then I have JavaScript (which is using Prototype) that needs to dynamically change color of another element. That's easy - $('element').style.color = 'red'. But the thing is that the page is skinned, so my only way is to ...
I'm not entirely sure what's happening here. I have my code that exists like: var mycode = { init:function(){ //my code here } } //sizzle pasted here... (function(){ //sizzle code here })(); Where "sizzle code here" is the copy/paste of Sizzle in its entirety. Sizzle is contained in an anonymous function, so I'm not s...
Ive been having trouble with a php and JavaScript upload script accepting large file uploads with Dreamhost. I realize that you are supposed to edit php.ini to change post max size and the memory limit, but it isn't behaving as it should. The only way I have ever successfully had a large file upload was switching to Dreamhost PS and mak...
Hello, I'm a relative tyro in the Javascript programming arena, so please go easy on me. :-) I am trying to add an eventListener to various DOM elements on a page. However, some of the elements I'm adding my event to already have an eventListener, and I don't want to supersede that one; I only want to add my event to an element that ...
Hey all, quick question. Is there an easy way to let users update their status on Facebook with a message I have in a JavaScript variable? I know there's a URL you can use to share a link, which looks like: <a href="http://www.facebook.com/sharer.php?u=www.fthisclass.com/jshoregen.html&t=title">testlink </a> That doesn't fill ...
I believe something on this code chunk is not properly coded making it incompatible on XHTML 1.0 Transitional. The code snippet collapses div and then on click they will expand. Can somebody see what could be wrong? <script type="text/javascript"> function toggle(div){ el = document.getElementById(div); if (el.style.display == 'n...
Okay this one might be a bit tricky. What would be the best way to check if a string contains only whitespaces? The string is allowed to contain characters combined with whitespaces, but not only whitespaces. ...
I would like a way of detecting/triggering a function when the form onsubmit is cancelled by any onsubmit handler. What's the most reliable method for doing this? ...
I'm using this to check if someone came from Reddit, however it doesn't work. var ref = document.referrer; if(ref.match("/http://(www.)?reddit.com(/)?(.*)?/gi"){ alert('You came from Reddit'); } else{ alert('No you didn\'t'); } Suggestions on the regular expression are most welcome too ;) ...
I would like to absolute-position a div on either the initial or terminal corner of a text selection, as the user drags their mouse along. Unfortunately, Range only provides the index position, not the x/y coordinates. I think there might be a way to do this with range.insertNode, but only for one side. (This might also help someone posi...
I'm developing a script that will allow people to generate a banner for them to use. It's customizable. During the customization process, I'd like to be able to have the banner reload on the spot. So they could see the changes. Once they create the banner and are completely done with it I would give them a link for them to use. This link...
I have a page which has a drop list inside a form. The drop list contains 'Categories' of ads. Depending on the value chosen in the drop list, I use javascript to show/hide DIVS on the page, which all contain different form inputs for the user to fill in. All this still inside the form! Now, when the user has filled in all form inputs ...
Currently I am using jQuery to hide/show select options using following code. $("#custcol7 option[value=" + sizeValue + "]").hide(); This works fine in Firefox, but doesnt do any good in other browsers. How to I hide options from select in Chrome, Opera and IE? ...
Hi all, I'm working on a page with 60+ images and the dom:loaded event isn't firing until the last image request is initiated (not fully loaded, which is expected). On a slower connection (using some throttler to simulate this) it is very noticable. The dom:loaded event fires something that will kick in javascript interaction on the pag...
Facebook has a special javascript call for setting Fanpage permissions. Unfortunately, I can't get any javascript to work on my page. Not even a simple alert('bla') in an onclick works. Am I missing something? This is the call I want to make: Facebook.showPermissionDialog("publish_stream", ondone, showProfileSelector, [000000]); ...
I'm having trouble calculating a time (hours:minutes) difference between three time values presented as HH:mm strings. I'm calculating time worked in a day from time in, lunch time and time out. e.g. var time_worked = time_out - lunch - time_in or 07:00 = 17:00 - 01:00 - 09:00 I'm familiar with the php dates but the javascript date o...
I'm removing the button interface from a Flash AS2 drawing tool. All the actions performed by the SWF buttons are now called from the HTML via JS and ExternalInterface. The drawing tool can add text creating a TextField, and draw or add an image creating an empty MovieClip When the JS code calls the method to create the TextField, Fire...
I have a very wide website, intentionally designed to have no vertical scrolling but a lot of horizontal. Scrolling horizontally is usually a pain to users so was wondering if there was some way of using the middle mouse or other scrolling habits (eg. page up/down, up/down arrows, middle mouse click/drag) to scroll horizontally instead ...
I'm trying to create an updating clock in Javascript. Everything is working correctly as I step through the debugger, except that it's not actually updating the span. Any ideas why? <script type="text/javascript"> // The following line of code is in a setInterval() // time is set correctly, according to my debugger document.getElement...