[jQuery] Re: aborting a $.getScript() request

2009-03-26 Thread Karl Rudd
Here's my thoughts: 1) It is reliable when dealing with scripts that exist. 2) No idea. Karl Rudd On Thu, Mar 26, 2009 at 9:12 PM, Mauricio (Maujor) Samy Silva wrote: > >> You're right. A quick look in the bug tracker turns up this ticket: >>  http://dev.jquery.com

[jQuery] Re: aborting a $.getScript() request

2009-03-25 Thread Karl Rudd
You're right. A quick look in the bug tracker turns up this ticket: http://dev.jquery.com/ticket/1768 Karl Rudd On Thu, Mar 26, 2009 at 3:46 PM, Mauricio (Maujor) Samy Silva wrote: > >> However  you could set a flag in the success/callback function. After >> the getScr

[jQuery] Re: aborting a $.getScript() request

2009-03-25 Thread Karl Rudd
If the script does not exist then the insertion of the

[jQuery] Re: observe_field

2009-03-24 Thread Karl Rudd
Sure. Bind a "change" handler to the select. See http://docs.jquery.com/Attributes/val for more details. Karl Rudd On Wed, Mar 25, 2009 at 9:35 AM, macsig wrote: > > Hi guys, > Is there any way to achieve with jQuery the same goal of prototype > helper "observe_fie

[jQuery] Re: namespaces XML parsing

2009-03-18 Thread Karl Rudd
Just a quick note: If you use this with 1.3.x then you'll need to drop the "@", it's been removed from 1.3+. Karl Rudd On Thu, Mar 19, 2009 at 4:23 AM, Michael Lawson wrote: > We were running into a similar problem with an AJAX application and here is > what we di

[jQuery] Re: Select class="class1 class2" using jQuery

2009-03-18 Thread Karl Rudd
Yes, it's standard CSS selector behaviour, so it's also standard jQuery behaviour. Karl Rudd On Thu, Mar 19, 2009 at 6:32 AM, bill123 wrote: > > I need to select an element like this: > >     > > and I've found that both of the following work: > >

[jQuery] Re: is that possible to go back on window unload event

2009-03-13 Thread Karl Rudd
If they leave the unload event will fire. Karl Rudd On 13/03/2009, jack wrote: > > Thanks Karl, how do I know wether users want to leave or don't want to > leave after all? > > jack

[jQuery] Re: is that possible to go back on window unload event

