jquery

Problems with looping in jQuery...

Well, heres what I mean. Go to site. Where it says latest news, there are some problems. What i'm trying to do is: Load site, see the loading bar.(image is in the HTML) The loading bar goes away, theres one paragraph that fades in. That is what this is for. // Hides the loading image and fadesin content var $latest = $(".latest")...

how do i find the length of options in a combo box

hi guys How can i know is there any options in a combobox/selectbox or not? small Edit: i have my comboxbox as myCombo = $("#country"); now i want to know how many options are there in myCombo ...

Force ajax call to clear cache

I have a cms in which I can change positions of objects. After each position change ajax call updates the whole list of objects. But unfortunately some data is stored in cache and no changes are visible. Is there a way to force clearing cache with javascript/request/other ? I've tried 'cache: false' in $.ajax but it's not working. Here'...

jQuery RegEx Problems

Possible Duplicate: jQuery find/replace without changing original text I have the following RegEx but I am getting a JS error RegEx: $("#construct_version").html( new RegExp("(" + selection + ")", "g"), $("$1").wrap(childElements[child])); JS Error: Uncaught Syntax error, unrecognized expression: $1 This questions ...

showing context menu in contentEditable div

I have a contentEditable div with following text for example: <div contentEditable='true'> This document is classified</div> Now for example if user clicks on 'm' in word document I want to show a context menu containing few text choices. That context menu will be contained in a div element. I want to replace the word "document" with ...

Parsing SQL CREATE TABLE statement using jQuery?

I am writing a web app which uses SQL as input. This SQL must always be a CREATE TABLE statement, and what my app needs to do is getting the following attributes from it: Field name Type Length (if available) Binary (if available) Allow NULL (if available) Auto increment (if available) Example SQL: CREATE TABLE customer (First_Name ...

jQuery .live() function not working in Google Chrome extensions

Functions added to selectors using .live() are not working consistently in Google chrome extensions. For example, I have a simple function that looks like this: $("#sampleSelectID").live('click', function() { alert("CLICKED!"); }); and the alert does not fire. If I debug the extension there are no javaScript errors. Strangely, ...

Why is my script failing intermittently?

I have this jQuery plugin called Easy Slider which I'm implementing on this site which displays featured content in animated slide format. If you visit the site, you'll see there's a basic implementation on the home page, and a little more tweaked version on the Rods page. On the Rods page it's just that I'm using 11 instances of the ac...

Ajax request to same page

This question may seem completely stupid, but say i have a PHP page with some form processing at the top in php and a html form underneath with the action of submitting to same page and method of post. How do i get the result via ajax, ie. send form to self without refreshing the page, if that makes sense? Thanks ...

ajax POST not working, can't figure why

I have a simple AJAX function to send an id of an object to a php page My function looks like this: $(function(){ $("a.vote").click(function(){ //get the id the_id = $(this).attr('id'); alert(the_id); //ajax post $.ajax({ type: "POST", data: "?id="+the_id, ...

jquery find div attribute smaller or higher

i want to find all div attributed value matched smaller or higher numeric value. its worked me only eq value=444 (example div[ref=444],[ref=333]....) var $filteredData = $data.find('div[ref=444]' ); but i want to compare find <444 ( find div attribute value smaller <444) or >444 (find div attribute value higher >444) in all div attri...

memory usage and leaks with repeated ajax calls

I have the following Ajax call which send form data to a page and finds specific response. $.ajax({ url: $("form[name='MainForm']").attr('action'), data: $("form[name='MainForm']").serialize()+'&btnupdateprice.x=0&btnupdateprice.y=0', type: 'POST', cache: false, success: function(response) { errors = $(respo...

Strange inline styles coming from where?

I have a script, which has been causing me quite some issue today. :-) The script is apparently placing inline styles on the target element, but I can't find where they are defined. So the script is a slider called EasySlider. It works quite nicely to display featured content in a slide fashion. However, the script is putting an inline ...

focus to the next input in datatable with jquery

hi guys, I would like to make a focus to the next input in a table with jquery. I have this table in jsf. <p:dataTable id="resu" value="#{onController.items}" var="item" > <p:column id="colIn" > <h:inputText id="i" value="#{item.cup}" /> <p:column> <p:dataTable> was tested with this: function nexts(input) { $(in...

Autofill Address + Google Maps API

I want to present my users with a text box wherein they can type in their address. As they type their address, I want to provide the users with suggestions/predictions of what address they are trying to type. I'm also concerned about the relevance of this address (e.g. that the address is not an address halfway across the world). Is thi...

Store a clicked link state using jQuery?

$('#nav a').click(function () { $('#nav a').removeClass('current'); $(this).addClass('current'); return false; }); My HTML is: <ul id="nav"> <li><a class="current hoc" href="#spread1-anchor">Home</a> /</li> <li><a class="bgc" href="#spread2-anchor">Background</a> /</li> <li><a class="apc" href="#spread3-anchor">App...

Javascript - Load an image onclick

OK, I'm actually calling some java middleware that returns a captcha image. The captcha image loads in the page on page load simply with: <a href="#" id="ci"><img id="stickyImg" src="stickyImg" /></a> I want to reload the captcha image onclick of the current captcha image. I've tried a few things but am not getting anything working. ...

The simplest way to allow a web user to update a text file using PHP and Javascript?

Problem: I dont know the simplest way to allow a single web viewer to update data in a text file on a server. (ie. only 1 person will be changing the data.) Objective: To make a prototype web application just one person needs to input in the start and end dates of new assignments and locations of staff and the whole company can visual...

JQuery - Duplicate Field Input Text In Real Time

Hello, I'm trying to figure out how to copy a users text input in one form field to another. Specifically, when someone fills in their email address in the contact form, it will be duplicated in the mailing list form. Both these forms are using ajax so there's no concerns about the input text being lost on submit. This is the code I h...

Don't show if it is empty, how to do with Javascript or jQuery

I am very new to Javascript and jQuery. I managed to make a dialog box with jQuery, it is giving a warning before submitting. The problem is I don't want to show the label and field on the warning page if it is empty. I can't do this with PHP because form is not submitted. I need to do with jQuery or Javascript. <script type="text/jav...