javascript

How do streaming videos work?

Hi, So I have some videos in .flv format which I'd like people to be able to view from my site, without being able to download them. So far Flowplayer seems like the best choice for the actual flash player. However, I've been looking into this video streaming thing, as its supposed to make the videos very fast to view and allows seekin...

Back Button and Refresh with AJAX

I need a solution for the page refresh and the back button when using AJAX. I'm using simple javascript for the AJAX implementation. If anybody could send a code snippet I would be very grateful. ...

Scripting and Programming

Where does Scripting ends and Programming begins? ActionScript 3 and JavaScript/JScript are so different... ...

problem accessing an iframe that was called using ajax

hi, i called an iframe using ajax onto the current page and tried to print the page but is printing blank page can somebody help me with this what i did was: current page: <input type="button" onclick=verifyControl('1001') > <div id='pa_print'></div> js file function: function verifyControl(rNo) { xmlHttp=GetXmlHttpObject(); ...

Getting reference document element by name using javascript

Hello A basic question I assume for someone who does JS on a daily basis. I'm helping a friend that does not use the recent sweets (JQuery, prototype and co.). How should I get a reference to a document element by name ? I would like to allow a selection user does in a <SELECT /> element modify the value of an <INPUT /> element. Bo...

JSLint (CLI): options?

I'm running JSLint's Rhino version from the Ubuntu command line like so: $ rhino jslint.js myScript.js While the web interface offers various options, I couldn't figure out how to invoke those via the command line. Am I overlooking anything in the documentation? ...

JSLint: control comments (selective ignore)

Does JSLint have anything like JavaScript Lint's control comments (e.g. /*jsl:fallthru*/) to make it ignore certain passages? ...

What do you use to minimize and compress JavaScript libraries?

What do you use to minimize and compress JavaScript libraries? ...

At what stage do you compress/minimize javascript?

When building, or "on the fly" (perhaps with caching) when the users request pages. And what are the dis/advantages of each. ...

Why is my nested for loop not working as I expected?

I have trouble dealing with my for loops now, I'm trying to compare two datum, basically it will compare 2 items, then it will write the matches and the mismatches on the webpage. I managed to write the matches on the webpage, it was working good. But there's a bug in my mismatch compare. It wrote all the data on the webpage X times, h...

onerror handling with VS2008

function testFun() { onerror = function() { log("caught the error"); return true; }; setTimeout(function() { throw "bad bad bad"; }, 300); }; This is sample, code, but it demonstrates a problem. If I run this in FF, or IE7, it prints the sensible "caught the error" message (assume a reasonable 'log' function). However if I deb...

Making a 2-player web-based textual game

I'm making a simple web-based, turn-based game and am trying to determine what modules exist out there to help me on this task. Here's the web app I'm looking to build: User visits the homepage, clicks on a "play game" link This takes the user to a "game room" where he either joins someone else who has been waiting for a partner to p...

JQuery/Javascript Reordering rows

I have a aspx page that looks something like this: <tr id="Row1"> <td>Some label</td> <td>Some complex control</td> </tr> <tr id="Row2"> <td>Some label</td> <td>Some complex control</td> </tr> <tr id="Row3"> <td>Some label</td> <td>Some complex control</td> </tr> As soon as the page is loaded, I would want to reorder these...

Checking if a variable contains a numerical value in Javascript

In PHP, it's pretty easy: is_numeric(23);//true is_numeric("23");//true is_numeric(23.5);//true is_numeric(true);//false But how do I do this in Javascript? I could use a regular expression, but is there a function for this? ...

Browser Version or Bug Detection

I've recently seen some information about avoiding coding to specific browsers an instead using feature/bug detection. It seems that John Resig, the creator of jQuery is a big fan of feature/bug detection (he has an excellent talk that includes a discussion of this on YUI Theater). I'm curious if people are finding that this approach m...

Loading a xml to a class with Javascript

How can I load a XML file to class using Javascript? ...

Detect Browser Support for display:inline-block

How can you detect if a browser supports the CSS attribute display:inline-block? ...

reading the firebug console in javascript

I'm looking for a way to read the most recent command that was logged to the firebug console. For example, I could have something that does console.debug('The most current request URI is /sweatsocks'); And then another piece of (pseudo)code could then if (mostRecentConsoleEntry().endsWith('/sweatsocks')) { // do some stuff } The...

Calling external .js from ASP.NET MVC

I'm javascript newbie. What I'd like to be able to do is to call a function from .js file sitting in ASP.NET MVC project's scripts folder. The function is: function myfunction() { alert("HELLO"); } ...and it resides in file brfix.js On a viewpage I call it like this: <script src="../../Scripts/brfix.js" type="text/javascript"><...

Minimize browser window using javascript.

Is there a javascript or jQuery method to minimize the current browser window? ...