javascript

Get video first frame in javascript

How can I get the first frame of a video file in javascript as an image? ...

mask for one digit and two digit

Hi, I have been using this $("#SomeId").mask("99"); jquery mask for text box where I want to enter only two digit numbers, but i do not know which mask to put in order to enable entering only one digit number and two digit. From 0-99 with mask above I cannot enter one digit number, the text box become blank when it lose focus. Can a...

display div on onload with tha background blur

Hi Friends i develop a project in that i need to get the input the userid and pwd before enter the other information.For that i use span tag for login and disable the background fields[i paste the background contents in a div] .But i am able to enter the value in background field. And also when i restore the window the span ...

jQuery Change event on an <input> element - any way to retain previous value?

I've been searching around this morning and I'm not finding any simple solutions... basically, I want to capture a change in an input element, but also know the previous value. Here's a change event and an input element in its simplest form. Clearly, I can get the new value with $(elem).val(), but is there a sneaky method I'm missing f...

on blur of asp.net form field, call validator(s) on that one field.

I have a form that has some standard asp.net validators and some custom validators. I know how to force the whole page to validate. But how on blur of a form field can i force the validator(s) that are looking at the field fire, not all validations on the page. I expect I am missing some little trick. :( ...

[jquery] edit in place

Hello, I have a table like this <tr> <td>No.</td> <td>Username</td> <td>Password</td> <td>Valid Until</td> <td>Delete</td> <td>Edit</td> </tr> <tr> <td>1</td> <td id="1"> <div class="1u" style="display: none;">Username</div> <input type="text" class="inputTxt" value="Username" style="display: block;"...

array_flip in javascript?

Is there any shortcut to accomplishing the equivalent of PHP's array_flip in javascript or does it have to be done via brute force looping? It has to be used for dozens of arrays so even small speedups will probably add up. ...

Is there a JQuery plugin to represent a United Stated Dollar input field?

I need to represent a U.S. Dollar amount input field. I'd like to have some AJAX feedback to format it with a "$" sign and keep two decimal places (and also disallow letters and non digits.) Anyone know of an existing project or have a few quick tips to roll my own? ...

Detecting Flash "Click" Event in JavaScript Across Browsers

Is there a way JavaScript can detect clicks (or mousedown, mouseup) that happen on Flash objects? I have tried: Attaching the 'mouseup', 'mousedown', and 'click' events to the Flash object using attachEvent/addEventListener Directly attaching the 'onmouseup', 'onmousedown', 'onclick' events inline on the Flash object Switching from ev...

How could I populate a hidden field when a link is clicked?

Hi SO: I am working on a FYI page that has large list of top-tiered links. Under these top-tier links, there are more links that usually go out to external websites. Currently, the way I handle populating the second-tier is as such: I query my database for all the top-tier links, then I construct an unordered list. Each list item has t...

Toggle wordpress content

Hi, I am trying to intergrate this http://www.sohtanaka.com/web-design/easy-toggle-jquery-tutorial/ into wordpress. IS there a way to get custom divs for certain post I basicly just want to make a page like this http://s72956.gridserver.com/dev/toggle/toggle.html updatible in wordpress.. any Ideas? ...

jQuery subtleties

Community wiki. At least I think it's worthy of that. I've always been interested in some of the inner workings of jQuery, and a great question prompted this. I'm not talking about cool stuff you can do with jQuery but more subtleties of how it works. Maybe links to helpful posts could come in here. One example is that $() is interc...

Find out the expiry date of cookie using javascript

Hi, I use functions for creating and reading cookies from quirksmode.org/js/cookies.html. I set also days to expire. I would like to find out cookie's expiry date ... so I can tell visitor how many days he/she must wait until something is possible again == until cookie is automatically erased. thanks thanks ...

[jquery] How to fire the same function when user presses enter or makes a click

Hello, I have my own edit in place function for jquery which looks like this $('.editRow').live('click', function() { var row = $(this).parent('td').parent('tr'); row.find('.1u').slideUp('fast'); row.find('.1p').slideUp('fast'); row.find('.inputTxt').slideDown('fast'); $(this).parent('td').empty().append('<a href=# class=cance...

Javascript regExp - find brackets

Hi, I can't figure out how to search for a string containing something like "[1]", for some reason this doesn't work: var regExp = '/\[[1-9]\]/'; var search = string.search(regExp); // returns -1 I've searched all over for a solution but can't find anything... ...

Which keycode for escape key with jQuery

I have two functions. When enter is pressed the functions runs correctly but when escape is pressed it doesn't. What's the correct number for the escape key? $(document).keypress(function(e) { if (e.which == 13) { $('.save').click(); } // enter (works as expected) if (e.which == 27) { $('.cancel').click(); } // esc (do...

Find the version of an ActiveX COM component

I have a web application that uses an ActiveX COM component, for example: <OBJECT id="SomeObject" style="VISIBILITY: hidden" etc... classid="clsid:0A6AD658-F144-4412-AB94-9C8F298973E1"></OBJECT> I've produced the ActiveX control myself, and I want to be able to determine in JavaScript the version of the control that is installed a...

accessing hidden-input values edited by javascript in c# ASP.NET

I have dynamically created hidden input controls in a c# codebehind file, and then populate their values with javascript. I now want to access these variables in c#. Firebug shows that the values do change with javascript, but i'm getting the origional values back in the code behind. Any insight would be much appreciated. Javascript: ...

Execute Background Task In Javascript

I have a cpu intensive task that I need to run on the client. Ideally, I'd like to be able to invoke the function and trigger progress events using jquery so I can update the UI. I know javascript does not support threading, but I've seen a few promising articles trying to mimic threading using setTimeout. What is the best approa...

Using jQuery's datastore vs. expando properties

I'm developing code using jQuery and need to store data associated with certain DOM elements. There are a bunch of other questions about how to store arbitrary data with an html element, but I'm more interested in why I would pick one option over the other. Say, for the sake of extremely simplified argument, that I want to store a "lin...