jquery

How do you use jquery to edit unordered list items

How can I edit the innerText property of a li inside a ul using jquery? I used this approach and wasn't able to get it working. $(document).ready(function() { var lis = $("#SuperTextbox1_Results li").get(); for (var i = 0; i < lis.length; i++) { lis[i].innerText = "<lable>added text!<label>"; ...

JQuery Validate multiple fields with one error

How would I use the JQuery Validate plugin to have one error message for say 3 fields. For example 3 dob fields. By default I will get 3 error messages if all 3 fields are left blank. I only want one error linked to 3 fields. If any are blank the error comes up. ...

AJAX constantly look for server update? Javascript

I have a situation where a display on a webpage needs to be updated at random. I am wanting to do this in AJAX but am not sure how to do this other than to do a while(true) { ajaxFunction(); sleep(1) } Type thing. The problem with this is that the webpage needs to be updated very quickly on a change to the server, but the changes co...

How to use jQuery UI Calendar/Date PIcker for week rather than day?

I've been using the jQuery UI Calendar / Date Picker with great success over the last couple months. I've been given a new requirement to allow for a week to be selected (Sun - Sat) rather than a single day. Has anyone accomplished this before? highlighting by week rather than day show beginning date and ending date rather than sing...

jQuery: Make a Button Visible When a TextBox Has Contents

Given: I have a textbox and a hidden button. Wanted: When the textbox is neither null nor empty, show the button. When the textbox is null or empty, hide the button. Question: How should I do this? Should I use jQuery and bind to the textbox's keyup event? ...

What is a good Google Maps Generator?

I am looking for a google maps API generator to save time? What do you recommend? Update: I want to generate (using my API key) a map of the US/WORLD and put markers are about 20 locations. Nothing crazy. I am looking for something similar to this http://schogini.us/ajax%5Fgoogle%5Fmap%5Fapi%5Fcode%5Fgenerator/ajax%5Fgoogle%5Fmap%5F...

How can I reload a page using jQuery from Greasemonkey?

I'm working on a Greasemonkey script that occasionally reloads a page and checks for updates. I'd like to be able to do a full-page reload without the side effect of having the page's title show "Loading..." each time. Here's what I have so far. The jQuery loading code is from http://joanpiedra.com/jquery/greasemonkey/ // Add jQuery ...

ASP.net - Using a jQuery datepicker in a custom control

I'm trying to use the jquery datepicker - http://jqueryui.com/demos/datepicker/ in a custom control (.ascx). To enable the datepicker, I need to add the following script at the top for an input: $("#dateinput").datepicker({}); The problem is, that the id of the element changes when the custom control is on a page. When the custom con...

how to change the value of a variable based on a select option:selected

Hi I have a select box and I'd like to change the value of variable based on the selected options. <form> <input type="hidden" value="PIONEER" /> <select name="select" id="select"> <option>Select Your Pizza</option> <option value="6.65">NY, 10&quot;, £6.65</option> <option valu...

jcarousel problems

Right now I'm building a website. Here's the link: http://theoew.uuuq.com/home/ This probably won't make much sense unless you look at the website so just scan the next paragraph and then go to the site and just watch the slideshow go through. I'm having a problem with the jcarousel slideshow. Let me first explain the basics of it. It ...

Blocked Background on lines within Paragraph Tag

I'm looking for a way to highlight (or fill in background) of lines of text within a paragraph. I am developing in wordpress if that matters. Here is an example code: <p> this is a line This is a line a little longer Just a short one a really really long one that is longer than any a medium sized one to end it</p> I want every line t...

jQuery $('form').serialize() returns only one element of a form serialized

Given the following form: <form id="form" name="form"> <input name="name"/> <input name="version"/> <input name="template"/> <textarea name="elements"></textarea> <textarea name="features"></textarea> <textarea name="layout"></textarea> <input type="submit" value="Save"/> </form> and javascript (using jQuery 1.3.2): $(function() { ...

jQuery - Ajax ToolTip, would like to pull URL instead of static image

Using code from this site this.screenshotPreview = function(){ /* CONFIG */ xOffset = 10; yOffset = 30; // these 2 variable determine popup's distance from the cursor // you might want to adjust to get the right result /* END CONFIG */ $("a.screenshot").hover(function(e){ this.t = this.title; ...

Convert String to XML Document in JavaScript

Saw this example on the jQuery examples page for Ajax: var xmlDocument = [create xml document]; $.ajax({ url: "page.php", processData: false, data: xmlDocument, success: someFunction }); How do I take a string like: var t = '<foo><bar>something</bar></foo>'; And convert that to a XML DOM object? cross-browser? UPDA...

jQuery Change picture on link click (matching with the same number in id)

Hi, I got a generated list of links where every link has an unique id(number) and a class called "load". I would like to change a picture on the other side of the page with the same number in the id as the link I clicked. Since id on elements are unique, i added folderid[number] infront of all the images This is what i have so far (no...

Is there a jQuery grid that even comes close to the ExtJs GridPanel in terms of looks and functionality?

I've taken a look at the jQuery grid recommendations made here but these don't seem to compare to the sleekness of the ExtJs GridPanel. Has anyone styled one of these implementations to make them appear a bit more like the ExtJs grid more or less? Or are there some other choices here that aren't captured in the link above? Thanks ...

update jquery validation plugin dateISO javascript

Right now...the dateISO method is as follows: dateISO: function(value, element) { return this.optional(element) || /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value); }, but ive noticed that when a user enters something like 1991-99-99 it sees it as a "valid date" when it obviously is not. How would i change this code to have it check i...

live counter with jquery

In my stats page, I show number of active members with the following asp code. <% SQL = "SELECT COUNT(MEMBERID) AS TOTALMEMBERS" SQL = SQL & " FROM MEMBERS" SQL = SQL & " WHERE ACTIVE = 1" Set objCountMembers = objConn.Execute(SQL) %> We currently have <%=objCountMembers("TOTALMEMBERS")%> members. At this website, http:/...

Is there a jquery plugin to show/hide divs based on their class(category) on click

I am working with a grid of small divs which have one of four classes and I would like to be able to fade classes in and out using an onclick event. For example if there are 10 divs and three are categorized as "class1"; upon clicking a link in a menu all BUT the class1 divs fade to completely hidden or barely visible. Similarly the othe...

How does crossdomain data access work?

I'm using JQuery to make a JSON request to access data on a private server. I've noticed however that I get this message when attempting to access the data: Security Error: Content at xxxxxxx may not load data from xxxxxxx. Looking at the JQuery reference I see it's accessing: http://api.flickr.com/services/feeds/photos%5Fpublic....