[jQuery] Re: why coding like this:(function(){})();

2009-03-15 Thread mkmanning
er optimization and [sometimes] a > language feature allowing you to try to direct the compiler.) > > > ...as long as they are preceded with the > > var declaration (if not, they are global, even with this format). > > Yes, I said "vars" not "properties"

[jQuery] Re: Working with hash?

2009-03-15 Thread mkmanning
) If you want to deviate and impose a querystring on the location hash, you'll most likely have to make your own parser (since it's unlikely anybody else would do it this way). On Mar 15, 10:52 am, brian wrote: > On Sun, Mar 15, 2009 at 1:43 PM, T.J. Crowder > wrote: > > > @

[jQuery] Re: Working with hash?

2009-03-15 Thread mkmanning
If you mean the querystring as in: mysite.com?name=jonas&phone=12345 //note the ? instead of # Then you can use this plugin (it will parse the querystring into a hash like you want): http://plugins.jquery.com/project/parseQuery On Mar 15, 8:30 am, brian wrote: > On Sun, Mar 15, 2009 at 6:23 AM,

[jQuery] Re: TextArea CountDown

2009-03-15 Thread mkmanning
No, but it's pretty easy to write one :) $('textarea').keyup(function(){ if(this.value.length >= 100) { //handle the over the limit part here $(this).addClass('overlimit'); this.value = this.value.substring(0, 100); } else { $(this).remove

[jQuery] Re: why coding like this:(function(){})();

2009-03-15 Thread mkmanning
Not sure what you mean "inline" or by "scope the vars inside"; variables declared inside the function are scoped "inside" (they have lexical scope to the function), as long as they are preceded with the var declaration (if not, they are global, even with this format). The closing/end parens creat

[jQuery] Re: Simple toggle between slide up slide down and changing paragraph html contents not working...

2009-03-15 Thread mkmanning
You don't need .each(), and if you want reduce your code you can, with chaining, do it all in a one line of jQuery: CSS (to initially hide all the contents): p.contents{ display:none; } HTML ('contents' class added for easier selecting): Item 1 Hidden contents 1

[jQuery] Re: help with menu and show/hide divs

2009-03-15 Thread mkmanning
As long as you have a one-to-one relationship between your links and your divs, you don't need to worry about IDs or hrefs, etc. Just use the index position: first second third test1 test2 test3 var links = $('#links a').click(function(){

[jQuery] Re: getting data using html attribute

2009-03-14 Thread mkmanning
item[field] On Mar 14, 9:46 am, Alain Roger wrote: > Hi, > > i have several html tags with some additional attributes like 'type' or > 'abbr'. for example : > Language > > now i have a function which should fill the TD tag of another table based on > the abbr attribute of my first table (like yo

[jQuery] Re: JSON Newbie

2009-03-14 Thread mkmanning
'aaData' is an array of arrays. aaData[0][0] = "1001-00-1535.000"; aaData[0][1] = "Tenant Improvements"; On Mar 14, 4:56 am, finco wrote: > I'm new to jquery and json.  I've looked at lots of examples of how to > process json data but they all seem to have field names that come > across in the d

[jQuery] Re: triggering events with selected

2009-03-13 Thread mkmanning
Josh's is slightly faster than my two suggestions :) This is slightly faster than Josh's: $('.numberPages').change(function() { $('p.tog').hide().eq(':lt('+($(this).val())+')').show(); }); On Mar 13, 12:20 am, Josh Powell wrote: >             >                 1 >                 2 >  

[jQuery] Re: triggering events with selected

2009-03-12 Thread mkmanning
How about something more succinct? $("select.numberPages").change(function(){ $('p:not(.skip)').show().filter(':gt('+(parseInt($(this).val ())-1)+')').hide(); }); It requires a class on the p containing the select is all: A. Number of pages : ... Or if there will be other p's on the pa

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

2009-03-12 Thread mkmanning
My 2 cents: "You can still use name,...", yes, and you can use an attribute called "foobar", but that doesn't mean you should. Rob indicates"The name attribute is valid for many more elements" and then provides the full list, but I don't see DIV on that list anywhere. According to the spec for HT

[jQuery] Re: Add value to input

2009-03-12 Thread mkmanning
$(B).click(function(){ $(I)[0].value += $(S).val(); }); On Mar 12, 5:38 pm, shapper wrote: > Hello, > > In a form I have a select (S), a button (B) and an input (I) among > other form elements. > I would like to add the value of the select, when the button is > clicked, to the end of the

[jQuery] Re: ajax.load(url) working in IE only

2009-03-12 Thread mkmanning
Not looking any further, you have anchors with inline onclick events (not considered good practice btw) which call the updateGallery() function, which then binds a click event on the same anchors, every time you click them again? wrote: > Hello, > > I have use ajax.load in the following function

[jQuery] Re: Return CSS Style?

2009-03-12 Thread mkmanning
Sorry for the terse response, but you might want to check out getComputedStyle/currentStyle On Mar 12, 10:33 am, "sfea...@gmail.com" wrote: > Thanks for the response.  I want to make it standard across the site > so I can do a simple call to display whatever style(s) of that > particular element

[jQuery] Re: trying to add a 'class' to a link based on the value of the link's href

2009-03-12 Thread mkmanning
each(function(){ var a = $(this).find('a'); if(a[0].href===file){ a.addClass('selected'); } }); On Mar 12, 10:00 am, mkmanning wrote: > Sorry, it should just be if(a===file){.. > > the var 'a' is already the href. > &g

[jQuery] Re: trying to add a 'class' to a link based on the value of the link's href

2009-03-12 Thread mkmanning
t;         var a = $(this).find('a').attr('href'); >         if(a.href===file){ >                 a.addClass('selected'); >         } >                 }); > > cheers > > On Mar 11, 6:14 pm, mkmanning wrote: > > > Deja Vu :) > > >

