javascript

JavaScript - Per each case, make array.

My last question asked for running once without the use of booleans. I decided I needed booleans but not a lot of variables since that would be messy. So let's say I have this: var counter = 0; $(function() { $('#typing').keyup(function() { switch($(this).val().toLowerCase()) { case 'test': // DO THIS...

How do I remove all tinymce instances at startup?

I'm dynamically creating and destroying textareas for this purpose. However, when I create a textarea and then an instance of it in tinymce--then come back to the page again, it doesn't work. I've found that the solution is to simply remove any existing instance of that same name, but I was wondering if it's possible to just do it at sta...

css js menu help

I'm designing a menu for a photography site. What I would like is a menu that on hover does two things: pops up an individual image in line with the menu <li>, and also displays just below the menu some text that stays centered in the page, i.e. has position:fixed;. I've taken care of the first requirement, but I'm stuck as to how to a...

Javascript works in FF and IE .. but Chrome says "cannot call method of null"!

The code that contains the error is: var Slide = new Class({ initialize: function(triggers, panels) { this.triggers = $(triggers).getElements('a[rel=content1-1]'); this.panels = $(panels).getElements('ul[class=rel-content1-1]'); this.active = -1; this.toggle(); }, ... }) This is called from late...

2 jQuery events on same action seem to cancel each other

*Update: I have pasted working code in order to erase any ambiguity about what is going on. I have also tried to remove the preventDefault on both handlers, does not help I have a form where upon the button click, a JS event needs to happen, and the form needs to submit. As per the code below, what I thought would happen is: alert(but...

How can add Amazon Wish List to my site? (PHP, jquery, CSS)

Hiya, I want to add an Amazon Books Wish List to my site and I want to style it with CSS. So, how can I do it? Should I use PHP or can I use Jquery? Do you know PHP tutorials for it or any Jquery plug in? Thanks ...

Making sense of jquery - constructor error?

I'm pretty new to javascript, and has built a script that is working in webkit but not in firefox. When i check for errors in firebug, I get this: google.maps.Geocoder is not a constructor $('.to, .from').geo_autocomplete(new google.maps.Geocoder, { what does it mean? ...

Displaying a local gstreamer stream in a browser

I have a camera feed coming into a linux machine using a V4l2 interface as the source for a gstreamer pipeline. I'm building an interface to control the camera, and I would like to do so in HTML/javascript, communicating to a local server. The problem is getting a feed from the gst pipeline into the browser. The options for doing so seem...

how to fix iframe load never terminating the browser visual spinner and 'Transfer ...' status

I have pages loading json into hidden iframes from javascript. The Firefox browser seems to never acknowledge fully receiving the iframe content, and reports 'Transferring data from ...' on the status line, and shows the twirly 'busy' icon on the tab, indefinitely. I am using jQuery to bind the 'load' handlers, and would prefer a sol...

JavaScript Image object

Can anyone tell me how I can access the following line of HTML in JavaScript, please? I cannot seem to find the image object in JavaScript: <td colspan="2" rowspan="5"><img src="../image/6765.jpg" width="330" height="130" /> The end result is that I want to change the images. Thanks for any help ! ...

How to call javascript function inside an adjacent iframe

I have an html page where I have this layout essentially: <html> <body> <!-- iFrame A --> <iframe></iframe> <!-- iFrame B --> <iframe></iframe> </body> </html> In IFRAME "B", I'd like to call a js function in IFRAME "A", which will ultimately change the window.location property and redirect the page. I have jquery at my disposal as ...

Retrieving the actual binary value of a JavaScript number value?

In JavaScript, for a given property containing a Number value, is it possible to retrieve the actual binary value - the 64 bits representing the value. var x = 13; What 64 bits are stored in the memory location that x points to? I know that there are IEEE 754 converters out there. But is it possible to retrieve the actual live binary ...

Utf8 problem with IE and GET request using PHP

Using javascript, I'm setting the src of an iframe to an URL passing a GET variable, urlencoded with unescape( encodeURIComponent( message ) ). With IE, this works the first time I load the iframe.The utf-8 characters, as the var_dump($_GET) reveals server-side, are okay. But next calls, all I get is garbage. On the other hand, if I j...

Using . in a [] to enter in a new scope

Let me try to explain this, I have a string like this: "b.c" And an object like this: a = { b:{ c:2 } } I would like to use that string to get the c property, but using this doesn't work: a["b.c"] How can I use the "b.c" string to work just like a.b.c? (Without using eval, perfomance is important in my case) ...

single ajax Calendar extender for mutiple textbox and image controls?

I looking single ajax calendar extender for multiple text boxes and (calendar) image controls? how can we do that? I found below good article on textboxes (not calendar images) controls. Please help me to get this with image controls also link text ...

Automate a click of javascript link and fetch the resulting page

Hi all, I searched a lot but could not find a solution for my question. It is quite simple as I think. I opened a web page by providing some parameters, such as id=123456. The searched result page then contains a link to something like javascript:doSomething('ABC','ID'=123456). What I would like to know, is whether there is a program,...

Question about this object literal....

What happens when returnThis.label is referenced? Can one give me an example of how this might be used? returnThis = { 'label' : aLabel ? this.value : false }; ...

Open Fancybox (or equiv) from form imput with a href

Hello all. Attempting to open a Fancybox once a form is submitted. I am also trying to do an ajax call to a php script ... don't exactly know where to put that in. Here is the code. If anyone has any ideas I would really appreciate it. As you can probably tell I have no idea what I am doing with AjaxForm. <!DOCTYPE html PUBLIC "-//W3C...

Mutual Exclusion for N Asynchronous Threads

I've got an asynchronous application, meaning that at any given time there can be N events. Is there a known algorithm for doing mutual exclusion for N threads, without hardcoding each thread to have an ID? ...

jQuery html response

Hello, Is it possible to determine if a response returned by $.ajax was served from the browser's cache or was fresh? Thanks. ...