[jQuery] Failure event with jquery and form plug-in

2009-12-23 Thread James Calfee
The form plug-in documentation does not show a failure event. Can this be done? I'm reading it is in AJAX, so is this supported in the form plug-in too?

[jQuery] TextArea formatting

2009-12-07 Thread James W
essage: Message,rand:Math.random() }, function(datanew) {$('#Contact').hide();$ ('#contact_success').empty();$('#contact_success').append(datanew);$ ('#contact_success').fadeIn(); }); return false; } }); }); Any ideas would be most welcome! Thanks James

[jQuery] Re: Tips and tricks for fixing memory leaks

2009-12-07 Thread James Gibson
issue but I am not going to complain. Can anyone explain how this (combining, minifying and obfuscating) helps some memory issues? Thanks, James On Dec 7, 11:29 am, Michael Geary wrote: > Minifying your code and removing unused code are good ways to reduce your > initial memory footprin

[jQuery] Re: Tips and tricks for fixing memory leaks

2009-12-07 Thread James Gibson
Hey Guys, Thanks for the replies. I am using YUI to minify and obfuscate all of my javascript and css in our production environment. I will use these tips and see what i come up with. Thanks again, James On Dec 7, 10:48 am, Olivier Percebois-Garve wrote: > Is it a leak or a pseudo-l

[jQuery] Tips and tricks for fixing memory leaks

2009-12-06 Thread James Gibson
I am using about 25 jquery plugins along with 1.3.2 and jquery ui 1.7. After using my app for a while firefox starts eating up memory and it can get up to 500MB and more. What tips and tricks to you guys find help eleminate memory leaks in your code? Thanks, James

[jQuery] Re: jQuery not obeying my css? or applying its own during effect?

2009-11-13 Thread James Fleeting
Thanks, that sure did fix it. Never hit me to put relative on it. On Nov 12, 3:42 pm, Andrei Eftimie wrote: > Congrats on having courage to go with HTML 5. > > Add *position: relative;* to your *aside* element. And it should be fixed. > > On Thu, Nov 12, 2009 at 4:57 PM,

[jQuery] jQuery not obeying my css? or applying its own during effect?

2009-11-12 Thread James Fleeting
I have some image/text animation here http://www.smithsgardentown.com/ The big promo below the nav fades in and out. However, during the effect it appears on top of my sidebar div and after the effect I guess applies my css and drops behind it. I would like for the entire effect to take place behin

[jQuery] [Treeview] Manually toggling a node

2009-11-09 Thread James
I've been working with Jörn Zaefferer's treeview control, and overall have found it great. But I am having problem, not as much with dynamically adding items, but getting them to properly display once they are added. My treeview is something like this: Level 1 Item (open) Level 2 Item (open)

[jQuery] Re: changing a select

2009-11-03 Thread James
Try this: var $select = $("select#foo"), firstVal = $select.find('option:first').val(); $select.val(firstVal).change(); On Nov 3, 7:43 am, Mark Volkmann wrote: > I need to programmatically change the option that is selected within a select. > I have code registered to run when this occurs, w

[jQuery] Re: jQuery form Validation plugin with JSP

2009-11-03 Thread James
The value you return should be simply just "true" or "false". No HTML or other stuff. Not: Remote Email Validator true or: Remote Email Validator false Just: true or: false Notice the difference? :) On Nov 2, 1:10 pm, Felix wrote: > I have a static html page for testi

[jQuery] Re: AJAX POST causing 500 unimplemented method

2009-11-03 Thread James
What is the URL of the serviceUrl? Make sure that whatever resource it's going to it supports the POST verb. For example, if you POST to a .html resource, some servers will not accept it by default. You'd have to configure your server to allow it. On Nov 3, 1:53 pm, some_random_kid wrote: > I am

[jQuery] Re: Jquery Cookies Or Sessions

2009-11-02 Thread James
You can't really check whether a local cookie is expired or not. However, you can probably check the value of the cookie and see whether it's a valid value. For example, the user visits a page. It creates a simple local session cookie named "sess" with value "true", and 1 hour expiration date. Java

[jQuery] Re: jquery ajax and listening for users exiting the site

2009-11-02 Thread James
Is http://myWebsite.com the same domain that your beforeunload code is called on? If not, then it won't work because of cross-domain policies for AJAX (XMLHttpRequest object). If so, try removing the full URL so that it's a relative path, e.g. "/ usersessions/store" Also, make sure that: this.