[jQuery] Re: Get Textbox-value and write to table-cell ()

2009-03-12 Thread mkmanning
way, if i'm not mistaken or miscount (and i haven't > tried to run it yet), i think your script has one quote (') less, > hasn't it? > > Anyway, those 'string munging' is indeed rather confusing... > > On Mar 12, 12:03 am, mkmanning wrote: > > > I

[jQuery] Re: trying to add a 'class' to a link based on the value of the link's href

2009-03-11 Thread mkmanning
Deja Vu :) Why use a separate array? $('.design_html_nav li').each(function(){ var a = $(this).find('a').attr('href'); if(a[0].href===file){ a.addClass('selected'); } }); On Mar 11, 3:36 pm, ksandn...@gmail.com wrote: > Hi there, > > What I'm trying to do

[jQuery] Re: add a 'class' to tag based on page file name

2009-03-11 Thread mkmanning
Why use a separate array? $('.design_html_nav li').each(function(){ var a = $(this).find('a').attr('href'); if(a[0].href===file){ a.addClass('selected'); } }); On Mar 11, 3:16 pm, vintagetwitch wrote: > Hi all, > > What I would like to do is add a 'select

[jQuery] Re: onchange input

2009-03-11 Thread mkmanning
Remove the 'on' from onchange. On Mar 11, 12:59 pm, dziobacz wrote: > I have: > >   >   id="sf_guard_user_username" /> >   > > > > > I would like after each change in input 'sf_guard_user_username' write > something between . > > What is wrong in my code below: > > $(document).ready(functi

[jQuery] Re: Only show 5 list item, hide the rest?

2009-03-11 Thread mkmanning
gt;                 if(i===3){return false;} >                         h += this.offsetHeight; >                 }); >                 ul.animate({'height':(ul.height()>h?h:ulh)+'px'}); >         } >         return false; > > }); > > Probably somethin

[jQuery] Re: Only show 5 list item, hide the rest?

2009-03-11 Thread mkmanning
}); return false; }); }); On Mar 11, 12:49 pm, Brian wrote: > Is there anyway to account for padding on the li of each list? I have > padding which seems to be throwing off the calculations. > > On Mar 11, 3:36 pm, Brian wrote: > > > mkmanning, > &g

[jQuery] Re: retrieve value with JQuery

2009-03-11 Thread mkmanning
If #zipCode is an input: $('#zipCode').val().length On Mar 11, 1:20 pm, Chuk wrote: > Hi.  In one of my functions, I would like to test the value of a > certain field with an id="zipCode".  Here is my current code: > > function retrieveCityState() > { >   if ($('#zipCode').value.length > 4) >

[jQuery] Re: Only show 5 list item, hide the rest?

2009-03-11 Thread mkmanning
And that's what I get for skipping the middle; basically the same solution as tres, just less code (and it works in IE6) :) On Mar 11, 11:21 am, mkmanning wrote: > Here's a completely different (and admittedly problematic) approach. > Instead of creating new markup with a se

[jQuery] Re: Only show 5 list item, hide the rest?

