[jQuery] A function I wrote that you might find useful (populateFieldsWithJson)

2008-02-21 Thread skeen
I needed a simple method to populate field names with corresponding data from a database (for an edit entry interface). So I wrote the following function, which accepts 3 arguments: the ajax get request url, the form id, and new text for the form's submit button, if required: function

[jQuery] Re: IE problems with prepend since 1.2.3?

2008-02-21 Thread jody
Actually, I jumped the gun too soon I found out after more testing today. Elements are being prepended fine--the MS debugger is giving a false error. Instead, what's happening is IE doesn't like my ajaxStop call for whatever reason (well, it's likely a race condition that IE stumbles over but

[jQuery] find all cells with only text as children

2008-02-21 Thread dustin.c
I have a series of nested tables and i want to addClass() to the cells that are holding only text ( not ones that are holding more tables ). Any ideas on how to select those?

[jQuery] Re: how to remove a behavior?

2008-02-21 Thread Bernard
I think unbind() does just that : http://docs.jquery.com/Events/unbind#typedata [EMAIL PROTECTED] a écrit : Hi, I have this function ... function defineBehaviors() { $('a.deleteWorksheetItem').click( function() { alert(Executing action);

[jQuery] Re: before() and after() does not work on unclosed tags?

2008-02-21 Thread John Resig
I think you want .wrap(): $(#somediv).wrap('tabletrtd/td/tr/table'); --John On Thu, Feb 21, 2008 at 8:38 PM, jquertil [EMAIL PROTECTED] wrote: hello again... why would this work... $('#somediv').before('I am just text').after('I am also just text'); result: I am just textdiv

[jQuery] Re: jquery and math functions

2008-02-21 Thread Shawn
Yep - parseInt() or parseFloat(). When you are pulling data from HTML you will get something like 55 rather than 55 (notice the quotes). So then doing something like this: var count = $(#mydiv).text() + 100; WOuld result in count being set to 55100 (assuming the div had 55 in it). Also,

[jQuery] Re: Break out of a for loop.

2008-02-21 Thread Shawn
for (var x = 0; x 10; x++) { if ( x 5) { break; } } Shawn Alex wrote: Hi, I am this script: for (var i=0; i 6; i++) { $('a#chan'+i).click(function(){ for (var j=0; j6; j++) {

[jQuery] Re: find all cells with only text as children

2008-02-21 Thread Karl Swedberg
This might do it... $('td:not(:has(table))').addClass('something') --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Feb 21, 2008, at 8:39 PM, dustin.c wrote: I have a series of nested tables and i want to addClass() to the cells that are holding only

[jQuery] Re: before() and after() does not work on unclosed tags?

2008-02-21 Thread Karl Rudd
Something to realise is that once the browser loads your HTML it turns it into a tree (the DOM, Document Object Model) of nodes. One thing that may help visualise this is to open up the page in Firefox and Inspect the page to see what the browser is doing with the HTML and then with the

[jQuery] Re: Can't Add a checked=checked Attribute to Input tag

2008-02-21 Thread Karl Rudd
Have you tried $(...).attr( 'checked', true ) ? Karl Rudd On Fri, Feb 22, 2008 at 9:56 AM, Joe [EMAIL PROTECTED] wrote: Very simply, I want this function to attach the attribute checked=checked to the input with the id=ext[agree]Y. The following code does not do this and I'm not sure

[jQuery] Re: How could I pass an object into an eval statement

2008-02-21 Thread Karl Rudd
Welcome to the wonderful world of closures (which double as functions in JavaScript), you've been using them already (perhaps without know it) :). The setTimeout function will actually take a function rather than a string (which it then 'eval's): function someFunction( obj ) { var

[jQuery] Re: Form submission without reloading modal window

2008-02-21 Thread Shawn
Ajax. There is a handy plugin out there - ajaxForms (I think...) that will allow your existing form to be submitted via ajax, and a callback function executed with the resulting page output. I haven't used it, so probably have the name, and details wrong. (I just write my own Ajax routines

[jQuery] Re: JQuery site is blank for one user

2008-02-21 Thread Shawn
Does the user control his network and firewall/internet connections? Or is he an employee on a network with an IT staff? I ask because it is possible that he is getting stuck with cached pages via a proxy server, or the network/firewall could be doing content filtering and getting hit at

[jQuery] Re: Form submission without reloading modal window

2008-02-21 Thread Shawn
my bad - the plugin I mentioned is called the Form Plugin http://plugins.jquery.com/project/form Shawn Shawn wrote: Ajax. There is a handy plugin out there - ajaxForms (I think...) that will allow your existing form to be submitted via ajax, and a callback function executed with the

<    1   2