[jQuery] Re: Issue when caching jquery objects

2009-11-02 Thread James
Does: $myCachedSelector.removeAttr('disabled'); work as expected? On Nov 1, 11:42 pm, north wrote: > Hi, > > I usually cache jquery objects in variables or a config object. > > Lately I ran into a strange issue with that when trying to do this: > > $myCachedSelector.attr('disabled', false);

[jQuery] Re: Simple question. my query isnt working

2009-10-30 Thread James
You need the document ready code. http://docs.jquery.com/Tutorials:How_jQuery_Works#Launching_Code_on_Document_Ready Otherwise your Javascript just executes the code without the tag being loaded at all, thus nothing happens.. On Oct 30, 4:44 pm, numerical25 wrote: > I just started on a book and

[jQuery] Re: Click not running on IE

2009-10-30 Thread James
What value is in "r"? Does it have something like a # or . that makes it a valid selector? For example, in your code below: var blocco = r + " div.pul"; $(blocco).each(function (i) blocco may become 'testdiv.pul' $(blocco), will become $('testdiv.pul'), which does nothing because there's no elem

[jQuery] Re: problem in setting min max time

2009-10-30 Thread James
I have no idea what you're trying to explain. Could you post some code or page demonstration what you want to do and what is happening? On Oct 29, 8:56 pm, mith wrote: > i am having prblem with setting min and max time limits > if my min limit is grater than max limit,limit is getting set,but whe

[jQuery] Re: Using variable combination as selector

2009-10-30 Thread James
Do you mean whose "parent's ID" is thisState? If so, you can do this: // store list of elements $list = $('#'+thisState).children('.placemark'); This will get the immediate children of the parent. Otherwise, if you want to get all decedents, use .find() instead of .children(). // act on the list.

[jQuery] Re: input file type get name

2009-10-30 Thread James
The .val() should work. I've tried it and it works on FF3.5, IE6+, Safari and Chrome (all WinXP). The only differences I found is that FF, Safari, Chrome returns just the filename, whereas IE6+7 returns the full path of the user file (privacy issue), and IE8 uses 'C:\fakepath' as the directory (mis

[jQuery] Re: Cancel form submission "by outside"

2009-10-30 Thread James
I've never tried this before but did a search on it and found this thread: http://codingforums.com/showthread.php?t=85775 Specifically: window.document.execCommand('Stop'); and: window.stop(); Try it out and let us know if it works or not. :) Just curious, what are you using it for if you

[jQuery] Re: keyup on textfields

2009-10-30 Thread James
There are a few simple ways to do this. Here are probably the most common: You can assign all the relevant textfields with the same class name: $(".specialFields").keyup(...); Or you can list all the IDs in the selector: $("#id_emp, #id_bol, #ema_pes, #nom_emp").keyup(...); On Oct 30, 7:12 a

[jQuery] Re: jQuery minified

2009-10-29 Thread James
The minified version is the exact same as the "complete". It's just that a lot of the unnecessary things in the code has been removed (e.g. line breaks, spaces, shorten variable names, etc.) that massively reduces the size of the file but achieve the exact same functionality. If you look at the sou

[jQuery] Re: load() not loading

2009-10-29 Thread James
You can't access resources from other domains with AJAX. Cross-domain policies. The best way to do that is to create a proxy that your AJAX accesses to get that remote content. For example, your AJAX loads a PHP page on your domain that scrapes the remote page's HTML and return it back to your AJAX

[jQuery] Re: (validate) form field validation with field id doesn't work.

2009-10-29 Thread James
If you change the name of your field, you'd have to change your rules in the validation options from "firstname" to "firstname1" also. On Oct 29, 10:34 am, Monika wrote: > Hi : >   I am trying to use jquery validatro plugin and used tried demo on > the live site.  Just looking if I can use this f

[jQuery] Re: - Issue with DOCTYPE?

2009-10-28 Thread James
What is the returned data for your autocomplete? Use Firebug to debug the returned AJAX response. It should not contain DOCTYPES or HTML content in it. Simply, it should be just a list of items separated by a line break. USA CANADA UNITED KINGDOM CHINA JAPAN No HTML or any other things. If you're

[jQuery] Re: Validation