2009-03-11 Thread mkmanning
Here's a completely different (and admittedly problematic) approach. Instead of creating new markup with a separate list, you could 'hide' the LI's over a certain number with CSS, and then animate the container. Here's a quick example: JS: $(document).ready(function(){ var ul = $('#myList

[jQuery] Re: Get Textbox-value and write to table-cell ()

2009-03-11 Thread mkmanning
> I personally find this kind of string munging difficult to read and > maintain.  Could just be personal preference though.  Good luck. > > Josh Powell > > On Mar 10, 10:39 pm, Eric Gun wrote: > > > @mkmanning: Well done!! Your script works well. Thanks, and great > >

[jQuery] Re: Update DIV

2009-03-11 Thread mkmanning
In the docs under Ajax, see the load() method. http://docs.jquery.com/Ajax http://docs.jquery.com/Ajax/load#urldatacallback On Mar 11, 8:44 am, "so.phis.ti.kat" wrote: > Hello Everyone, > > I am looking to see if I should switch to jQuery but first need to > find jQuery's equivalent to Prototype

[jQuery] Re: add to

2009-03-11 Thread mkmanning
Not sure if this might be related to your problem: http://groups.google.com/group/jquery-dev/browse_thread/thread/6d3de70e6f2c6ebe/908edb7729c03a3c?lnk=raot I'd suggest trying to add a LI to the UL using standard DOM methods: var li = document.createElement('li'); li.appendChild(document.createTe

[jQuery] Re: add to

2009-03-10 Thread mkmanning
@Elmar, there's nothing wrong with your jQuery; there is with Joseph's: creating a closing LI won't work :( Could you show where in your script you're trying to append the LI? On Mar 10, 4:03 pm, Joseph Le Brech wrote: > $("").appendTo("#myList").html("Please show up"); > > the one you used tho

[jQuery] Re: Undefined function

2009-03-10 Thread mkmanning
Two suggestions: 1. Don't use inline onclick="..., separate your behavior by using .click(function(){}) or .bind('click', function(){}) as you're doing inside the showMe() function 2. IDs cannot begin with a number, it's invalid HTML. It might be helpful if you gave a more complete sample of your

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

2009-03-10 Thread mkmanning
@Alwin, it seems like all you're doing is abstracting my original suggestion of storing the original value in the data object for the corresponding input into another method that then uses the data method (e.g. the holdData function has my original suggestion as its only content). I'm not seeing f

[jQuery] Re: First jQuery Plugin

2009-03-10 Thread mkmanning
Hyphens are perfectly valid in IDs: HTML 4 spec section 6.2 says, "ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".")." XHTML spec section C.8 says, "Note that the c

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

2009-03-10 Thread mkmanning
Haven't tried it but you could use my getAttributes plugin (http:// plugins.jquery.com/project/getAttributes) to store the current attributes in the data as I suggested, and then retrieve it later. That would get you not only the value but all other attributes. $(document).ready(function(){

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

2009-03-10 Thread mkmanning
Rather than create a global object, why not just take advantage of the jQuery data method and store the original value with its corresponding form element: $(":input").each(function(){ $(this).data('origVal',this.value) }); On Mar 10, 11:02 am, MorningZ wrote: > You forgot an important

[jQuery] Re: Getting text from a div

2009-03-10 Thread mkmanning
That would be the same as RobG's: div.firstChild.data; where this.$windowTitleBar[0] = the containing div (although it's unclear how you'r getting this.$windowTitleBar[0]) $('.window-titleBar')[0] will get the element from the jQuery selector. Using .firstChild.data on that will work but is de

[jQuery] Re: blur(). not working good enough

2009-03-10 Thread mkmanning
), and then call the focus () method on it. Note that the latter is different than the jQuery focus() method, which attaches an onfocus() event handler, whereas .focus() on the input element itself simply focuses it (same for blur()) Hope that's all clear :) On Mar 10, 7:54 am, bart

[jQuery] Re: Getting text from a div

2009-03-09 Thread mkmanning
That works too :), although much more dependent upon your markup. On Mar 9, 7:10 pm, RobG wrote: > On Mar 10, 9:14 am, bawestcott wrote: > > > I am using the jquery windows plugin and i would like to be able to > > get the title of each window that is created. An example of the html > > that th

[jQuery] Re: Getting text from a div