2009-03-12 Thread Karl Rudd
the only way you can do anything about a user closing the window. Karl Rudd On Fri, Mar 13, 2009 at 5:28 PM, jack wrote: > > Hi, all > In $(window).unload(function(){ ... }, is that possible to cancel > unload event. I mean I would prompt for users if they want to close > the window. If they don't want, how do I cancel the event? > > Jack

[jQuery] Re: $(byName) <> $(byClass) in 1.3.2

2009-03-12 Thread Karl Rudd
Quite right, I should have said: In general the "name" attribute is for form controls, rather than general HTML elements. Karl Rudd On Fri, Mar 13, 2009 at 1:25 PM, RobG wrote: > > > > On Mar 13, 11:10 am, Karl Rudd wrote: >> Use id="whatever" rather t

[jQuery] Re: $(byName) <> $(byClass) in 1.3.2

2009-03-12 Thread Karl Rudd
Use id="whatever" rather than name="whatever". In CSS "#whatever" refers to an element with id="whatever". The "name" attribute is for form elements, not for general elements. Karl Rudd On Fri, Mar 13, 2009 at 10:02 AM, radioAM wrote: &g

[jQuery] Re: How to synchronize ajax events

2009-03-12 Thread Karl Rudd
That will work but it has some rather unexpected consequences, the biggest of which is that the entire browser will lock up (UI and all) until the response comes back from the server (which could be a few seconds). That's not a good thing to do to a user. Karl Rudd On Fri, Mar 13, 2009 at

[jQuery] Re: How to synchronize ajax events

2009-03-12 Thread Karl Rudd
alidate ) which has a "remote" option. Karl Rudd On Fri, Mar 13, 2009 at 10:25 AM, Andy789 wrote: > > Hi All, > > Here is a simple fragment: > >  function zipSearch(){ >        var zip = $j('input#zip_entry').attr('value'

[jQuery] Re: Very simple question...

2009-03-11 Thread Karl Rudd
I suggest reading through: http://docs.jquery.com/ In this case the page you want is: http://docs.jquery.com/Traversing Karl Rudd On Thu, Mar 12, 2009 at 10:04 AM, 7times9 <7tim...@googlemail.com> wrote: > > ...what does eq as in .eq(2) stand for? > > It helps me to

[jQuery] Re: Jquery 1.3.2 bug in getting checkbox ..... maybe

2009-03-10 Thread Karl Rudd
Remove the @ symbol. It's use has been deprecated for the past few releases and has now been removed. http://docs.jquery.com/Release:jQuery_1.3#Changes Karl Rudd On Wed, Mar 11, 2009 at 1:56 PM, Plant More Tree wrote: > > > Hi guys, > >    I upgraded to 1.3.2 from 1.2.6 an

[jQuery] Re: Reset individual form objects to their original display state

2009-03-10 Thread Karl Rudd
Form elements have "defaultValue" and "defaultSelected" attributes. You might want to explore using those to "reset" the elements. http://www.irt.org/script/909.htm Karl Rudd On Wed, Mar 11, 2009 at 5:58 AM, mkmanning wrote: > > Haven't tried it but yo

[jQuery] Re: Using .ajax to do XMLRPC - I must be doing something very stupid

2009-03-09 Thread Karl Rudd
Not sure what's happening. I think "data" is actually a string, so you might have to convert it to XML nodes before you can search it. I could be wrong though. Karl Rudd On Tue, Mar 10, 2009 at 10:23 AM, Ritesh Nadhani wrote: > > Thanks. > > I had look into that f

[jQuery] Re: Using .ajax to do XMLRPC - I must be doing something very stupid

2009-03-09 Thread Karl Rudd
jQuery "consumes" JSON fairly well but you'd need a plugin/other functionality (like from json.org or that RPC plugin) to "produce" JSON. Karl Rudd On Tue, Mar 10, 2009 at 4:00 AM, Ritesh Nadhani wrote: > > Aha. > > And I though I was doing something wrong.

[jQuery] Re: OnMouseDown = create draggable, OnMouseUp = create droppable

2009-03-08 Thread Karl Rudd
Sorry, no idea. Haven't used jQueryUI before. Karl Rudd On Mon, Mar 9, 2009 at 5:56 PM, delphilynx wrote: > > Thanks for the answer Karl Rudd, > > But that is what I already have tried. If you read the start post, > then you see that I want to create the drag and dropa

[jQuery] Re: OnMouseDown = create draggable, OnMouseUp = create droppable

2009-03-08 Thread Karl Rudd
Try http://jqueryui.com/ Karl Rudd On Mon, Mar 9, 2009 at 5:33 PM, delphilynx wrote: > > No one? Is there such a feature in jQuery for this problem? > > Thanks in advance guys! I have al this days been working on this > issue, and hope someone is willing to take a short look to

[jQuery] Re: Using .ajax to do XMLRPC - I must be doing something very stupid

2009-03-08 Thread Karl Rudd
tes an rpc object and adds ability to call them. It supports both xml and json rpc... XML http://plugins.jquery.com/project/xml Methods to generate XML/HTML tags programmatically. By default, they output XHTML compliant tags. Karl Rudd On Mon, Mar 9, 2009 at 1:18 PM, riteshn wrote: > > Hi >

[jQuery] Re: Matching on style attribute bug?

2009-03-05 Thread Karl Rudd
You'll need to use a filter(). Have a look at this previous thread: http://groups.google.com/group/jquery-en/browse_thread/thread/3b22774b4e7c0434 Karl Rudd On Fri, Mar 6, 2009 at 8:30 AM, ml1 wrote: > > I ran into a jquery bug trying this with class, so maybe this is a bug >

[jQuery] Re: Objects Methods as event handlers.

2009-03-05 Thread Karl Rudd
Ummm... that's a very interesting way of looking at things. Anyway, good luck with your project. Let the list know if you need any more help. Karl Rudd On Fri, Mar 6, 2009 at 2:19 AM, Michael wrote: > > That unfortunately is not the attitude of John Resiq - the creator. > While

[jQuery] Re: Attempting to convert to jQuery

2009-03-04 Thread Karl Rudd
This is being discussed in another thread at the moment ( http://groups.google.com/group/jquery-en/browse_thread/thread/b7eadd9ca0a683a4 ). There are a few plugins that you can try that should help: http://plugins.jquery.com/project/bind http://higginsforpresident.net/js/jq.hitch.js Karl

[jQuery] Re: Objects Methods as event handlers.

2009-03-04 Thread Karl Rudd
way the old "onclick=...." style handlers work. *shrug* It's all about how you expect things to work. Karl Rudd On Thu, Mar 5, 2009 at 8:25 AM, Michael wrote: > > And jQuery docs criticize prototype for polluting the global namespace > and in the same breath recommen

[jQuery] Re: Objects Methods as event handlers.

2009-03-03 Thread Karl Rudd
he bias as you can see the bind() function "binds" a function to a DOM element, and the "this" inside the handler actually refers to the DOM element rather than some external object. Karl Rudd On Wed, Mar 4, 2009 at 10:30 AM, Michael wrote: > > I've recently taken on

[jQuery] Re: click event and window.location problem in safari

2009-02-27 Thread Karl Rudd
Try this plugin: http://newism.com.au/blog/post/58/bigtarget-js-increasing-the-size-of-clickable-targets/ Karl Rudd On Sat, Feb 28, 2009 at 1:49 AM, introvert wrote: > > Hello > > I have a simple jquery code that will put a link (on click event) on a > division. The link i

[jQuery] Re: tbody:first-child & thead

2009-02-25 Thread Karl Rudd
at is the first child of tbody" http://docs.jquery.com/Selectors/firstChild Karl Rudd On Wed, Feb 25, 2009 at 8:08 PM, Alex Wibowo wrote: > sorry i should say > "how does that explain the behaviour when there's no thead" (because it > works when thead doesnt

[jQuery] Re: Is this a valid selector?

2009-02-24 Thread Karl Rudd
Apologies for the last post, I clicked send before I was ready. Check to see that the 'div.section:last' selector actually returns a valid jQuery object. (So check that $('div.section:last').length > 0) Karl Rudd On Wed, Feb 25, 2009 at 1:40 PM, Rick Faircloth wrot

[jQuery] Re: Is this a valid selector?

2009-02-24 Thread Karl Rudd
The scrollTo function takes On Wed, Feb 25, 2009 at 1:40 PM, Rick Faircloth wrote: > (‘div.section:last’)  ??? > > > > I’m trying to use it in this code: > > > > $(document).ready(function() { > > > > $(‘#add-section’).livequery(‘click’, function() { > >   $.scrollTo(‘div.section:la

[jQuery] Re: JQuery: Dynamically added fields values are not submitted

2009-02-16 Thread Karl Rudd
rm. This is why your stuff isn't getting submitted (at least in Firefox). Karl Rudd On Tue, Feb 17, 2009 at 1:27 PM, Bluesapphire wrote: > > Hi! > Kindly visit following link: > > http://vibersol.com/sitesdemo/shipping/admin/addquotation.php > > Then add form fields dynamic

[jQuery] Re: .load() and timing

2009-02-15 Thread Karl Rudd
nction. http://docs.jquery.com/Ajax/jQuery.ajax#options Karl Rudd On Mon, Feb 16, 2009 at 5:05 PM, jhm wrote: > >> You'll probably need to supply a snippet of the relevant bit of your >> code. It could be a number of things. > > Is this enough? > >functi

[jQuery] Re: .load() and timing

2009-02-15 Thread Karl Rudd
using the $.get() function or the "full" ajax() function. They offer a lot more flexibility, such as not directly dumping the newly loaded HTML into the document. You get a chance to process it and put it where you want it to go. Karl Rudd On Mon, Feb 16, 2009 at 4:05 PM, jhm wrote: > > I&

[jQuery] Re: Safari and .remove()

2009-02-14 Thread Karl Rudd
'dummyClass').removeClass('dummyClass'); And it would work. YMMV. You could try disabling the link before removing it. Karl Rudd On Sat, Feb 14, 2009 at 2:13 AM, Olaf Gleba wrote: > > I was wrong. The removal works. But it seems, that clicking on a link which &g

[jQuery] Re: Problem reading rss tag

2009-02-14 Thread Karl Rudd
"link" tags only have attributes, they don't "contain" anything. Karl Rudd On Sat, Feb 14, 2009 at 11:31 AM, Karthik wrote: > > Hi, > I am trying to parse a rss feed. My code seems to be able to extract > the value for any tag in the feed except the &

[jQuery] Re: Safari and .remove()

2009-02-13 Thread Karl Rudd
If the removal really doesn't work you could try disabling the link. $(linkHere).attr('disable',true). Karl Rudd On Fri, Feb 13, 2009 at 7:22 PM, Olaf Gleba wrote: > > Hi. > > On a click event i DOM insert (append) a LINK tag into the head. > > var s = documen

[jQuery] Re: Increment Value. What am I doing wrong?

2009-02-10 Thread Karl Rudd
Remember also that .val() will return a string, so you'll need to convert it to a number first (parseInt), then decrement it. Karl Rudd On Wed, Feb 11, 2009 at 1:14 PM, brian wrote: > > $index.val() returns the value. $index.val(VALUE); assigns VALUE. > > So, this sh

[jQuery] Re: Cannot Get JQuery Ajax to work in Google Chrome browser

2009-02-10 Thread Karl Rudd
bugs.webkit.org/show_bug.cgi?id=19922 Karl Rudd On Wed, Feb 11, 2009 at 11:49 AM, Mike wrote: > > Can anyone help me out with this? Here is a version of the update.php > script which will just write what the info it gets to a log file. I > found that the ajax works in IE and Firefox, b

[jQuery] Re: test for css selector capability?

2009-02-09 Thread Karl Rudd
create elements that should be "selected" (and add them to the document), then test the .css('background-color') of the element to see if it matches the colour in the stylesheet. Slightly tricky but doable. Karl Rudd On Tue, Feb 10, 2009 at 10:31 AM, Geuis wrote: > > I g

[jQuery] Re: Using selectors successfully...?

2009-02-07 Thread Karl Rudd
That should work fine. Example: http://jsbin.com/odada Something else must be going wrong. Karl Rudd On Sun, Feb 8, 2009 at 2:07 PM, gberz3 wrote: > > Will someone please explain to me why the following code fails to > execute? I have a simple test page set up and jquery doesn'

[jQuery] Re: How to save "this" context in callbacks

2009-02-07 Thread Karl Rudd
Sorry, cut and paste error there. Corrected: function blah() { var blahThis = this; someExternalFunction( function() { blahThis.doSomething(); }); } Karl Rudd On Sun, Feb 8, 2009 at 12:03 PM, Karl Rudd wrote: > Assign "this" to a local variable. > > function blah(

[jQuery] Re: How to save "this" context in callbacks

2009-02-07 Thread Karl Rudd
Assign "this" to a local variable. function blah() { var blahThis = this; someExternalFunction( function() { blahThis.doSomething(); } } Karl Rudd On Sun, Feb 8, 2009 at 9:28 AM, Alexander wrote: > > Goodday! > Could anyone tell me how to save "this" co

[jQuery] Re: How to detect jQuery version?

2009-02-05 Thread Karl Rudd
jQuery.fn.jquery Karl Rudd On Fri, Feb 6, 2009 at 11:54 AM, Geuis wrote: > > Wondering what an easy way to detect which version of jQuery is > running on a page. Is there a $.version property? Doing feature > detection based on deprecated methods probably wouldn't work well, &

[jQuery] Re: how to access "checked" attribute on a toggle

2009-02-04 Thread Karl Rudd
cts a bit like an array) actually contains anything check it's length. That is: if ( $('#something').length ) { // an object with id="something" exists on the page } Karl Rudd On Thu, Feb 5, 2009 at 12:02 PM, Chris wrote: > > This is incredibly basic, but I'

[jQuery] Re: Manipulating form field attributes

2009-02-03 Thread Karl Rudd
IE doesn't allow you to change the type of a form element once it's created. Best solution is to create a new element and add in the value and name, then delete the old element. Karl Rudd On Wed, Feb 4, 2009 at 9:17 AM, Sam Hastings wrote: > > Hi everyone, > > I'm

[jQuery] Re: Detecting wether an image link is going to work

2009-02-03 Thread Karl Rudd
You could try using the "error" handler: $(image[1]).bind('error', function(){ /* ... */ }); I believe it works for all the common browsers. Karl Rudd On Wed, Feb 4, 2009 at 5:41 AM, daveJay wrote: > > I've got a page set up where it loads each image on the

[jQuery] Re: failing .click() trigger on element created using .replaceWith()

2009-02-02 Thread Karl Rudd
/ ) - if you're using jQuery 1.3.1 you can look at the new "live" function ( http://docs.jquery.com/Events/live ) More information here: http://docs.jquery.com/Frequently_Asked_Questions#Why_do_..._.3F Karl Rudd On Mon, Feb 2, 2009 at 10:43 PM, NekraNoX wrote

[jQuery] Re: Sending Arguments to Event

2009-01-28 Thread Karl Rudd
could be: var someVar = { init : function () { $('#someID').bind("click", {'args': ['arg1', 'arg2']}, this.add); }, add : function(event) { alert(event.data.args[0] + ' : ' + event.data.args[1]); } }; Karl Rudd On Wed, Jan

[jQuery] Re: How do I communicate with other windows with jquery

2009-01-22 Thread Karl Rudd
27;); Note you have to put the "context" (myWindow.document), otherwise jQuery will use the current window's document as the base for it's selections. Karl Rudd On Fri, Jan 23, 2009 at 2:12 PM, jack wrote: > > On firefox mutiple tabs, how do I manipulate the other tabbed window, > such as set focus or change css on a specific element?

[jQuery] Re: New 1.3 feature, native event delegation??

2009-01-22 Thread Karl Rudd
t handler adding uses the "live" and "die" functions: http://docs.jquery.com/Events Karl Rudd On Fri, Jan 23, 2009 at 10:11 AM, Sam H wrote: > > John Resig said of 1.3: > > "I only posted last week about how event delegation can help you to > optimize y

[jQuery] Re: Need access to index within loop

2009-01-22 Thread Karl Rudd
You don't have to "select" the LI again. Within the "each" function the "this" variable refers to the LI DOM node. So you can write: $(document).ready(function(){ $('li').each(function(i) { alert(i); $(this).fadeIn('slow')

[jQuery] Re: multiple submit sends with CSS Button

2009-01-21 Thread Karl Rudd
Robert, We need to see the code for the "trigger_form_submit" function before we can understand what is going wrong. Karl Rudd On Thu, Jan 22, 2009 at 9:47 AM, Robert wrote: > > A normal form with login and password. > > I included jquery in my functions file, so i

[jQuery] Re: multiple submit sends with CSS Button

2009-01-21 Thread Karl Rudd
gs a lot easier (and it's usually right). Fighting fire with fire just leaves more burnt. Anyway, back on topic... Karl Rudd On Thu, Jan 22, 2009 at 9:37 AM, Rick Faircloth wrote: > >> "that's a useless pice (sic) of code" > > Can't you think of a less d

[jQuery] Re: global events??? actions on multiple forms

2009-01-21 Thread Karl Rudd
There are a few ways. Have a read of this: http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_AJAX_request.3F Karl Rudd On Thu, Jan 22, 2009 at 9:26 AM, phanorcoll wrote: > > hi, > > i have the following code: > > $(function() { >

[jQuery] Re: Unexpected DOM layout changes in IE6+

2009-01-20 Thread Karl Rudd
code as the last line in your "document.ready" function: $('body').addClass('blah').removeClass('blah'); And everything works. *shrug* That's IE for you. Karl Rudd On Wed, Jan 21, 2009 at 3:33 PM, SteveBroski wrote: > >> I'm not

[jQuery] Re: New link being ignored by jQuery

2009-01-19 Thread Karl Rudd
Check out the documentation for several solutions: http://docs.jquery.com/Frequently_Asked_Questions#Why_do_..._.3F Karl Rudd On Tue, Jan 20, 2009 at 5:14 AM, Mark MacInnes wrote: > > I'm using jQuery to perform some ajax when a link with a certain id is > clicked on. The

[jQuery] Re: Conflict with Mootools...

2009-01-19 Thread Karl Rudd
Have you checked out the documentation?: http://docs.jquery.com/Using_jQuery_with_Other_Libraries Karl Rudd On Tue, Jan 20, 2009 at 8:40 AM, Erik R. Peterson wrote: > > I have a lot of jquery scripts in my html and I just added a mootools > script. > > Now none of my jquery scr

[jQuery] Re: newby... cannot get $("div").length; to work

2009-01-18 Thread Karl Rudd
document (the HTML not images, etc) has finished loading and is "ready". More info about the "ready" function/event here: http://docs.jquery.com/Events/ready#fn Karl Rudd On Mon, Jan 19, 2009 at 12:45 PM, bartee wrote: > > I have this test code. My alert dialog a

[jQuery] Re: namespacing events

2009-01-15 Thread Karl Rudd
27;#button').bind('click', function(){ /* ... */ }); $('#button').bind('click.mySpace1', function(){ /* ... */ }); $('#button').bind('click.anotherNameSpace', function(){ /* ... */ }); // This should trigger all 3 functions $('#button').trig

[jQuery] Re: Standards box model

2009-01-14 Thread Karl Rudd
Try it and see what Internet Explorer 6 does. Karl Rudd On Thu, Jan 15, 2009 at 3:53 PM, Ami wrote: > > So you for you fast answer. > 5 point > (: > > Do I must to change all my pages from Transitional to strict? > Or can I leave it as Transitional > (I afraid from CSS

[jQuery] Re: updating flash after changing flashvars

2009-01-14 Thread Karl Rudd
No idea why. You should be able to work around it by setting the FlashVars "attribute" directly: $("#playersettings")[0].FlashVars = "color=00"; Karl Rudd On Thu, Jan 15, 2009 at 10:11 AM, EugeneS wrote: > > Hello, > > i have embed flash el

[jQuery] Re: Standards box model

2009-01-14 Thread Karl Rudd
That will work, but you do not need to change to using XHTML. You could use HTML Strict: http://www.w3.org/TR/html4/strict.dtd";> More information here: http://en.wikipedia.org/wiki/Quirksmode Karl Rudd On Thu, Jan 15, 2009 at 3:08 PM, Ami wrote: > > Hello, > Sorry

[jQuery] Re: The new core LIVE.

2009-01-14 Thread Karl Rudd
Yes. Karl Rudd On Thu, Jan 15, 2009 at 3:10 PM, Ami wrote: > > The new core LIVE. > > Hello. > Can I use a namespace with live? > $.live('click.fuc1',function1 }; > $.live('click.fun2'); > > $.die('click.func1'); >

[jQuery] Re: [ TR.click not work in Firefox]

2009-01-14 Thread Karl Rudd
Trying changing: x.css("background-color","ee"); to: x.css("background-color","#ee"); Karl Rudd On Thu, Jan 15, 2009 at 10:15 AM, Lord Gustavo Miguel Angel wrote: > hi, > > Look this do not work in firefox, in IE

[jQuery] Re: In this code, what would $(this) in the success part refer to?

2009-01-14 Thread Karl Rudd
Rick, while I can appreciate your unhappiness Matt and MorningZ, responding doesn't help anyone. Let's leave thread alone now. Or if need be perhaps you guys can take it to personal emails. Karl Rudd (not a moderator, just someone who prefers quiet discussion) :) On Thu, Jan 15, 200

[jQuery] Re: In this code, what would $(this) in the success part refer to?

2009-01-13 Thread Karl Rudd
ce: JavaScript: The Good Parts http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742 "Pro JavaScript Techniques" http://jspro.org/ Karl Rudd PS It's probably a good time to stop this thread as it's well beyond it's beginning topic. On Wed, Jan 14, 2

[jQuery] Re: @name deprecated?

2009-01-13 Thread Karl Rudd
Guys, it's probably a good time for a "time out". This is doing no one any good, least of all those reading the list. (See my post in the other thread.) Karl Rudd On Wed, Jan 14, 2009 at 4:15 PM, Rick Faircloth wrote: > > Well, I'm sure John will run all his do

[jQuery] Re: In this code, what would $(this) in the success part refer to?

2009-01-13 Thread Karl Rudd
s stress, mostly for me :). Trying to explain quantum physics to someone who's just learning about gravity is usually a recipe for stress for all involved. Karl Rudd On Wed, Jan 14, 2009 at 3:56 PM, Rick Faircloth wrote: > > I help myself, too, but often times, answers that are offere

[jQuery] Re: In this code, what would $(this) in the success part refer to?

2009-01-13 Thread Karl Rudd
If you check the documentation you'll see that "this" in the "success" function will be "the options for this ajax request". http://docs.jquery.com/Ajax/jQuery.ajax#options Karl Rudd On Wed, Jan 14, 2009 at 2:31 PM, Rick Faircloth wrote: > > Would it

[jQuery] Re: wild card $('d...@id^=x_div_]') question

2009-01-13 Thread Karl Rudd
ement, so if you want to do anything with it using jQuery you need to do $(this).whateverjQueryFunction() On a side note, don't use the @ anymore. It's been deprecated for a while and is being removed in the next version of jQuery. Karl Rudd On Wed, Jan 14, 2009 at 2:24 PM, ywkyee wr

[jQuery] Re: Select all controls of the form

2009-01-13 Thread Karl Rudd
tead of "filter". The "filter" removes non-matching elements, if you pass in a "form" element then it won't do what you want. The "find" function works on the child elements of the given elements, which is what you want. Karl Rudd On Tue, Jan 13, 2009 at

[jQuery] Re: Select all controls of the form

2009-01-12 Thread Karl Rudd
Errr elements aren't form controls. elements are but ":input" selects those. I'm not sure what you mean. Karl Rudd On Tue, Jan 13, 2009 at 5:43 PM, JQueryProgrammer wrote: > > The above code selects all the controls except tag. > > > > On Jan

[jQuery] Re: Select all controls of the form

2009-01-12 Thread Karl Rudd
The '*' selector will select _all_ the nodes (including the s). Try using the ':input' selector: $("#form1 :input") http://docs.jquery.com/Selectors Karl Rudd On Tue, Jan 13, 2009 at 5:16 PM, JQueryProgrammer wrote: > > I am trying to validate all the

[jQuery] Re: append() not working on dynamically-created nodes in IE

2009-01-11 Thread Karl Rudd
Try closing the tag, ie: $('#myDiv').append($('')); Actually the second $() shouldn't be needed: $('#myDiv').append(''); Karl Rudd On Mon, Jan 12, 2009 at 7:35 AM, Joe White wrote: > > I'm troubleshooting a problem where my text wasn

[jQuery] Re: i can't modify the header with "beforeSend"

2009-01-11 Thread Karl Rudd
document, so no headers can be set. You'll have to use a "proxy" on a local server, ie: http://developer.yahoo.com/javascript/howto-proxy.html Karl Rudd On Mon, Jan 12, 2009 at 2:20 AM, ximiff wrote: > > I'm trying to auto login to twitter api with adding a Authori

[jQuery] Re: Select inputs

2009-01-08 Thread Karl Rudd
$('input[name^=xxx]') http://docs.jquery.com/Selectors/attributeStartsWith#attributevalue Karl Rudd On Fri, Jan 9, 2009 at 9:14 AM, Lay András wrote: > > Hello! > > How can I select all checkbox inputs which names/ids starting with > "xxx"? I tried this, but not working: > > $('input[name=xxx*]') >

[jQuery] Re: - Enable then Disable buttons

2009-01-03 Thread Karl Rudd
Woops. Mistyped the second to last bracket. Should be a '(', rather than '{'; $('#theSelectorForTheButton').click( function() { var button = this; button.disabled = true; setTimeout( function() { button.disabled = false; }, 3000 ); }); On Sun, Jan 4, 200

[jQuery] Re: - Enable then Disable buttons

2009-01-03 Thread Karl Rudd
Untested but this should do the trick. $('#theSelectorForTheButton').click( function() { var button = this; button.disabled = true; setTimeout( function() { button.disabled = false; }, 3000 }; }); Karl Rudd On Sun, Jan 4, 2009 at 2:22 PM, Commandos wrote: > > How can i

[jQuery] Re: Posting multiple values from a checkbox

2008-12-30 Thread Karl Rudd
Correct, the syntax is wrong. You want: wrote: > > I've got checkboxes on my page. When I use the $.post method, it's > only transmitting the first value out of my list. Here's my code: > > $.post("http://localhost/search_engine.php",{ >food_type: $("#food

[jQuery] Re: applying css style to past dates

2008-12-28 Thread Karl Rudd
}); }) And in the CSS: .pastDate { color: red; } Karl Rudd On Mon, Dec 29, 2008 at 11:52 AM, Matt wrote: > > Hi, > > I'm trying to make text red when a date in an input field occurs in > the past. However, it isn't working when I try it out..

[jQuery] Re: Ajax.Form() fire onchange of elements

2008-12-25 Thread Karl Rudd
quot;ajaxSubmit()" function to the change event of a form element. For example (untested): $('#myFormId') .submit(function() { $(this).ajaxSubmit(); return false; }) .find(':input').change(function() { $(this).ajaxSubmit(); }); Karl Rudd On Thu, Dec 25, 2008 a

[jQuery] Re: getJSON invalid label

2008-12-25 Thread Karl Rudd
on() { $.ajax({ dataType: "jsonp", url: "http://someplace.com?someparam=123&callback=?";, query: $("#query").val(), cache: false, success: function(data){ alert(data); } }); return false; }); Karl Rudd On Fri, Dec 26, 2008 at 5:29 AM, mark wr

[jQuery] Re: jQuery and $.post with PHP and $_POST

2008-12-24 Thread Karl Rudd
Sorry, typing too fast, reading too little. Two things are needed: * $.post needs a callback function so you can get at what is returned. * the submit handler needs a "return false;" so the browser won't continue with the normal submit process. Karl Rudd On Wed, Dec 24, 2

[jQuery] Re: jQuery and $.post with PHP and $_POST

2008-12-24 Thread Karl Rudd
query/form/ If you prefer DIY then take a look at: http://docs.jquery.com/Ajax/serializeArray There are also a number of tutorials out there, such as: http://trevordavis.net/blog/tutorial/ajax-forms-with-jquery/ http://www.sitepoint.com/article/ajax-jquery/3/ Karl Rudd On Wed, Dec

[jQuery] Re: jQuery and $.post with PHP and $_POST

2008-12-24 Thread Karl Rudd
Unless a submit button is explicitly pressed it's value won't be sent. So in the case given, since there are no other form elements, nothing with be posted to the server. Karl Rudd On Wed, Dec 24, 2008 at 11:36 PM, Brett Alton wrote: > > How do I get PHP to print JavaScri

[jQuery] Re: How can I generalize this code for all values?

2008-12-22 Thread Karl Rudd
is all untested. Karl Rudd On Tue, Dec 23, 2008 at 3:45 PM, Rick Faircloth wrote: > >> The select gets it's value from the selected child option. > > Perhaps that's why I can't get validation to work! > >> My advice would be to use the Jorn's plugin > &g

[jQuery] Re: How can I generalize this code for all values?

2008-12-22 Thread Karl Rudd
n on blur by default. Karl Rudd On Tue, Dec 23, 2008 at 2:54 PM, Rick Faircloth wrote: > > D'oh! I can't believe it was that simple! > And I read everything I could find, including the docs on selectors. > (Should have read it twice, I guess...) > > Anyway, question

[jQuery] Re: How can I generalize this code for all values?

2008-12-22 Thread Karl Rudd
>From http://docs.jquery.com/Selectors (Forms section): :input Matches all input, textarea, select and button elements. To select all Form elements with a "required" class: $(':input.required') Karl Rudd On Tue, Dec 23, 2008 at 2:39 PM, Rick Faircloth

[jQuery] Re: Where's my syntax error?

2008-12-15 Thread Karl Rudd
Remove the last ) Karl Rudd On Tue, Dec 16, 2008 at 12:31 PM, Rick Faircloth wrote: > > Can't figure out what I've got wrong. > Firebug is telling me "syntax error });" > > Could someone please point out the error? > (Perhaps the entire coding is wrong..

[jQuery] Re: eq() driving me nuts...

2008-12-15 Thread Karl Rudd
There shouldn't be 2 elements with the same id. Try using a class. There are no "a" elements inside the "div"s. I presume this is just a cut and paste error? Karl Rudd On Tue, Dec 16, 2008 at 9:24 AM, asrij...@googlemail.com wrote: > > Hi Guys, > > gotta

[jQuery] Re: problem using jquery and prototype together

2008-12-11 Thread Karl Rudd
ready */ }); Karl Rudd On Fri, Dec 12, 2008 at 6:06 PM, ♫ cheskonov wrote: > > This could sound a stupid question but here is my problem : > is there a way to use $ sign while working with jQuery and Prototype > together? > it seems that using both causes a conflict with the &qu