2009-10-27 Thread James
Read this documentation page on try to achieve what you want: http://docs.jquery.com/Plugins/Validation/Methods/remote On Oct 27, 1:08 pm, Ryan wrote: > I have seriously been fighting this issue for hours.  I would > appreciate some advice when someone gets a chance. > > I am wanting to check my

[jQuery] Re: $.post(), php file in parent directory?

2009-10-27 Thread James
Yes. // parent directory $.post('../file.php'); // folder in parent directory $.post('../dir/file.php'); // folder in grandparent directory $.post('../../folder/file.php'); // child directory $.post('child/file.php'); $.post('./child/file.php'); // base directory $.post('/file.php'); // curr

[jQuery] Re: jquery disturbing the others javascript ...

2009-10-23 Thread James
A jQuery plug-in should not have the jQuery in its code... if so, it's not doing it right. Is it possible to just remove the jQuery library portion of it and have it function as expected? What is this plug-in if you don't mind telling us? On Oct 23, 1:47 pm, bgolfy wrote: > Hi everybody, > > I'm

[jQuery] Re: return values

2009-10-23 Thread James
$.each(data.feed.entry, function(i, entry){ var postlink = []; // empty array $.each(entry.link, function(j, link){ if(link.rel == "self"){ // add to array postlink.push(link.href); } }); alert(postlink.join(', ')); }); On

[jQuery] Re: how to set array value????

2009-10-23 Thread James
Which server-side programming language are you using? On Oct 23, 6:22 am, jacob wrote: > hello? > > Today, I have met something odd experience during developing web > application based on Ruby on Rails and Jquery. > > When I set some value by next code, > jQuery('#branch_address').val(address_va

[jQuery] Re: jQuery.get does not return proper JSON

2009-10-21 Thread James
try this: $data = array('votes_for'=>7, 'votes_against'=>4); echo json_encode($data); exit; On Oct 19, 5:31 am, Maarten wrote: > Hi, > > I am using jQuery.get to make an AJAX request to the server which > should return a JSON object, but it is interpretated by jQuery as a > string, not an objec

[jQuery] Re: Can I access/change a variable in a plugin?

2009-10-21 Thread James
Try giving this article a read about plugin development pattern: http://www.learningjquery.com/2007/10/a-plugin-development-pattern That should answer your questions. On Oct 21, 10:46 am, Joel Taylor wrote: > Thanks for replying James. > > I'm still having some issues. Is there a

[jQuery] Re: $("option:selected", this).first(function(){})

2009-10-21 Thread James
It's unclear what you want to do. Do you want the value of the first "selected" option? And by adding "first", does that mean your drop-down is a multi-select dropdown (allows for selecting more than one option)? Please clarify. If for selected values, you can use: $("#selectBoxID").val(); (If it

[jQuery] Re: Callback not firing

2009-10-21 Thread James
You said "I get the log entry in the console". You have two in there. Which one? Both? If you get the log entry "Show Testimonial Fired"? If so, then it did fire. It's something else that didn't work as expected, but perhaps made you to believe the callback did not fire. On Oct 21, 5:04 am, Sir R

[jQuery] Re: Can I access/change a variable in a plugin?

2009-10-21 Thread James
Not with the way your code is currently structured. You'd have to move the settings variable outside of your function. Something set to like: $.fn.plugin.settings = { ... } On Oct 21, 7:28 am, Joel Taylor wrote: > Hi, so, I have a pretty basic plugin, and I'm trying to access a > variable that'

[jQuery] Re: hide browser toolbars using jQuery

2009-10-21 Thread James
Not possible. On Oct 21, 9:02 am, Subtle wrote: > Using window.open I can achieve this, however, from what I understand > window.open is normally used for popups.  What I want is the first > time the user opens their browser and points to my site, they should > see my site with no toolbars.  Is

[jQuery] Re: Browser refresh

2009-10-21 Thread James
Try the onbeforeunload event: http://www.hunlock.com/blogs/Mastering_The_Back_Button_With_Javascript This will execute before the user's request is actually sent, giving them the option to cancel the request. As mentioned, you can't really specifically listen for a refresh, only "the leaving the

[jQuery] Re: Add value to Link. How can I do this?

2009-10-16 Thread James
$(".Download").click(function() { pageTracker._trackPageview('/downloads/map'); }); On Oct 16, 11:51 am, shapper wrote: > Hello, > > I have the following anchor: > http://www.example.com/files/map.pdf"; onClick="javascript: > pageTracker._trackPageview('/downloads/map'); "> > > How can I add

[jQuery] Re: How to skip validation on fields which are hidden

2009-10-16 Thread James
I would think something similar to this (untested): myFieldName: { required: function() { return !$(this).is(':hidden'); } } Not sure if $(this) actually references the field. Might want to test that out. On Oct 16, 10:18 am, buntu wrote: > Hi, > > I've an input field in the fo

[jQuery] Re: Show images with delay...

2009-10-15 Thread James
You use setInterval in Javascript to execute a callback function every so milliseconds: window.setInterval(doSomething, 1000); // 1000ms = 1sec function doSomething() { // code to change images } On Oct 15, 11:25 am, -e-train wrote: > All - > > How would i get the following effect. > > load

[jQuery] Re: Locking submit button interferes with validation plugin

2009-10-15 Thread James
ubmitBtn").attr('disabled','disabled'); // put loading animation code here // submit is done automatically, no action needed return true; } }); On Oct 15, 10:48 am, Opally wrote: > thanks for the reply James! > > I'm

[jQuery] Re: Problems with load() in IIS?

2009-10-15 Thread James
why this issue seems so strange. > > On Oct 12, 7:45 pm, James wrote: > > > Sorry, I meant VERB, not VERY: > > > GET (and maybe POST) VERB > > > On Oct 12, 3:42 pm, James wrote: > > > > It sounds like a server setup issue. What is the file type/extensi

[jQuery] Re: Callback for selected match

2009-10-14 Thread James
I'm not sure what you are talking about. Are you talking about a specific jQuery plug-in? Or a HTML select drop-down? If you're talking about a HTML select, then an onchange event will do what you want. $("select").change(function() { alert( $(this).val() ); }); On Oct 14, 10:24 am, eka wr

[jQuery] Re: jQuery speed seems slow

2009-10-14 Thread James
Unless your DOM tree is huge and you're trying to select something massive in one go, the performance difference between a simple jQuery ID selector (e.g. $("#myID")) vs. a native getElementById selector should be very negligible, because jQuery uses that same native selector. You should demonstr

[jQuery] Re: Prevent Select from opening.

2009-10-14 Thread James
This seems to work in FF3.5 and IE6: $("#trade").focus(function() { this.blur(); window.focus(); }); IE6 doesn't support blur on select, so the window.focus() seems to make it work. Haven't tried other browsers. Another option is to just disable t

[jQuery] Re: Iterate through elements of a given class and multiply

2009-10-14 Thread James
Oh, another method is to store the default values as a Javascript array/object with a matching ID of the DIV. For example: var defaults = { 'div1': 100, 'div2': 200 } 100 200 alert( defaults['div1'] ); // alerts '100' On Oct 14, 8:29 am, Avik Basu wrote: > Thanks for your help--using .text

[jQuery] Re: Iterate through elements of a given class and multiply

2009-10-14 Thread James
You can store the original inside the element as an attribute. There are several ways you can do this. Here are the popular methods: One method is using the jQuery data() function: http://docs.jquery.com/Core/data However, this would require you to add the data via Javascript, which maybe not wh

[jQuery] Re: Bassistance validation plugin issue

2009-10-13 Thread James
Could you post some code or a test page demonstrating this issue? On Oct 13, 6:23 am, Edgar Méndez. wrote: > ... the another error I get is : > > object required jquery.validate.js line 890 > > sorry for the double post

[jQuery] Re: [validate] Locking submit button interferes with validation plugin

2009-10-13 Thread James
Maybe something like this: $("#myForm").bind("submit", function() { $(this).validate(validation_options); var valid = $(this).valid(); if (valid) { // lock form, show loading animation, do submit } // you don't really need an 'else' here.

[jQuery] Re: ie6 and .val() issue

2009-10-13 Thread James
uot;#selectbox").val("value"); > > On Oct 13, 5:36 pm, James wrote: > > > The line is: > > > $(document).ready(function(){ > > > On Oct 13, 2:08 pm, Daniel Murker wrote: > > > > I've come across an issue where doing something al

[jQuery] Re: ie6 and .val() issue

2009-10-13 Thread James
The line is: $(document).ready(function(){ On Oct 13, 2:08 pm, Daniel Murker wrote: > I've come across an issue where doing something along the lines of > > $().ready(function(){ >      $("#selectbox").val("value"); > > }); > > Throws the following error in IE6 > > Could not set the Selected Pr

[jQuery] Re: What causes a query string when request ing jQuery? e.g. /jquery-1.3.2.min.js?_=12553…

2009-10-13 Thread James
I don't know ASP.NET MVC, but just make sure, you're sure that it's not added by the MVC, right (thus, not visible in the page source)? As mentioned, post a test page. On Oct 13, 10:57 am, Michael Geary wrote: > Bob, there's something you're not telling us, and that something is in the > test p

[jQuery] Re: Iterate through elements of a given class and multiply

2009-10-13 Thread James
If it's a div, val() will not get you anything. Use text(). $("#factor").change(function() { var val = this.value; // value of select $(".num").each(function() { $(this).text( parseInt($(this).text()) * parseInt(val) ); }); }); On Oct 13, 10:07 am, Avik Basu wrote: > I woul

[jQuery] Re: What is the more correct/efficient selector?

2009-10-13 Thread James
val() was built to have several advantages over attr("value") for form fields. For example, if your select element was one that allows you to select multiple options, using: attr("value") (or just the basic 'value' attribute for that matter) it will only get the first selected value. You'd

[jQuery] Re: Adding selectors to $(this)?

2009-10-13 Thread James
The jquery selector has a second parameter 'context': http://docs.jquery.com/Core/jQuery#expressioncontext such that if defined it will only select what's a descendant of that element. You can also use find(): http://docs.jquery.com/Traversing/find#expr By the way, what is ui.item? An object? (C

[jQuery] Re: AJAX & callbacks: load(); $.get() and $.post() do not

2009-10-13 Thread James
Could you define "does not work"? Does the request get sent at all? Without much information it's hard to help. What's in the variable 'parameters' and 'register_submitCallback'? On Oct 13, 3:22 am, alexryan wrote: > $.get() and $.post() functions work for me *except* when I supply a > callback

[jQuery] Re: Code not working on IE7 (Please Help)

2009-10-13 Thread James
Try: $.each(cities, function(data) { alert( data['City'] ); //alert( data.City ); }); On Oct 13, 6:51 am, vipin wrote: > Hi all, > This code is not working on IE7 but it working fine on firefox. > give me some advice > > $.getJSON('LoadCities.ashx?StateID=' + StateID, function(cities) {

[jQuery] Re: Call function in load

2009-10-12 Thread James
$(".someImage").load(doSomething); On Oct 12, 4:26 pm, expresso wrote: > Did I do this right?  I can't test right now but I think this should > work: > > function doSomething() >         { >                 ... >         } > >  (".someImage").load(doSomething()) ; > > I want to fire off doSometh

[jQuery] Re: Problems with load() in IIS?

2009-10-12 Thread James
Sorry, I meant VERB, not VERY: GET (and maybe POST) VERB On Oct 12, 3:42 pm, James wrote: > It sounds like a server setup issue. What is the file type/extension > of the file that you're trying to load()? You have to set up the > server so that the GET (and maybe POST) VERY is al

[jQuery] Re: Problems with load() in IIS?

2009-10-12 Thread James
It sounds like a server setup issue. What is the file type/extension of the file that you're trying to load()? You have to set up the server so that the GET (and maybe POST) VERY is allowed for that file type. On Oct 12, 12:53 pm, Scogle wrote: > I'm working on a project that uses the load() fun

[jQuery] Re: Unable to download jquery

2009-10-12 Thread James
Where are you downloading your jQuery file? You should go to jquery.com, click on the large Download( jQuery ); button, which will take you to the Google Code site, and click on another link. Where is the problem occuring? Also, Firefox shouldn't be triggering a Microsoft JScript runtime error. W

[jQuery] Re: About load function

2009-10-12 Thread James
It should be immediate. Please show us some of your code on how you're doing this. On Oct 12, 5:54 am, "nabil.tn" wrote: > Hi, > > When i use a load call to get some HTML content from a remote page, > the result display in the destination DIV is not immediate, but i have > to call it again to se

[jQuery] Re: possible to empty file input in form with .click or .focus ?

2009-10-12 Thread James
Yes, it is a security thing. Otherwise malicious developers would be adding paths to user's existing files and be able to silently upload user's files without their knowledge. On Oct 12, 11:33 am, captaincarp wrote: > Sounds like a good idea - i'll give it a try in the morning and let you know >

[jQuery] Ajax Request Order

2009-10-10 Thread James W
pend (datanew);}) $.get('order_total.asp?TBL=' + tbl, function(datanew){$('#pos-header- total').empty();$('#pos-header-total').append(datanew);}) } Thanks James

[jQuery] Re: XMLHttpRequest in jQuery

2009-10-09 Thread James
Is https://ondemand.abc.com the same domain of the website that your Javascript is calling from? If not, then it won't work due to cross-domain restriction policies. On Oct 9, 12:22 pm, Nits wrote: > I just did this with following code: > > $(document).ready(function(){ >             $("a").clic

[jQuery] Re: Remove content of div if on /login.php?action=logout page

2009-10-09 Thread James
It can be done, but why not just do it server-side if you can? It's more reliable. To do it in Javascript, you'd have to get the query string data from the URL and act on it. There are no native Javascript functions for directly fetching a part of the query string, so you'd have to make one (thus

[jQuery] Re: problem with multi-upload

2009-10-09 Thread James
In your includes, you have a jquery-latest.js and a jquery.js. Are they both the jQuery library? Including two copies of the jQuery libraries may cause issues. On Oct 8, 5:05 pm, RAM wrote: > I have the following lines on my main HTML page: > > language="javascript"> > language="javascript"> >

[jQuery] Re: Hide/Show if logged in

2009-10-08 Thread James
I'm not sure if this is a trick question or not... // if logging out $("#LoggedIn").hide(); $("#LoggedOut").show(); On Oct 8, 4:19 pm, Painstik wrote: > Hi everyone, I can't get this out, i searched everywhere and didn't > find solution... > > > >     method="post" id="signin" on

[jQuery] Re: Passing jQuery object to a function

2009-10-08 Thread James
Try: setTimeout(function() { playGlobalNewsFn(tabLink); return false; }, timeLag); On Oct 8, 8:47 am, vmrao wrote: > I have the following code. I am getting an error in the setTimeout > function, "tabLink" is undefined. Not sure what am I doing wrong. > > function playGlobalNewsFn(obj)

[jQuery] Re: Attribute Selectors

2009-10-08 Thread James
var tabId = $("#tabPanel2 ul li a[onclick*="+newsCookie+"]").attr ('id'); Whether the actual selector works or not, I'm not sure. On Oct 8, 11:38 am, vmrao wrote: > I have the following code. > > var newsCookie = readCookie('newsTabCk'); > var tabId = $("#tabPanel2 ul li a[onclick*=newsCookie]"

[jQuery] Re: Split Form field into array

2009-10-08 Thread James
No problem. :) For the blank, you can change it like this: partNum[i] = escape( parts[0] || 'Unspecified' ); qty[i] = escape( parts[1] || 1 ); Then it'll use 'Unspecified' or 1, respectively, if they're blank. On Oct 8, 6:09 am, "robert...@gmail.c

[jQuery] Re: jquery ajax question?

2009-10-07 Thread James
> $this->input->post('active') Is "active" the right variable? Or did you use "article" like I put in to my example? This is a jQuery group meant for jQuery questions, so I'm trying to help on the jQuery part, mainly. Try using Firebug for Firefox to debug the AJAX request, and determine whether t

[jQuery] Re: jquery ajax question?

2009-10-07 Thread James
$(active).serialize() will not do anything to a text element, only input elements. You'd probably want to change your ajax data option to something like: data: { article:active } where "article" will become your field name in your script. "active" is your Javascript variable (var active = $(this

[jQuery] Re: Split Form field into array

2009-10-07 Thread James
plit(' '); >       alert(values); >     }); > >  }); > > }); > > On Oct 6, 8:34 pm, James wrote: > > > It should be fairly straightforward. > > Get the content of the text field: $("PartNum").val(); > > Use the split() function to split

