[jQuery] Calling other functions inside a function

2009-07-21 Thread evanbu...@gmail.com
This is probably more of a basic javascript question than a specific jquery function. I have this jQuery function named validateSubmit() which calls two other regular javascript functions. When using IE, both createCharts() and getDirectorIDs get called but when using FireFox, only createCharts(

[jQuery] Re: Calling other functions inside a function

2009-07-21 Thread evanbu...@gmail.com
createCharts(); ? > > On 21 Jul, 19:53, Glazz wrote: > > > > > Hi, > > > Can you please post the function that is not working in Firefox > > please? > > > Regards > > > On 21 Jul, 19:48, "evanbu...@gmail.com" wrote: > > >

[jQuery] Re: Calling other functions inside a function

2009-07-22 Thread evanbu...@gmail.com
our code here >         console.log(2); >         // some more of your code here >         console.log(3); >         // and some more of your code here >         console.log(4); >     } > > By watching the Firebug console, you will then be able to see which of your > consol

[jQuery] Toggle Div Based on Value

2009-07-22 Thread evanbu...@gmail.com
Hi I'm not sure how to approach this. I want to toggle each div with a checkbox or hyperlink which shows/hides every div where the RelStatus value = 'retired'. I'm able to see the value of each RelStatus value using the code below. The id of each div and the RelStatus value of each span is set s

[jQuery] Re: Calling other functions inside a function

2009-07-22 Thread evanbu...@gmail.com
> and whether one believes in rebirth or not, > there isn't anyone who doesn't appreciate kindness and compassion..' > >   From:       "evanbu...@gmail.com"                     >                                                   > >   To:         &q

[jQuery] Re: Calling other functions inside a function

2009-07-22 Thread evanbu...@gmail.com
n its ready.  Not to actually > define the function :) > > cheers > > Michael Lawson > Development Lead, Global Solutions, ibm.com > Phone:  1-276-206-8393 > E-mail:  mjlaw...@us.ibm.com > > 'Whether one believes in a religion or not, > and

[jQuery] Re: Calling other functions inside a function

2009-07-22 Thread evanbu...@gmail.com
elieves in a religion or not, > and whether one believes in rebirth or not, > there isn't anyone who doesn't appreciate kindness and compassion..' > >   From:       "evanbu...@gmail.com"                     >          

[jQuery] Re: Toggle Div Based on Value

2009-07-23 Thread evanbu...@gmail.com
f value == retired, do this" > > > > evanbu...@gmail.com wrote: > > Hi > > > I'm not sure how to approach this. I want to toggle each div with a > > checkbox or hyperlink which shows/hides every div where the RelStatus > > value = 'retired'

[jQuery] Re: Toggle Div Based on Value

2009-07-23 Thread evanbu...@gmail.com
ction(){ >         var checkValue = $(this).parents("div").attr("value"); > >         if (checkValue == 'Retired'){ >                 $(this).parents("div").toggle(); >         } > return false; > > }); > > You will see the parent

[jQuery] Re: Toggle Div Based on Value

2009-07-23 Thread evanbu...@gmail.com
l need to see your html to see why, but I suspect it's because you > targeted a specific id #table1.RelStatus. > > > > evanbu...@gmail.com wrote: > > Very cool.  This is what I have now but it only hides the first div > > containing the RelStatus value = 'Re

[jQuery] Hiding table rows based on value

2009-09-03 Thread evanbu...@gmail.com
Hi I have a checkbox that when clicked I want to hide all of the entire rows in my table where those fields with a class of internalField equals True. The hiding part works well but when I uncheck the checkbox the rows do not become visible again. So I guess my question is how do I toggle the v

[jQuery] Re: Hiding table rows based on value

2009-09-03 Thread evanbu...@gmail.com
alert("Showing only product fields"); $(this).parent().css('visibility', 'hidden'); } }); }); }); On Sep 3, 10:30 am, "evanbu...@gmail.com" wrote: > Hi > > I have a checkbox that when clicked I w

[jQuery] Load external content into popup

2009-09-21 Thread evanbu...@gmail.com
My function loads content from an external page (field.details.preview.aspx) and loads it into a div named container. I would like to load this external content into a popup page instead. I'm not sure how to tackle this. Thanks $(document).ready(function() { $(".Id_Field").click(funct

[jQuery] Checking/unchecking parent checkbox

2009-09-28 Thread evanbu...@gmail.com
Hi I've been using jQuery a couple of months and I'm really having a blast with it but need a little help with this problem. I have a table of records generated from a database that looks like this. Each record has a checkbox with a unique id followed by a person's name and employment status.

[jQuery] Re: Checking/unchecking parent checkbox

2009-09-28 Thread evanbu...@gmail.com
I thought this would do it but no luck $(this).parents("checkbox:first").attr('checked', false); On Sep 28, 2:42 pm, "evanbu...@gmail.com" wrote: > Hi > > I've been using jQuery a couple of months and I'm really having a > blast with it bu

[jQuery] Re: Checking/unchecking parent checkbox

2009-09-29 Thread evanbu...@gmail.com
Anyone? I've been working on this for hours and can't come up with a solution. Thanks On Sep 28, 3:13 pm, "evanbu...@gmail.com" wrote: > I thought this would do it but no luck > > $(this).parents("checkbox:first").attr('checked', false); >

[jQuery] Re: Checking/unchecking parent checkbox

2009-09-30 Thread evanbu...@gmail.com
checkbox]').attr('checked','checked'); > > On Tue, Sep 29, 2009 at 6:09 AM, evanbu...@gmail.com > wrote: > > > > > > > > > Anyone?  I've been working on this for hours and can't come up with a > > solution.  Thanks > &

