We have several hundred javascript files in our app that are currently being served uncompressed. One piece of our solution to gain a little more client performance is to minify our javascript files. I've created an automated solution to do this on the build, however, when these new files are deployed, the files' timestamp that determine...
I run a browser based game at www.darknovagames.com. Recently, I've been working on reformatting the site with CSS, trying to get all of its pages to verify according to the HTML standard.
I've been toying with this idea of having the navigation menu on the left AJAX the pages in (rather than taking the user to a separate page each time...
I have a hidden embedded QuickTime object on my page that I'm trying to control via JavaScript, but it's not working. The object looks like this:
<object id="myPlayer" data="" type="audio/mpeg" pluginspage="http://www.apple.com/quicktime/download" width="0" height="0">
<param name="autoPlay" value="false" />
<param name="control...
I need to execute a callback when an IFRAME has finished loading. I have no control over the content in the IFRAME, so I can't fire the callback from there.
This IFRAME is programmaticly created, and I need to pass its data as a variable in the callback, as well as destroy the iframe.
Any ideas?
EDIT:
Here is what I have now:
functi...
I'm trying to write a Selenium test for a web page that uses an onbeforeunload event to prompt the user before leaving. Selenium doesn't seem to recognize the confirmation dialog that comes up, or to provide a way to hit OK or Cancel. Is there any way to do this? I'm using the Java Selenium driver, if that's relevant.
...
As far as I can tell there's no simple way of retrieving a character offset from a TextRange object in Internet Explorer. The W3C Range object has a node, and the offset into the text within that node. IE seems to just have pixel offsets. There are methods to create, extend and compare ranges, so it would be possible to write an algorith...
How can I fetch images from a server?
I've got this bit of code which allows me to draw some images on a canvas.
<html>
<head>
<script type="text/javascript">
function draw(){
var canvas = document.getElementById('canv');
var ctx = canvas.getContext('2d');
for (i=0;i<document.images.length;i++){
...
Specifically, we've got some external JavaScript tracking code on our sites that throws itself into an infinite loop each time an anchor is clicked on.
We don't maintain the tracking code, so we don't know exactly how it works. Since the code causes the browser to lock up almost immediately, I was wondering if there's anyway to log the...
How can I print a message to the error console, preferably including a variable? e.g., something like
print('x=%d', x);
...
There are times when I want to use mootools for certain things and Prototype & script.aculo.us for others but within the same site. I've even considered adding others, but was concerned about conflicts. Anyone have experience, or am I just trying to make things too complicated for myself?
...
I have a an HTML form which contains the YAHOO rich text editor on it.
When I display the form I want the YAHOO editor to have focus so that the cursor is ready to accept input without the user having to click on it or tab into it
...
This is kind of a weird problem, but I have to create a search box for our site that will be iframed on another site. When the user clicks the search button, it needs to redirect the parent frame to our search results page.
At the moment what I've done is to make the search button a postback trigger then registering a client script blo...
If I load the nextimg url manually in the browser, it gives a new picture every time I reload. But this bit of code shows the same image every iteration of draw().
How can I force myimg not to be cached?
<html>
<head>
<script type="text/javascript">
function draw(){
var canvas = document.getElementById('canv');
...
Does anyone have a good recommendation for a drop shadow jQuery plugin?
I've been working on a project that had every element on the page with a subtle drop shadow, we started using RUZEE to do the shadows but there was a severe performance hit when you had more then 4 or 5 shadows being calculated on the page.
I went to writing my own...
It seems pretty common to want to let your javascript know a particular dom node corresponds to a record in the database. So, how do you do it?
One way I've seen that's pretty common is to use a class for the type and an id for the id:
<div class="thing" id="5">
<script> myThing = select(".thing#5") </script>
There's a slight html s...
I have a web page where I'd like to remap Ctrl+N to a different behavior. I followed YUI's example of register Key Listeners and my function is called but Firefox still creates a new browser window. Things seem to work fine on IE7. How do I stop the new window from showing up?
Example:
var kl2 = new YAHOO.util.KeyListener(document, { c...
how can I scale the content of iframe (in my example is an html page), and is not a popup is in page of my web site?
So I want for example to put the content that appears in iframe in for example 80% of the real size.
Can someone help me please....
Thanks
(question scraped from http://www.htmlcodetutorial.com/help/sutra32209.html)
...
Hello,
I wrote small Python+Ajax programs (listed at the end) with socket module to study the COMET concept of asynchronous communications.
The idea is to allow browsers to send messages real time each others via my python program.
The trick is to let the "GET messages/..." connexion opened waiting for a message to answer back.
My probl...
I would like to add a typing speed indicator just below the textarea we use on our contact form. It is just for fun and to give the user some interactivity with the page while they are completing the form.
It should display the average speed while typing and keep the last average when the keystrokes are idle. When they leave the textare...
Hi all!
Need your help in such a specific situation.
I use Selenium framework for testing the application, which based on "ext js" library.
There are 2 trees of elements. I need to move an element from one tree to another element in the second tree.
I use dragAndDropToObject(xpath1,xpath2);
I can see that method takes 'xpath1' element, ...