I have several DIVs on a page.
Inside these DIVs I have several form-elements such as inputs and selects.
I also have two radio buttons.
I want whenever radio nr2 is clicked, to disable ALL OTHER ELEMENTS inside the active DIV.
Here is one of my DIVs and its content:
<div id="test">
<select name="cars_mile_to" id="cars_mile_to" sty...
Hey developers,
I am trying to create an image gallery, such as when you click an image in Getty Images
http://www.gettyimages.com/Search/Search.aspx?EventId=96396247&EditorialProduct=Sport
Image: http://tinypic.com/r/efffvs/6
I am just looking to get a next and previous for the gallery. Also that the details underneath are chang...
I'm trying to write a kind of wrapper for arbitrary Google Desktop gadgets where I will display some information about a given gadget. I need a way to display this info that will work for every gadget. The easiest way, I figure, is to have a window pop up which will display the information separately. Is there any way to do this?
All I...
The problem I'm having is not being able to select the divs inside the 'menuItem' class divs. I've tried using the jQuery selector to select by both class and even ID, but every time I try to do anything with it, such as an animation, nothing happens. Is there some jQuery law I don't know about that prevents me from doing so?
$('.menu')...
I can't get this to work. It refreshes the page as 'undefined' so I can't even troubleshoot with Firebug. Can anyone point out to me what part of this would be returning undefined?
var locations = {
'us-lax': {
'name': 'Los Angeles'
},
'us-nyc': {
'name': 'New York'
}
};
// this is the order in which they'll appear
var ...
Am I missing something here?
var someNumber = 123.456;
someNumber = someNumber.toFixed(2);
alert(typeof(someNumber));
//alerts string
Why does .toFixed() return a string?
...
On a text input, this is how you would "remember" the value the user entered if the form gets submitted to itself, for say a picture upload tool which requires that, so the user wont have to type everything into the form again after uploading a picture.
<input type="text" id="text" name="text" value="<?php echo @$_POST['text'];?>">
...
Hi all, first time poster here so I hope I am doing this correctly. I have been contracted by my church to redesign their website. (They've been dealing with a table layout for years.)
I am looking to display an RSS feed (with an audio file) on my website. I am unable to use PHP or any other server-side language, it has to be done in ...
text = 'ticket number #1234 and #8976 ';
r = /#(\d+)/g;
var match = r.exec(text);
log(match); // ["#1234", "1234"]
In the above case I would like to capture both 1234 and 8976. How do I do that. Also the sentence can have any number of '#' followed by integers. So the solution should not hard not be hard coded assuming that there wil...
I am using the following partial to render the editor for the Create and Edit pages:
PersonEditor.ascx
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<MyProj.ViewModels.PersonEditorViewModel>" %>
<script src="../../Scripts/MicrosoftAjax.js" type="text/javascript" />
<script src="../../Scripts/MicrosoftMvcValidation....
I'm writing a chrome extension that works with a website that uses iso-8859-1. Just to give some context what my extension does is making posting in the site's forums quicker by adding a more convenient post form. The value of the textarea where the message is written is then sent through an ajax call (using jQuery).
If the message cont...
So..
I am passing data to a function that handles strings and numbers differently.
I would LIKE to be able to pass an array of values and detect what the types of each value is.
row[0] = 23;
row[1] = "this is a string... look at it be a string!";
row[2] = true;
$.each(row, function(){
alert(typeof(this));
//alerts object
});
Is...
I am trying to change the value of the onblur attribute of a text input after the page has finished loading.
When I do the following, it simply fires the function:
ip.onblur = stopCalcUpInt(this,10);
When I do the following, I have success:
ip.onblur = function onblur(event){stopCalcUpInt(this,10);}
Unfortunately, the whole point of...
So I'm building a javascript library meant to be loaded by external domains. I'm looking for a good way to do auto-versioning for this. Ideally, the external domain should be able to just write " type="text/javascript"> and somehow have that version correctly.
The best solution I can think of is to have the point to a page, built usin...
I want to have users be able to enter data into a text box and instantly have that text appear in another div as content with a character limit on the input box.
Much like how SO does it when asking a question but for a different application.
I am using the YUI3 framework if that makes any difference.
Unfortunately I don't know wher...
I often see arguments between Classical (faked via some library), Pseudo-Classical and Prototypal Inheritance mention "efficiency." However, I've never seen any data backing any of this kind of stuff up. Not to mention "efficiency" seems like an ambiguous word when it comes to a coding style, rather than an algorithm.
I'd like to do som...
How can I dynamically create elements, like labels and such, using the google desktop API? Put differently, how can I duplicate the browser's:
document.createElement('br');
...
In javascript on a browser, I can do this to see if an object is DOM-related:
obj instanceof Node
How do I accomplish this with google desktop? Node is undefined, and this doesn't work either:
obj instanceof basicElement
...
Refer to the link below. I have a "dropdown" html element which has an event observer looking for mouseover. It's working, but it continuously fires mouseover events while you are mousing over the other elements inside it. I am guessing this is because of bubbling.
Is there a way to only make it fire the event on the initial mouseover? ...
Hi, I have many DIVs on my page with the same ID
eg:
<div id="myDiv1">
...
</div>
<div id="myDiv2">
...
</div>
<div id="myDiv3">
...
</div>
...
<div id="myDiv20">
...
</div>
...
As You see, the ID property looks almost the same - the only diffrence is that there is a number in each ID.
How to get the count of that DIV...