javascript

Removing Numbers from a String using Javascript

Hello all, How do I remove numbers from a string using Javascript? I am not very good with regex at all but I think I can use with replace to achieve the above? It would actually be great if there was something JQuery offered already to do this? //Something Like this?? var string = 'All23'; string.replace('REGEX', ''); I appreciat...

Update one list from another

I have two multi-select lists in HTML - one of categories, and another of items. What I want is that, when an item selected in the "category" list, everything in the "items" list from that category is also selected. For example, if "Categories" contains "Animal", "Mineral", and "Vegetable", and "Items" contains "Dog", "Cat", "Monkey", ...

get all elements with onclick in them?

hey all - looking for a way to list all onclick's on a page,or elements that contain an onclick. Please help!! ...

Zoomable AND clickable irregular-shape image map with javascript?

Hi, I would like to create a zoomable image map containing irregular shapes upon which you can click to go to their link (actually different countries in a simple map of the world). I have found a few examples of zoomable images using javascript and/or jQuery, and a few examples of irregular-shape image maps, but nothing that does both ...

Hit detection on non-transparent pixel

Given a PNG in a web context with some transparent pixels and some non-transparent pixels, is there a way in Javascript to determine if a user has clicked on a non-transparent pixel? A webkit-only solution would be perfectly acceptable. ...

Jquery automatic loading gif and button disable on submit click

Is it possible to automate the showing/hiding of a ajax loading gif, and the disabling/enabling of the submit button at the same time? (when the submit button is a styled < a > not a input type=submit) Currently when submitting I do this: $("#save_button_id").click(function () { if ($('#save_button_id').hasClass('ui-state-disab...

Can a Google Search Appliance / Mini output JSON/JSONP?

Using Google Mini for a website that needs output from the Google Mini in a JSON/JSONP format for front-end querying purposes. Google Mini does publish an XML feed that could potentially be used by a middle process to convert to JSON/JSONP. Can Google Search Appliance / Mini output to JSON/JSONP using a plug-in, modification to an XSLT ...

Split string once in javascript?

How can I split a string only once, i.e. make 1|Ceci n'est pas une pipe: | Oui parse to: ["1", "Ceci n'est pas une pipe: | Oui"]? The limit in split doesn't seem to help... ...

jQuery: How to check if a value exists in an array?

Hello, I am trying to write a simple input field validation plugin at the moment (more of a learning exercise really) and thought this would not be too hard, seeing as all I should have to do is: Get input fields Store them in array with each one's value On submit of form check if array contains any empty strings But I seem to fail ...

fire link onclick events and follow href from javascript

I have a page defining a link ('a' tag) and some onclick events associated with it. I am trying to add an arbitrary HTML element (in this case a div) with the ability to respond to click events by firing the click events of the link. The code below describes all that. The end goal is to trigger exactly the same actions whether the cli...

is there any free Jquery IDE or online tool?

Possible Duplicate: Good JavaScript IDE with JQuery support ? is there any free Jquery IDE or online tool? to write and test jquery easily and visually. With jquery 1.4 intellisense and WYSIWYG. ...

Scroll Position on web with google map and ajax rating

my website is composed of google map and ajax rating component. everytime I vote any sections, the page will be refreshed and start at the top of the website without maintainig the current scroll position that I click 'vote'. What should I do ? I tried remove the tag which make scroll position effective. However, my website should ha...

JavaScript: capture key press without placing an input element on the page?

How to capture key press, e.g., Ctrl+Z, without placing an input element on the page in JavaScript? Seems that in IE, keypress and keyup events can only be bound to input elements (input boxes, textareas, etc) ...

Can I dynamically add content to a frame?

I have a frame and I want to dynamically add content to it with javascript or jquery but I can't do something like $('#myframe').html() like I could for a DIV. Is this possible? ...

Good code highlighting, syntax analysis and code assist editor on js.erb and css.erb files

I want to know if there is an api that supports nicely eRuby (erb) and JavaScript highlighting, sintax analysis and code assist. I've already tried Eclipse with Aptana RadRails. Perhaps I'm configuring something wrong, but it guesses that I'm using html.erb on both css.erb and js.erb files. Tried in both windows and linux (Fedora 12). ...

Can i connect Redis directly in Javascript?

ditto, i take a tour of Node.js, another way? ...

Javascript event execution order

What is the execution order of inline events, attachEvent handlers, and an <a> tag's href navigation? ...

jQuery::Ajax success never occurs

I have an ajax call in the head section of my index.html $(function() { alert("Hello, World!"); $.ajax({ method: 'get', url : 'php/getRecord.php?color=red', dataType: "json", success: function (data) { alert(data); } }); }); For some reason, that alert(data) never gets called but the "Hello, World...

How to make div clickable?

I want to make this div click-able and want to use same href of inside <a> and want to keep link in inside <a> also (so if JS is disabled then link will be accessible). <div id="example"> <p> some text </p> <img src="example.jpg /> <a href="http://stackoverflow.com"&gt; link </link> </div> I mean i need like this. <div id="exampl...

Extjs - Dynamically generate fields in a FormPanel

Hi all, I've got a script that generates a form panel: var form = new Ext.FormPanel({ id: 'form-exploit-zombie-'+zombie_ip, formId: 'form-exploit-zombie-'+zombie_ip, border: false, labelWidth: 75, formBind: true, defaultType: 'textfield', url: '/ui/modules/exploit/new', autoHeight: true, buttons:[{ text: 'Execute exploit', hand...