2009-03-09 Thread mkmanning
There's at least one plugin (http://plugins.learningjquery.com/ textchildren/); you might want to search the plugin repository. If you aren't going to take advantage of it's other features, and don't want to incur an additional http request just for this, you can do it with jQuery: $.trim($('div.

[jQuery] Re: blur(). not working good enough

2009-03-09 Thread mkmanning
Typo: last line should be: edit.val(spn.text()).show()[0].focus(); otherwise you'll grab text outside the span. On Mar 9, 5:07 pm, mkmanning wrote: > A couple of notes. Rather than create and then re-create the input and > span with every double-click and constantly reattach the

[jQuery] Re: blur(). not working good enough

2009-03-09 Thread mkmanning
A couple of notes. Rather than create and then re-create the input and span with every double-click and constantly reattach the blur event, you can just create the input once, and then show/hide the span/input. Here's a suggested refactoring: //turn all titles into textfields $('ul li').dblclick

[jQuery] Re: Jquery.param encoding wrong

2009-03-09 Thread mkmanning
%C3%A9 is the correct percent encoding for URIs using UTF-8 code units. I suspect you're using escape()/unescape() instead of encodeURIComponent (or encodeURI() )/decodeURIComponent (or decodeURI ()). escape() fails to handle non-ASCII characters correctly, so you should avoid the use of escape()

[jQuery] Re: JQuery Sliding Panels

2009-03-09 Thread mkmanning
Those sliding effects are pretty simple to replicate with just some basic jQuery and JavaScript. Plugins are nice for encapsulating functionality that you use often, but many times it's just as easy to write something yourself; it often takes fewer lines of code as well, since you're not having to

[jQuery] Re: How to remove li inside UL

2009-03-09 Thread mkmanning
A jQuery object is array-like; you can access elements with brackets, like $(li)[0]. However, that will return the element. If you want to use a jQuery method with that element, you need to wrap it with $(). Joseph's second example will work (his first will fail for the same reason). There are sev

[jQuery] Re: inserted html content doesn't respond to events?

2009-03-07 Thread mkmanning
Forgot to mention, your id for your anchor is invalid; it should begin with a letter (which is why I changed it in the code above). On Mar 7, 9:12 pm, mkmanning wrote: > You can also create your html in jQuery such that you can bind your > event at the time: > > $('').a

[jQuery] Re: inserted html content doesn't respond to events?

2009-03-07 Thread mkmanning
You can also create your html in jQuery such that you can bind your event at the time: $('').attr({'id':'id_1','href':'#'}).addClass('test2').text('test again').click(function(){ event.preventDefault(); alert($(this).attr("id")); }).appendTo('#testing'); On Mar 7, 5:19 pm, brian wrote: >

[jQuery] Re: Get Textbox-value and write to table-cell ()

2009-03-07 Thread mkmanning
With the markup example in the OP, use this: var dp = $('#deal-post tbody tr'); dp.find('input[name^=dealAmount]').keyup(function(){ var amount = $(this); $('#deal-summary tbody tr:eq('+dp.index(amount.closest('tr')) +')').find('td.inc-current').text(amount.val()); }); On Mar 7

[jQuery] Re: Adding values from a variable number of select drop downs

2009-03-06 Thread mkmanning
temp is undefined, so you're adding undefined to the first value in your loop. Set temp = 0; Also, unless you're planning on using it elsewhere, you don't need to assign var obj. And, is there any reason you're using document.getElementById("grand_total").innerHTML instead of $ ('grand_total').ht

[jQuery] Re: What do you recommend to generate UUID with jQuery ?

2009-03-05 Thread mkmanning
There's not really a 'recommended way' to generate a UUID with jQuery; that's not what it's about. If you want an actual UUID that conforms* to the standard (8-4-4-4-12) then you can use this: http://af-design.com/services/javascript/uuid/uuid.js *given the limitations of JavaScript On Mar 5, 11

[jQuery] Re: lose focus on txtbox and div, do something

2009-03-05 Thread mkmanning
allow you to do, and what you SHOULD do are two different things. My suggestion is refactor your code to not rely on a DIV having or not having focus. On Mar 5, 8:22 pm, Karl Swedberg wrote: > On Mar 5, 2009, at 11:01 PM, mkmanning wrote: > > > short answer: DIVs can't receive f

[jQuery] Re: lose focus on txtbox and div, do something

2009-03-05 Thread mkmanning
short answer: DIVs can't receive focus() On Mar 5, 6:40 pm, "homien...@gmail.com" wrote: > anyone? > > On Mar 5, 3:27 pm, "homien...@gmail.com" wrote: > > > I have a div with a textbod inside of it. When both of these lose > > focus, so the focus is not on either of them, then I want the div to

[jQuery] Re: Access to restricted error

2009-03-05 Thread mkmanning
In this file http://www.mediafuel.net/test/colts/ajax2/stf.js there is an ajax request to a different domain: http://www.colts.com/email_virtualtour.cfm On Mar 5, 11:49 am, Michael Lawson wrote: > Your URL's look ok, so I don't think its a same origin policy issue.  Maybe > its the permissions

[jQuery] Re: Use iFrame like a normal document

2009-03-05 Thread mkmanning
One caveat: contentDocument isn't cross-browser, and (you probably already know this) you can't access the content of an iframe on a different domain. On Mar 5, 11:59 am, ricardobeat wrote: > You need to use the iframe's document as the context > > $('#my_iframe').contents().find('div_im_trying_

[jQuery] Re: .clone a form

2009-03-05 Thread mkmanning
o my HTML, > but it is time to accept the solution at hand and move on. Even if it > is not perfect. > > Thanks everyone. > > On Mar 5, 10:23 am, mkmanning wrote: > > > Your code works fine without the .html(). If you're trying to log what > > you get, then it w

[jQuery] Re: Cross domain call using JQuery

2009-03-05 Thread mkmanning
my application however, when i try to call my > struts application url, it is not working. > > do i need to do any configuration for this? > > Once again Thanks for you quick response. > > On Mar 4, 9:42 pm, mkmanning wrote: > > > You don't have to go any furt

[jQuery] Re: .clone a form

2009-03-05 Thread mkmanning
Your code works fine without the .html(). If you're trying to log what you get, then it will say 'object', which is to be expected. On Mar 5, 8:18 am, "Rick Faircloth" wrote: > Possible work-a-around... > > Enclose your form in a div, say "form..., > and clone the div...? > > Rick > > -Origi

[jQuery] Re: Current item child index ?

2009-03-05 Thread mkmanning
As MorningZ said, use .index(). When you have a collection of elements in a jQuery object, use .index() and pass the element you wan the index of to the function. var stepslist = $("#stepsList li"); stepslist.click(function() { // load stepContent ===> not a problem $("#stepFoote

[jQuery] Re: Getting an iframes title?

2009-03-04 Thread mkmanning
case anyway). On Mar 4, 8:55 am, Shedokan wrote: > not fair! :) > > ok thanks for the info, any other way to get it? > > On 4 מרץ, 18:43, mkmanning wrote: > > > You can't if it's on a different domain. > > > On Mar 4, 8:20 am, Shedokan wrote: >

[jQuery] Re: Getting an iframes title?

2009-03-04 Thread mkmanning
You can't if it's on a different domain. On Mar 4, 8:20 am, Shedokan wrote: > I have an iframe and I want to get it's title: >         >                 http://google.com"; width="100%" height="100%" > style="display:block" marginwidth="0" marginheight="0" hspace="0" > vspace="0" frameborder="0

[jQuery] Re: Cross domain call using JQuery

2009-03-04 Thread mkmanning
You don't have to go any further than the docs: http://docs.jquery.com/Ajax/jQuery.getJSON#urldatacallback Run the flickr example and you'll see how JSONP works. In a nutshell, to get around crossdomain security issues, the getJSON call creates a script tag whose URL is the getJSON url, and the co

[jQuery] Re: what's better?

2009-03-04 Thread mkmanning
In the second one, myEl is already a jQuery object, so there's no reason to wrap it in $(), you could just use myEl.each(). However, since all you're doing is adding a handler for the click event, there's no reason to iterate over the elements so the first one is most appropriate. On Mar 4, 7:06 

[jQuery] Re: Determine which radio button (if any) is selected on form load.

2009-03-04 Thread mkmanning
is does not work: (It returns "Undefined") > > $(document).ready(function() { > >          console.log($('#ItemList input:radio:checked').val()) > > > }); > > > Here is the (with the coldfusion loop) > > > > >         > >

[jQuery] Re: next() question

2009-03-04 Thread mkmanning
next() finds the the unique next siblings for that element (in this case their are none). You want the that is the child of the element's parent's next sibling, which takes longer to write in English than in jQuery :) $('a.tab-menu-item-selected').parent().next().children(); nb this assumes th

[jQuery] Re: How do you handle 2 differents and 1 action?

2009-03-03 Thread mkmanning
You can just make "perform the action" a separate function and then call it from the two events function performAction(){ //do stuff } $("#text_input").keyup(function(e) { // Checks if the Enter key was entered if(e.keyCode == 13) { performAction(); } });

[jQuery] Re: Determine which radio button (if any) is selected on form load.

2009-03-03 Thread mkmanning
The problem with an id on the input is there are several inputs, and you need to find which one is checked. If you're containing div is #itemList then this should work if you want the value: $('#itemList input:radio:checked').val() On Mar 3, 5:37 pm, James wrote: > Oops, I forgot the id in the

[jQuery] Re: converting HTML to XML using jQuery

2009-03-03 Thread mkmanning
@Dreed, could you maybe be a little more specific about why you need to do this in jQuery? A recursive function would be trivial (I can't see how it's brute force) and you could make it generic such that 'tags' are created out of the classnames, no matter what they are. On Mar 3, 3:53 pm, ricardo

[jQuery] Re: Automatically slide all divs up when one slides down

2009-03-03 Thread mkmanning
You could simplify your code to this (assuming you're adding/removing the classes for selection only and not styling): $(".question").click(function(){ $(this).children('.answer').slideToggle().end().siblings ('div.question').children('.answer').slideUp(); }); One thing you'll note howev

[jQuery] Re: Moving from .get(xml file) to using .ajax

2009-03-03 Thread mkmanning
thoughts on that one, or if you can eyeball the second part of the > code and let me know if there's something goofed? > > Thanks, > > Dan > > On Mar 3, 10:44 am, mkmanning wrote: > > > You're still going to run into the issue of caching for requests to >

[jQuery] Re: checkbox array

2009-03-03 Thread mkmanning
You don't need to escape them, $('input:checkbox[name=foo[]]:checked').serialize() works as well. If you want the brackets instead of %5B%5D just use unescape: unescape($('input:checkbox[name=foo[]]:checked').serialize()); Either way it's ugly ;) On Mar 3, 6:47 am, dabear wrote: > If you real

[jQuery] Re: Moving from .get(xml file) to using .ajax

2009-03-03 Thread mkmanning
You're still going to run into the issue of caching for requests to the same URL, even using ajax. The usual solution, as Ryan suggested, is to append changing data to the querystring of the ajax request, usually in the form of a timestamp: "the_querystring"+new Date ().getTime() As of jQuery 1.2

[jQuery] Re: Wrapping tags that are not decendents

2009-03-02 Thread mkmanning
$('a.myclass:not(div.otherclass a.myclass)'); On Mar 2, 7:48 pm, ml1 wrote: > I am trying to figure out how to wrap "all a tags that are class > myclass but are not descendents of divs that are class otherclass". > > ie > match this: > > > match this: > > > but not this: > > > Something like

[jQuery] Re: SIMPLE (newbie) selecting TDs

2009-03-02 Thread mkmanning
$('.vfOptions tr td:nth-child(3)').addClass('status'); On Mar 2, 7:15 pm, alanfluff wrote: > Hi, > > I am embarrassed to say I can't find a way to select the third cell in > each row of a table and add a class to it. > > I tried this: > >         $('.vfOptions tr td').eq(2).addClass('status'); >

[jQuery] Re: checkbox array

2009-03-02 Thread mkmanning
7;t have to? I don't think this debate is going to end unless some new information comes to light, but in deference to keeping the topic of these posts to jQuery, I will promise to not bring this up again (nobody's giving me any nickels anyway). On Mar 2, 7:03 pm, Matt Kruse wrot

[jQuery] Re: IE no error tracking, jquery not working

2009-03-02 Thread mkmanning
http://www.microsoft.com/downloadS/details.aspx?familyid=E59C3964-672D-4511-BB3E-2D5E1DB91038&displaylang=en http://blogs.msdn.com/ie/archive/2007/01/09/ie-developer-toolbar-beta-3-now-available.aspx Still a far cry from Firebug. On Mar 2, 4:58 pm, DBJDBJ wrote: > "Something like Firebug for IE

[jQuery] Re: checkbox array

2009-03-02 Thread mkmanning
-]* should be used. See Section 6.2 of [HTML4] for more information." Could you post links to some of these discussions? On Mar 2, 2:30 pm, Matt Kruse wrote: > On Mar 2, 1:32 pm, mkmanning wrote: > > > And (if I had a nickel for every time I've said this), using [] in the > > n