[jQuery] Re: jQuery.post on page load?

2009-10-06 Thread James
The syntax for post()'s second parameter (data) should be serialized or key/data JSON pairs. jQuery.post(".../gravatar-check.php", {userEmail: em...@email.com}, function(data) { // response callback } }); Here, your POST variable for the email will be "userEmail" (

[jQuery] Re: Split Form field into array

2009-10-06 Thread James
It should be fairly straightforward. Get the content of the text field: $("PartNum").val(); Use the split() function to split each line by "\n" (return). Then for each of those lines, split it again by " " (space). (Store all of these in an array(s).) Then you can use the join() function to add ",

[jQuery] Re: .show() does not work, but getElementById(id).style.display="block" does work

2009-10-06 Thread James
Try: $('#'+id).show(); On Oct 6, 1:17 pm, vjimw wrote: > Here is my .ready function using tabs and a class of .remote to start > using the history plugin > > // Show and hide product grids > $(document).ready(function() { >  $(".remote").click(function(event) { >          document.location.hash

[jQuery] Re: JQUERY form submit

2009-10-06 Thread James
The name of your form is "form", not "form_name" as you have in your Javascript. Do you have other fields aside from the upload field? Try putting other fields. In PHP do a "print_r($_REQUEST)" to see if you get anything. On Oct 6, 1:43 pm, kknaru wrote: > hi i have something like this: > > // >