[jQuery] Re: Simultaneous $.load() calls wait for eachother

2008-12-09 Thread Karl Rudd
Unless the ajaxSetup() function is being called with 'async': false, then load() (and any other ajax based methods) will work asynchronously. Karl Rudd On Wed, Dec 10, 2008 at 12:27 AM, Robin Speekenbrink <[EMAIL PROTECTED]> wrote: > > I have a (stupid) problem: i have the

[jQuery] Re: Select option value not working

2008-12-09 Thread Karl Rudd
Heh yeah that too. :) Sorry I missed that detail. Karl Rudd On Tue, Dec 9, 2008 at 9:08 PM, Rik Lomas <[EMAIL PROTECTED]> wrote: > > It could be to do with the select isn't an input tag, it's a select > tag, try $("select[name='myselect'] option:selected&

[jQuery] Re: Select option value not working

2008-12-09 Thread Karl Rudd
The SELECT's value is what you want: $("input[name='myselect']").val() The only time you need to check is individual OPTIONs are selected is if you have a multi-select list box. Karl Rudd On Tue, Dec 9, 2008 at 8:09 PM, JQueryProgrammer <[EMAIL PROTECTE

[jQuery] Re: Remote requests using $ajax

2008-12-07 Thread Karl Rudd
Try looking at the getJSON method: http://docs.jquery.com/Ajax/jQuery.getJSON It's the only way to do "direct" cross-domain communication from the client-side. (The other option is you use a proxy on your server and route requests through there.) Karl Rudd On Mon, Dec 8,

[jQuery] Re: addClass with attrs

2008-12-06 Thread Karl Rudd
Try this plugin: http://plugins.jquery.com/project/Rule Karl Rudd On Sun, Dec 7, 2008 at 9:50 AM, Dirceu Barquette <[EMAIL PROTECTED]> wrote: > Hi! > > How can I add a class with its attrs dynamically? > > like this (not works, obvious ...)---> $('#div').

[jQuery] Re: Doing Ajax call to a page that requires authentication

2008-11-29 Thread Karl Rudd
Oh and I because of the fact that a script tag is used the only arguments that can be passed in are "GET" type arguments in the actual URL. Karl Rudd On Sun, Nov 30, 2008 at 9:48 AM, Karl Rudd <[EMAIL PROTECTED]> wrote: > You can get around it by using a JSON (or JSONP) re

[jQuery] Re: Doing Ajax call to a page that requires authentication

2008-11-29 Thread Karl Rudd
You can get around it by using a JSON (or JSONP) response. For cross-domain JSON calls a script tag is inserted and the content is "read" that way. Karl Rudd On Sat, Nov 29, 2008 at 11:17 PM, TheBlueSky <[EMAIL PROTECTED]> wrote: > > Oh, sorry, my mistake! Yes, it's

[jQuery] Re: Doing Ajax call to a page that requires authentication

2008-11-27 Thread Karl Rudd
Is the page/resource in another domain? That would obviously not work. That's the only thing I can think of. Karl Rudd On Thu, Nov 27, 2008 at 9:20 PM, TheBlueSky <[EMAIL PROTECTED]> wrote: > > Thanks for your reply. > > Sorry that my question wasn't clear enoug

[jQuery] Re: Replacing document.getElementById()

2008-11-24 Thread Karl Rudd
is case, there is a shortcut method: myNodes.val('mm/dd/'); Something to watch out for is that the each() method (when called "on" a jQuery "collection" object) actually returns the "raw" DOM nodes, one at a time. ie: myNodes.each(function() { /

[jQuery] Re: setInterval method call with parameters not working

2008-11-23 Thread Karl Rudd
"real world" the response will frequently end up taking more than 1 second to return from the server. Karl Rudd On Mon, Nov 24, 2008 at 7:07 AM, Sean <[EMAIL PROTECTED]> wrote: > > HI There, > > I'm trying to call a method using the setInterval function that call

  1   2   3   4   5   >