[jQuery] Toggle Text

2009-06-25 Thread evanbu...@gmail.com
Hi I'm using this to check/uncheck a group of checkboxes which works fine. However, when all of checkboxes are checked, I would like the span id="CheckAll" to read "Uncheck All" and to toggle back to "Check All" when all of the boxes are unchecked. $(document).ready(function() {

[jQuery] check/uncheck all checkboxes with specific id

2009-06-30 Thread evanbu...@gmail.com
I want to check all of my checkboxes in my form that have an id that begins with 'chkEvent'. Thanks $(document).ready(function() { $("#toggleEvents").click(function(event){ $('inp...@type=checkbox]').each( function() { // Begin this is where I am lost if($(this).id()==

[jQuery] Re: check/uncheck all checkboxes with specific id

2009-06-30 Thread evanbu...@gmail.com
x27;checked'); > > }) > > Would do what you're asking. > > If you insist on doing it with the IDs, you can always just substr: > > if ($(this).attr('id').substr(0, 8) == 'chkEvent') ... > > But this method is far less efficient, and

[jQuery] Changing background color of table cells

2009-12-05 Thread evanbu...@gmail.com
I have a table with an id of Directorships and I want to add the class bgHighlight to any cell with a value of 'D'. This code below works fine for an entire table but I just want to apply this logic to a single column of the same table rather than the whole table. Thanks. $('#Directorships tr').e

[jQuery] Re: Changing background color of table cells

2009-12-05 Thread evanbu...@gmail.com
first-child or :last-child, respectively. > > --Karl > > > Karl Swedbergwww.englishrules.comwww.learningjquery.com > > On Dec 5, 2009, at 12:50 PM, evanbu...@gmail.com wrote: > > > > > I have a table with an id of Directorships and I want to add the clas

[jQuery] Filtering table cell values

2009-12-06 Thread evanbu...@gmail.com
I'm using this code hightlight any table cell in the 12th column with a value of zero which works well. //SharesHeld jQuery('#Directorships tr').each(function() { jQuery('#Directorships td:nth-child(12)').filter(function() { if (jQuery(this).text() == 0) jQu

[jQuery] Re: Remove css attribute from the DOM element

2009-12-06 Thread evanbu...@gmail.com
I like to use the addClass method rather than embed CSS in my js code. I find it easier to maintain. $('td').addClass('myCSSClass'); $('td').removeClass('myCSSClass'); On Dec 6, 6:09 pm, Joshua Partogi wrote: > Hi all, > > What is the cleanest approach to remove a css attribute from the DOM el

[jQuery] Re: Remove css attribute from the DOM element

2009-12-06 Thread evanbu...@gmail.com
I like to use CSS classes in an external stylesheet and then use the addClass method. I find the maintenance much easier this way. $('td').addClass('myCSSClass'); to remove the CSS Class $('td').removeClass('myCSSClass') On Dec 6, 6:09 pm, Joshua Partogi wrote: > Hi all, > > What is the cl

[jQuery] Re: Filtering table cell values

2009-12-07 Thread evanbu...@gmail.com
> > I suggest that you set a class ('Retired' or 'Active') on your 7th > cell instead of relying on a comparison of the string content. That > would also make it much simpler to select rows for highlighting. > > > > On Sun, Dec 6, 2009 at 5:55 PM, evanbu...

[jQuery] AND OR Expression

2009-12-10 Thread evanbu...@gmail.com
I having trouble with this line if (td4th.text() > '4') || (td4th.text() > '2' && (activeCEO == 'Yes')) In plain English, I want it to be true if td4th > 4 OR td4th > 2 AND activeCEo = 'Yes' Thanks $('#tblBoardDirectors tr').each(function() { var relStatus = ($('td:nth-child

[jQuery] Re: AND OR Expression

2009-12-10 Thread evanbu...@gmail.com
ddClass(bgColor); but once I add the rest beyond the || operator it doesn't. On Dec 10, 1:29 pm, "Richard D. Worth" wrote: > Convert with parseInt and then compare int to int instead of strings > > https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Gl

[jQuery] Re: AND OR Expression

2009-12-10 Thread evanbu...@gmail.com
> number, which *still* isn't going to work... > > and this line doesn't make any sense > > var td4th = parseInt($('td:nth-child(4)', jQuery > (this))); > > as you are parseInt-ing a jQuery object > > On Dec 10, 2:36 pm, "evanbu...@gmail.com&quo

[jQuery] Column total

2009-12-28 Thread evanbu...@gmail.com
Column Total I am using this bit of code to add the values in a table column which works pretty well until it encounters a null td cell with a   value. From that point on in the loop, I receive a NaN error in my alert. I'm wondering how to ignore these non-numeric values or replace them with zer

[jQuery] Re: Column total

2009-12-28 Thread evanbu...@gmail.com
Yes, that's very helpful and works perfectly. thanks On Dec 28, 12:55 pm, Shawn wrote: > > jQuery(function() { > >         var MarketCapTotal = 0; > >         // loop through the table > >    jQuery('#grdWatchlistname tbody tr').each(function() { > >    // replace the dollar signs and commas > >

[jQuery] Placing .get method results in a div tag

2008-12-18 Thread evanbu...@gmail.com
Hi I've been using jQuery all of about 12 hrs now. I want to place the results I get back from results.aspx into the div "results" rather than alert it out. Thanks. function addNumbers() { var number1 = $('#number1').attr('value'); var number2 = $('#number2').at