[jQuery] Re: Check value client side

2009-10-06 Thread James
You can do it like that if what you're doing with it is not critical, because setting values in hidden fields is still considered user- modifiable content. Could you provide more information on what you're trying to do? Maybe there are better ways to go about doing it. On Oct 6, 5:18 am, CoffeeAd

[jQuery] Re: Create new DOM?

2009-10-06 Thread James
hat > function, the string version won't work. e will be undefined. > > The function version uses a closure to give the timeout function access to > local variables in the calling function. > > -Mike > > On Tue, Oct 6, 2009 at 12:02 PM, James wrote: > > > s

[jQuery] Re: Create new DOM?

2009-10-06 Thread James
setTimeout(e.show(200), 1000); should be: setTimeout("e.show(200);", 1000); or: setTimeout(function() { e.show(200); }, 1000); (line-end semi-colon not necessary, but should be used for good practice) On Oct 6, 7:57 am, Dennis Madsen wrote: > I'm trying to create new DOM and append it t

[jQuery] Re: Show: Call jQuery i callback

2009-10-06 Thread James
The callback needs to be a function. $j(".dialogBookingError").show(200, function() { $j(this).effect("highlight",{},650); }); On Oct 6, 9:10 am, Dennis Madsen wrote: > I have this code sample: > > $j(".dialogBookingError").show(200).effect("highlight",{},650); > > I would like the effect f