[jQuery] Re: serialize array question for dynamic form

2009-03-02 Thread mkmanning
You need a 'name' attribute on your inputs. On Mar 2, 3:56 pm, Matt wrote: > Hi, > > If i create a dynamic form(requirement for a project) serializeArray() > or serialize() doesn't seem to work. Is there any reason why this is? > > Here's a simple example. neither function returns anything. > >

[jQuery] Re: checkbox array

2009-03-02 Thread mkmanning
$('input:checkbox[name^=foo]:checked').serialize() And (if I had a nickel for every time I've said this), using [] in the name isn't valid; any framework that requires you to compromise your markup is a deficient framework IMO. On Mar 2, 6:17 am, MorningZ wrote: > Well the variable is undefin

[jQuery] Re: help please! I get status 0 and responsText is null

2009-03-02 Thread mkmanning
How are you initiating the ajax request? On Mar 2, 10:04 am, Tonygale wrote: > here is source code. In my javascript function I use jquery to make a ajax > call. myurl is a jsp in localhost which will output a xml. However i got > status 0(not 200). What happen? > $.ajax({ >         type:"POST",

[jQuery] Re: Cycle Plugin and Loading Images

2009-03-02 Thread mkmanning
Yeah, which kinda touches on my question about knowing the src urls in the ajax slideshow question. Preloading is easy: var imgs = ['http://farm3.static.flickr.com/ 2044/2338755310_f3e2a70edc_o.jpg','http://farm1.static.flickr.com/ 162/399719318_c5c5ff44be_o.jpg','http://farm1.static.flickr.com/

[jQuery] Re: css method on span reports block?

2009-03-02 Thread mkmanning
Just as an FYI, in 1.3.2 (haven't looked at what is done in 1.2.6), this is happening at lines 808-811: var computedStyle = defaultView.getComputedStyle( elem, null ); if ( computedStyle ) ret = computedStyle.getPropertyValue( name ); Note that in IE, getting the display at this point r

[jQuery] Re: Selecting a span within a cell

2009-03-02 Thread mkmanning
$('#blah').parents('td').prev().find('span.Validator') On Mar 2, 8:14 am, RWF wrote: > Given this structure: > >         >             >                   *hello >             >             >                 >             >         >     > > If i only know the ID of the checkbox input,

[jQuery] Re: parent load question

2009-03-02 Thread mkmanning
t; > JM > > On Mar 1, 9:32 pm, Ami wrote: > > > If it's not on the same domain you must use JSONP. > > > On Mar 2, 7:27 am, mkmanning wrote: > > > > I'll go ahead and ask this here as well: is 'http://test.com/ &

[jQuery] Re: create table ID's from index

2009-03-02 Thread mkmanning
the cell contents, just can't get the variable and the index to > create one output selector tried ...tr alone... then tr td, tr td text > tried them all with .val(), .text() and .html() tried the this function with > a variety of configs also i seem to be close but my strengths

[jQuery] Re: JQuery Won't Read remote xml via proxy.. but will read local xml

2009-03-01 Thread mkmanning
The proxy file is being returned as text/html and not text/xml. On Mar 1, 4:00 pm, KrushRadio - Doc wrote: > Okay, I tried using Troy Wolf's Proxy php page...  It's a little more > than what i needed, but it works just fine. > > I think this is something with JQuery itself...  For anyone who wan

[jQuery] Re: Code Simplifying Help

2009-03-01 Thread mkmanning
If your markup will remain as you've shown, you can get away with this: $('select[id^=Branch]').change(function(){ var _this = $(this); ajax_loading_image('.ajax_loading_image'); _this.parent().next().load('get_members',{'ajax':true,'id':_this.val ()},funct

[jQuery] Re: create table ID's from index

2009-03-01 Thread mkmanning
is working fine, problem is getting my text out of the td to work > , the index is working fine > mkmanning wrote:If I read you right, you're trying to assign an ID to the > table and it doesn't already have one? If that's the case, you reference the > table's id in:

[jQuery] Re: Change CSS depending on page you're on

2009-03-01 Thread mkmanning
e the page name and set the css to whatever element that has that ID > as the page name's CSS. > > thought about that, and to me that's the best way to to it if going the > javaScript route.  thanks a lot! > > > > mkmanning wrote: > > > When a user clicks

[jQuery] Re: Change CSS depending on page you're on

2009-03-01 Thread mkmanning
t; > 1) User clicks a hyperlink, it calls that javascript method which sets some > css class > 2) user is redirected to whatever page that hyperlink represented > 3) you just lost the css that you changed when the user clicked the > hyperlink > > > > mkmanning wrote: > >

[jQuery] Re: create table ID's from index

2009-03-01 Thread mkmanning
If I read you right, you're trying to assign an ID to the table and it doesn't already have one? If that's the case, you reference the table's id in: this.id = country_name +this.id + i; so unless the table already has an id, the second this.id will be undefined. On Mar 1, 10:04 pm, Charlie To

[jQuery] Re: IE no error tracking, jquery not working

2009-03-01 Thread mkmanning
>From your code snippet, it looks like the $(document).ready() isn't closed. On Mar 1, 9:35 pm, frodosghost wrote: > From what I have seen, I have run into a fun error to get. It seems > that something to do with my jquery is breaking IE, but I cannot find > out what it is. So far the code works

[jQuery] Re: Slideshow Using Ajax

2009-03-01 Thread mkmanning
@Nic, can you explain what you're trying to acheive? If you know the images' urls, then you can just cycle through them and update an img tag's src attribute for a slideshow. On Mar 1, 8:57 pm, Ami wrote: > There is no way to load images in AJAX. AJAX is only for text (Like JS/ > CSS/JSON/XML,..

[jQuery] Re: Load External an DIV within the same DIV.. without tabs

2009-03-01 Thread mkmanning
You can use the new live function http://docs.jquery.com/Events/live#typefn or you can just bind a click event on a containing div and use event delegation by getting the target: //your ajax content here $('#container').click(function(e){ e = $(e.target); if(e.is('a')){

[jQuery] Re: load remote file in parent element (which is a td cell)

2009-03-01 Thread mkmanning
Is 'http://remotefile.html' the same domain? On Mar 1, 5:32 pm, joshm wrote: > I'm having trouble getting this to work (perhaps it can't be done), > basically I want to access an element and I know it's parent is going > to be a node and then I want to populate the (or > innerhtml) with the co

[jQuery] Re: load remote file in parent element (which is a td cell)

2009-03-01 Thread mkmanning
Sorry if this repeats but it didn't appear to post. Is 'http:// remotefile.html' in the same domain? On Mar 1, 5:32 pm, joshm wrote: > I'm having trouble getting this to work (perhaps it can't be done), > basically I want to access an element and I know it's parent is going > to be a node and t

[jQuery] Re: parent load question

2009-03-01 Thread mkmanning
I'll go ahead and ask this here as well: is 'http://test.com/ remote.html' in the same domain? On Mar 1, 8:55 pm, Ami wrote: > Try to put between and #myelemnt > > >   > > > Aminadav > On Mar 2, 4:15 am, joshm wrote: > > > Can someone explain how to do this, I'm trying to load the parent of

[jQuery] Re: Change CSS depending on page you're on

2009-03-01 Thread mkmanning
in once > you get to that page or else you loose the css that you set due to redirect > oviously. > > > > mkmanning wrote: > > > You can do still do it with asp: > >http://stackoverflow.com/questions/188124/programmatic-solution-to-ch... > > > Or

[jQuery] Re: How to find a parent

2009-03-01 Thread mkmanning
Does it go down all the way to the bottom of the DOM, then up? > > Or does it go up one, down one, up two, down two, etc., until > it finds a match? > > -Original Message- > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On > > Behalf Of mkmanning

[jQuery] Re: Change CSS depending on page you're on

2009-03-01 Thread mkmanning
= pathname.substring(pathname.lastIndexOf('/') +1,pathname.indexOf('.asp')) $('body').addClass(pathname); On Mar 1, 5:47 pm, expresso wrote: > But I'm using a asp.net master page and inheriting it's body.  so my pages > only will have one global body tag. > >

[jQuery] Re: Change CSS depending on page you're on

2009-03-01 Thread mkmanning
Unless your only option is to resort to JavaScript, this is something you could do with CSS alone, if you put an id or class on the body tag for each page and just rely on the CSS hierarchy to change the style for each list item. It also has the advantage of working immediately, instead of waiting

[jQuery] Re: How to find a parent

2009-03-01 Thread mkmanning
gt; > On > > > Behalf Of Rick Faircloth > > Sent: Sunday, March 01, 2009 12:26 AM > > To: jquery-en@googlegroups.com > > Subject: [jQuery] Re: How to find a parent > > > Thanks for the tip! > > > Rick > > > -Original Message- > > From: jq

<    1   2   3   4   >