[jQuery] Re: Problem while using 'Selector - dom traversal'

2009-10-05 Thread James
Do you use and tags? If you do and can change it, this will be a lot simpler as you would only select those in the tbody tags: tbody > tr Otherwise, I'm not sure of a solution at this point without having to loop through its children. Maybe you can mix the :not and :has selection, but I've neve

[jQuery] Re: Changing image src and css properties of new image

2009-10-05 Thread James
Try putting that part in fadeIn's second parameter, a callback function that executes after the fadeIn is completed: $("#list .item a").click(function() { var imgPath = $(this).attr("href"); $("#left p img").hide().attr({ src: imgPath })

[jQuery] Re: Validation help needed

2009-10-02 Thread James
You should not be calling submit() first. You only call it after everything is validated. This can be as easy as a if-statement. Here's a simple example. Modify it to work with your scenrio. $(function() { $('#testForm').bind('submit', function() { $(this).validate(validation_options)

[jQuery] Re: Problem with URL formatting with $.ajax

2009-10-02 Thread James
Also note that setting the "cache:false" option will create that additional parameter with a random value. That way the browser will not find a cache with the same resource name and always requests a new page. On Oct 2, 5:42 am, acedanger wrote: > I believe it was because I originally had "globa

[jQuery] Re: ajax submit upload file firebug... no answer

2009-10-02 Thread James
Could you post some relevant code on how you're doing all of this? It's hard to help from only reading what you've described. On Oct 2, 5:48 am, Harold Martin wrote: > Hi, > > I've a technical problem, i use jQuery Form Plugin and it's working > well except for upload file. > Effectively after u

[jQuery] Re: Switch image source during toggle

2009-10-02 Thread James
Could you post your relevant HTML also with some kind of sample image src and what you would like it to look like after it's been toggled? On Oct 2, 6:26 am, Gremlyn1 wrote: > I have some divs I am toggling and there is a little + sign image I > want to change to a - sign image when the toggle e

[jQuery] Re: Ajax / Form Validation

2009-10-02 Thread James
t tries to access the url by the browser. > > Check the net activity and see > > _method PUT > data[Experience][city]  LosAngeles > data[Experience][country_id]    38 > data[Experience][finished]      2007 > data[Experience][position]      Customer Service Rep > data[Experien

[jQuery] Re: load() confusion

2009-10-02 Thread James
; > On Thu, Oct 1, 2009 at 8:38 PM, MorningZ wrote: > > > James:  there is also a JavaScript event called "load" for certain DOM > > objects.. and consequently the ability to wire jQuery onto that > > (http://docs.jquery.com/Events/load#fn) > > > to original po

[jQuery] Re: Form validation

2009-10-01 Thread James
I've replied to your other thread: http://groups.google.com/group/jquery-en/browse_thread/thread/80fbb4ae7b9d7c88 On Oct 1, 4:38 pm, "Dave Maharaj :: WidePixels.com" wrote: > I cant get the validation in my form to work. Using malsup to sumbit and > trying to add validate.js plugin but it wont w

[jQuery] Re: Ajax / Form Validation

2009-10-01 Thread James
Here's a simplified version of what you want to do: $('#testForm').bind('submit', function() { $(this).validate(validation_options); var valid = $(this).valid(); if (valid) { // do your ajax } }); var validation_options = { // set your options here }; On Oct 1, 10:52 a

[jQuery] Re: How To use getJSON?

2009-10-01 Thread James
In your PHP, you can do this: $data = array('/uploads/Argentina.gif', '/uploads/Australia.gif'); echo json_encode($data); exit; In your JS code for your getJSON callback: function(data) { $.each(data, function(i, path) { alert(i+': '+path);

[jQuery] Re: (autocomplete) help about extraparams

2009-10-01 Thread James
and got nothing. > > > If I use the example I mentioned before > > " > > $("#states").autocomplete(url, { > >     extraParams: { > >        country: function() { return $("#country").val(); } > >    } > > " > > what para

[jQuery] Re: load() confusion

2009-10-01 Thread James
MorningZ, Thanks for the correction. I've never had to use it and overlooked it. :) On Oct 1, 2:38 pm, MorningZ wrote: > James:  there is also a JavaScript event called "load" for certain DOM > objects.. and consequently the ability to wire jQuery onto that > (http://doc

[jQuery] Re: load() confusion

2009-10-01 Thread James
load() is suppose to take a url as the first parameter. http://docs.jquery.com/Ajax/load On Oct 1, 8:47 am, flyagaricus wrote: > I'm new to JQuery > > I can't get load() to work with a div class: > > >         jQuery(document).ready(function($) { >                 $(".Loader").load(function(){

[jQuery] Re: Modify how name:value pairs are converted in the URL

2009-10-01 Thread James
You can either (1) modify the jQuery library to do that, or (2) in your "url" parameter just hard-code it in the format that you want and insert the variables in there also without using the "data" parameter (recommended). On Oct 1, 10:58 am, acedanger wrote: > Whenever execute the following cod

[jQuery] Re: trouble calling a function

2009-10-01 Thread James
Try changing: $('.numeric', this).each(function() { to: $('.numeric').each(function() { On Oct 1, 11:06 am, nate wrote: > Hello > > I am trying to set up a toggle to allow users to show more precision > when a user clicks a button.  I have a function high() that doesn't do > anything when it is

[jQuery] Re: click function populating value in a hidden field

2009-10-01 Thread James
Suppose your rows looked like this: text text text $("tr").click(function () { $(".clicked").removeClass("clicked"); $(this).addClass("clicked"); var row_id = this.id.split('_')[1]; // e.g. 2 $("#hiddenField").val(row_id); // hiddenField is the ID of the hidden field }); On

[jQuery] Re: ajax complete function not being called

2009-10-01 Thread James
What happens if you put the whole $.ajax statement in a try/catch statement? Does it catch? On Oct 1, 7:24 am, mike wrote: > Right!  I'm having the same problem--neither the error nor the > complete are being called.  The request just fails, probably because > the responseText is not JSON. > > I

  1   2   3   4   5   6   7   8   9   10   >