Re: [jQuery] fadeToggle

2007-03-17 Thread sunsean
$.toggle(function1,function2) is already a built in function to a make
a clicking toggle on the element specified. I do agree that there
needs to be a more unified toggleName for the toggled elements, or
perhaps an additional function that can toggle jQuery
properties/actions.

~Sean

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] slideDown/slideUp problems when using tables

2007-03-17 Thread Kush Murod
Hi,

I am experiencing weird behaviour when using slideDown/slideUp on tables 
opposed to using divs.
Has anyone experienced anything like this before.

I'd rather use tables to create something like this 
http://www.khurshid.com/sebs/?page=portfolio, because css for this 
purpose is just a nuisance

Cheers,
Kush

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] bgiframe update, sneak peak

2007-03-17 Thread Joel Birch
On 15/03/2007, at 2:41 AM, Brandon Aaron wrote:
 Okay ... I've got a sneak peak of the new bgiframe plugin here:
 http://brandon.jquery.com/plugins/_bgiframe/test/

 This discussion started in the recent suckerfish plugin thread ...
 basically they ran into an issue where the expressions used by the
 bgiframe plugin slow down animations in IE6. This has been brought up
 before. Hopefully the flexibility provided by the new settings will
 help solve this problem and a few others.

Hi Brandon,

If you recall, the addition of an iframe to the superfish submenus  
interfered with the animations in IE6. You can see this in action on  
my demo page. However, I have found that if I delete this...

filter:Alpha(Opacity=\'0\');

...from your plugin, all the animations work perfectly as per real  
browsers, and the submenus still stay above the select elements. I do  
realise it's possible that this only happens to be a good option in  
my case because I am adding the bgiframe solution only on hover (I  
would remove them on 'hoverOut' too), therefore I don't need to make  
the iframes invisible (I don't see the iframes even though I removed  
that line - I take it the iframe is behind the submenu?).

Would it be possible to add an option to your plugin so that the  
opacity is not applied? That way developers have the option of  
dynamically applying and removing the iframe, allowing animations to  
work on the element the iframe is attached to.

No rush of course - its the weekend :)

Cheers
Joel Birch.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Passing the result of $(body).width(); to $(#element).width(val);

2007-03-17 Thread [ForaysForYou] Commissary
hello all,

I'm very new to JQuery and I'm struggling, I've gone through the 
documentation and I'm still clueless. I am trying to do the following:

Each time the browser window gets resized I want to measure the width of 
the body and use that value to set the width of an element. Here is my 
best attempt (I know this is wrong):

$(#element).width(function() { $(body).width(); } );

Should I be using variables to store the value? I think I need to use a 
callback but I can't figure it out.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Passing the result of $(body).width(); to $(#element).width(val);

2007-03-17 Thread Abel Tamayo

You don't need to use a function for that, just do:

$(#element).width( $(body).width() );

as $(body).width() returns a value that is used by $(#element).width(
... ). If you still have problems, debug it with
Firebug'shttp://getfirebug.comconsole part by part and check if you
are getting strings from those
functions when you need integers and things like that.

Abel.

On 3/17/07, [ForaysForYou] Commissary [EMAIL PROTECTED] wrote:


hello all,

I'm very new to JQuery and I'm struggling, I've gone through the
documentation and I'm still clueless. I am trying to do the following:

Each time the browser window gets resized I want to measure the width of
the body and use that value to set the width of an element. Here is my
best attempt (I know this is wrong):

$(#element).width(function() { $(body).width(); } );

Should I be using variables to store the value? I think I need to use a
callback but I can't figure it out.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Passing the result of $(body).width(); to $(#element).width(val);

2007-03-17 Thread [ForaysForYou] Commissary
Awesome... working nicely. Thanks Abel, I thought I had already tried 
that combo but obviously not. Can't wait till JQuery gets easier.

Abel Tamayo wrote:
 You don't need to use a function for that, just do:
 
 $(#element).width( $(body).width() );
 
 as $(body).width() returns a value that is used by 
 $(#element).width( ... ). If you still have problems, debug it with 
 Firebug's http://getfirebug.com console part by part and check if you 
 are getting strings from those functions when you need integers and 
 things like that.
 
 Abel.
 
 On 3/17/07, * [ForaysForYou] Commissary* [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:
 
 hello all,
 
 I'm very new to JQuery and I'm struggling, I've gone through the
 documentation and I'm still clueless. I am trying to do the following:
 
 Each time the browser window gets resized I want to measure the
 width of
 the body and use that value to set the width of an element. Here is my
 best attempt (I know this is wrong):
 
 $(#element).width(function() { $(body).width(); } );
 
 Should I be using variables to store the value? I think I need to use a
 callback but I can't figure it out.
 
 ___
 jQuery mailing list
 discuss@jquery.com mailto:discuss@jquery.com
 http://jquery.com/discuss/
 
 
 
 
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] How can I find out if a style class exists?

2007-03-17 Thread Klaus Hartl
Nathan Young -X (natyoung - Artizen at Cisco) schrieb:
 If for some reason you can't do that, you can check to see if they did
 alter the format of the element.  If you are expecting it to be 13px by
 default, you can check:
 
 if (ElementInQuestion.style.fontSize == 13px){whatever}

That will only work if font-size has been declared in the style 
attribute of that element.

You need to use getComputedStyle and its IE counterpart for rules that 
are defined elsewhere. But jQuery already provides an abstraction:

$(ElementInQuestion).css('font-size');

It's getting more complicated if the element in question is not visible, 
e.g. its display property has the value none.


-- Klaus

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] slideDown/slideUp problems when using tables

2007-03-17 Thread Kush Murod
Hi, me again

I meant I need some help with sliding table rows (tr) which doesn't 
slide properly as it does when using divs

Thanks,
Kush

Kush Murod wrote:
 Hi,

 I am experiencing weird behaviour when using slideDown/slideUp on tables 
 opposed to using divs.
 Has anyone experienced anything like this before.

 I'd rather use tables to create something like this 
 http://www.khurshid.com/sebs/?page=portfolio, because css for this 
 purpose is just a nuisance

 Cheers,
 Kush

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
   

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] How could i build 2 steps form with thickbox? - Finished

2007-03-17 Thread JQuery - SimDigital
Tks Erik. That works fine! :-)
The function isn't TB_hide()... in true it is TB_remove().

I used like this:
script
parent.TB_remove();
/script


Erik Beeson escreveu:

 Check out the source for thickbox. There's a function to call that 
 hides it, I think it's TB_hide() or something. You need to call it in 
 the context of the parent page, not the context of the iframe. So from 
 within the iframe, you could do parent.TB_hide() or top.TB_hide().

 --Erik


 On 3/16/07, *JQuery - SimDigital* [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:

 I want to build a 2 steps form with thickbox plugin, but i don't know
 how to do the architecture.

 The problem is that when i finished to fill the 2 steps, i need to
 close
 the thickbox, but i don´t know how...

 PS: I'm using iframe option to jump from step1 to step 2.

 ___
 jQuery mailing list
 discuss@jquery.com mailto:discuss@jquery.com
 http://jquery.com/discuss/


 

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
   
 

 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.5.446 / Virus Database: 268.18.13/725 - Release Date: 17/3/2007 
 12:33
   


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Can't figure out how to put this all together...

2007-03-17 Thread Rick Faircloth
Hi, Daemach.
 
Actually, the line below to the calctest.cfm works somewhat,
but it doesn't function as I want it to. no button to click for
calculation... I prefer that the user have to click a button.
 
Calculations are incorrect.
 
But I really haven't had time to thoroughly evaluate the approach.
This is something very different from every other approach I've been
working on. this was done by John Wilson using Taconite.  He
just put something together for a basic proof-of-concept for me.
 
I've got to take some time to study his approach and the Taconite
plug-in.  Have you used the plug-in?  John's recommending it as
a tag-based bridge for those of used to CF's syntax and trying to
learn jQuery.  What's your take on that?
 
Rick
 
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Daemach
Sent: Friday, March 16, 2007 2:34 PM
To: jQuery Discussion.
Subject: Re: [jQuery] Can't figure out how to put this all together...
 
Looks like it works - is it making more sense now?
On 3/16/07, Rick Faircloth [EMAIL PROTECTED]  wrote:
Oh, and I meant to give you the online demo.
 
http://bodaford.whitestonemedia.com/html/calctest.cfm 
 
Rick
 
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of John Wilson
Sent: Friday, March 16, 2007 12:48 AM
To: discuss@jquery.com
Subject: Re: [jQuery] Can't figure out how to put this all together...
 
A while back, I mentioned to Rey that I thought Mike Alsup's taconite plugin
was a nearly perfect bridge for CF programmers learning ajax.  It's time to
see if I was right ;)



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
 
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] slideDown/slideUp problems when using tables

2007-03-17 Thread Rick Faircloth
Hi, Kush...

Looks like the responses are kinda slow today, so this newbie
(only working with jQuery for about 2 weeks) will tell you the little
he's learned.

I was very interested in using sliding table rows for exposing details
of calendar events.  I could get the rows sliding, but was never happy
with how smoothly they would show  hide.

I tried using two separate tables, one for the always showing event
summary and another for the showing  hiding details.  That performed
really well.  Don't ask me why.

Here's an example of what I did showing the concept.   It's just a couple
of headings and then when you click you see the details.

http://resm.whitestonemedia.com/html/trial_slide.cfm

Don't worry about the This is the part to click. line... that's just
experimentation.

Is it performance of the show/hide you're concerned about?

Rick


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Kush Murod
Sent: Saturday, March 17, 2007 8:44 AM
To: jQuery Discussion.
Subject: Re: [jQuery] slideDown/slideUp problems when using tables

Hi, me again

I meant I need some help with sliding table rows (tr) which doesn't 
slide properly as it does when using divs

Thanks,
Kush





___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] NEW Plug-in: cfjs (ColdFusionJavaScript)

2007-03-17 Thread Christopher Jordan
Wow! Where what I on the 13th? Sorry, I've been sort of absent from this 
discussion. Karl, thanks for the info on using !!, I've not used a 
double not before. I think I may have to read the thread again to fully 
understand it, but it seems really cool.


@Daemach,

Sure I'll add it! :o)

I'm sorry I never got any examples written. I'm guessing that some folks 
still need examples so I'll work on a post today. Also, I'll find some 
JS compression routine somewhere today (any suggestions?) and compress 
the code so it will end up smaller.


Also, thanks for the interest in the plug-in. :o)

Cheers!
Chris

Daemach wrote:

Please add:

StructKeyExists: function(s,k){
for(var n in s){
if (n == k) return true;
}
return false;
},


Shall we post additions and updates here?



Christopher Jordan wrote:
  

Hi fellow jQuerians!

I've just published a new plug-in that adds 42 handy ColdFusion 
functions to the jQuery object. The methods are designed to behave like 
their ColdFusion counterparts.


Here's the list:

Abs(number)
ArrayAppend(array, value)
ArrayLen(array)
ArraySort(array, sort_type [, sort_order ])
ArrayToList(array [, delimiter ])
Ceiling(number)
Compare(string1, string2)
CompareNoCase(string1, string2)
DateDiff(datepart, date1, date2)
DecimalFormat(number)
DollarFormat(number)
Find(substring, string)
FindNoCase(substring, string)
Insert(substring, string, position)
IsDate(date)
IsNumeric(string)
LCase(string)
Left(string, count)
Len(sting)
ListAppend(list, value, [, delimiters])
ListDeleteAt(list, position [, delimiters ])
ListFind(list, value [, delimiters ]))
ListFindNoCase(list, value [, delimiters ]))
ListFirst(list, [, delimiters ])
ListGetAt(list, position [, delimiters ]))
ListLast(list, [, delimiters ])
ListLen(list [, delimiters])
ListToArray(list [, delimiters])
LTrim(string)
Mid(string, start, count)
Replace(string, substring1, substring2 [, scope ])
ReplaceNoCase(string, substring1, substring2 [, scope])
Reverse(string)
Right(string, count)
Round(number [, number of decimal places])
RTrim(string)
StructKeyList (struct [, delimiter])
StructKeyArray (struct)
Trim(string)
UCase(string)
URLDecode(string)
URLEncodedFormat(string)

I have plans for at least a few more ColdFusion functions in a future 
version.


visit: http://cjordan.us to download the code. There is not a packed 
version yet.


I find these functions useful, and while ColdFusion coders may be the 
first to benefit, maybe folks from other languages might find them 
useful as well. I'd love to hear suggestions and comments.


Cheers,
Chris


--
http://cjordan.info


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/





  


--
http://cjordan.info

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] json deserialization

2007-03-17 Thread Bruce McKenzie
This works for me:

$.ajax({
  url  : 'email.pl',
  type : post,
  data : { rm:'deleteLetter',
   ID: myForm.letterSelect.value
}  ,
  dataType : 'json',
  success  :  function(ret){
alert (ret.a)
  }
} );

I believe the order in which you pass the params to $.ajax matters.

Bruce
-- 
Bruce McKenzie
http://www.2MinuteExplainer.com

ashutosh bijoor said the following on 3/17/2007 2:45 AM:
 Well deserializing JSON is quite trivial - you just need to do an eval 
 on the string to get the object.
 // returns a object
 $(#example).click(function() {
 $.post('http://localhost/e/', function(json) {
 eval json=+json;
 alert(json);
 }, json);
 });
 
 -Ashutosh
 
 On 3/17/07, *Bojan* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
 wrote:
 
 Hey Chris, I wasn't aware that I could pass in a type to the post()
 func. I tried that and I still got the the data back as a string
 instead of an object. It's in the correct form {'a':4, 'b':3} but
 for some reason it doesn't work. I tried the same with the getJSON()
 funct and it returns an object as it should.
 
 I'm using the following test:
 
 // returns an object
 $(#example).click(function() {
 $.getJSON(' http://localhost/e/', function(json) {
 alert(json);
 });
 });
 
 // returns a string
 $(#example).click(function() {
 $.post('http://localhost/e/', function(json) {
 alert(json);
 }, json);
 });
 
 
 I'm using the latest jquery.
 
 -- 
 -bo
 
 
 On 3/17/07, *Chris Domigan*  [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:
 
 You can roll your own:
 
 jQuery.extend({
 postJSON: function( url, data, callback ) {
return jQuery.post(url, data, callback, json);
}
 });
 
 Chris
 
 ___
 jQuery mailing list
 discuss@jquery.com mailto:discuss@jquery.com
 http://jquery.com/discuss/
 
 
 
 
 
 
 ___
 jQuery mailing list
 discuss@jquery.com mailto:discuss@jquery.com
 http://jquery.com/discuss/
 
 
 
 
 -- 
 Reach1to1 Technologies
 http://www.reach1to1.com
 http://on2.biz
 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 
 
 
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Select in frames

2007-03-17 Thread George Moschovitis
 So, it looks like this feature is imminent. Unless, of course, I've
 misunderstood your question, which is entirely possible.

oh, this looks to be what I need, thanks.

-g.

-- 
http://blog.gmosx.com
http://cull.gr
http://www.joy.gr
http://nitroproject.org

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] JQuery Form plugin

2007-03-17 Thread George Moschovitis
 AJAX can't be used to upload files. Systems that look like they do use
 an iframe (e.g. Gmail)

I managed to do it with an iframe like you suggested. It seems to work
great. View the source of the page in http://www.nitroproject.org/fora
to see how my hack-solution works.

thanks for the idea,
George.

-- 
http://blog.gmosx.com
http://cull.gr
http://www.joy.gr
http://nitroproject.org

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] bgiframe update, sneak peak

2007-03-17 Thread Brandon Aaron
Hey Joel,

Thanks for the information! It is true that the iframe is behind the
element it is called on by setting the z-index to -1 and by where it
is inserted into the DOM. The only time the iframe should show through
is if a child element (of the element that has the bgiframe method
called on it) has an opacity of less then 1 on it. I believe I will
take out setting the opacity by default (since in most cases it
doesn't matter) and add an option to include it.

--
Brandon Aaron

On 3/17/07, Joel Birch [EMAIL PROTECTED] wrote:
 On 15/03/2007, at 2:41 AM, Brandon Aaron wrote:
  Okay ... I've got a sneak peak of the new bgiframe plugin here:
  http://brandon.jquery.com/plugins/_bgiframe/test/
 
  This discussion started in the recent suckerfish plugin thread ...
  basically they ran into an issue where the expressions used by the
  bgiframe plugin slow down animations in IE6. This has been brought up
  before. Hopefully the flexibility provided by the new settings will
  help solve this problem and a few others.

 Hi Brandon,

 If you recall, the addition of an iframe to the superfish submenus
 interfered with the animations in IE6. You can see this in action on
 my demo page. However, I have found that if I delete this...

 filter:Alpha(Opacity=\'0\');

 ...from your plugin, all the animations work perfectly as per real
 browsers, and the submenus still stay above the select elements. I do
 realise it's possible that this only happens to be a good option in
 my case because I am adding the bgiframe solution only on hover (I
 would remove them on 'hoverOut' too), therefore I don't need to make
 the iframes invisible (I don't see the iframes even though I removed
 that line - I take it the iframe is behind the submenu?).

 Would it be possible to add an option to your plugin so that the
 opacity is not applied? That way developers have the option of
 dynamically applying and removing the iframe, allowing animations to
 work on the element the iframe is attached to.

 No rush of course - its the weekend :)

 Cheers
 Joel Birch.

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] slideDown/slideUp problems when using tables

2007-03-17 Thread Karl Swedberg
there have already been a number of threads related to the problems  
with showing and hiding table rows.


In a nutshell, table rows get mangled in Firefox when using any of  
the animated show and hide techniques because of FF's use of  
display:table-row and jQuery's setting animated elements to  
display:block when showing them. The non-animated .show() and .hide()  
work fine. Also, John Resig just posted a fix to opacity-related bugs  
yesterday, so you might be able to use .fadeIn() and .fadeOut() with  
table rows if you grab the latest nightly build:


http://docs.jquery.com/Downloading_jQuery#Nightly_Builds

While .slideDown() and .show('speed') still won't work properly in  
FF, you could use .fadeIn() as a compromise if you need some  
animation. For example,


$('tr:eq(2)').fadeOut('slow');
and
$('tr:eq(2)').show().fadeIn('slow');

to hide and show the third table row.

Also, you may find the solution in this thread helpful as well for  
doing the slide:
http://www.nabble.com/Hiding-and-showing-table-rows- 
tf2585537.html#a7208756




--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Mar 17, 2007, at 11:11 AM, Rick Faircloth wrote:


Hi, Kush...

Looks like the responses are kinda slow today, so this newbie
(only working with jQuery for about 2 weeks) will tell you the little
he's learned.

I was very interested in using sliding table rows for exposing details
of calendar events.  I could get the rows sliding, but was never happy
with how smoothly they would show  hide.

I tried using two separate tables, one for the always showing event
summary and another for the showing  hiding details.  That performed
really well.  Don't ask me why.

Here's an example of what I did showing the concept.   It's just a  
couple

of headings and then when you click you see the details.

http://resm.whitestonemedia.com/html/trial_slide.cfm

Don't worry about the This is the part to click. line... that's just
experimentation.

Is it performance of the show/hide you're concerned about?

Rick


-Original Message-
From: [EMAIL PROTECTED] [mailto:discuss- 
[EMAIL PROTECTED] On

Behalf Of Kush Murod
Sent: Saturday, March 17, 2007 8:44 AM
To: jQuery Discussion.
Subject: Re: [jQuery] slideDown/slideUp problems when using tables

Hi, me again

I meant I need some help with sliding table rows (tr) which doesn't
slide properly as it does when using divs

Thanks,
Kush





___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] NEW Plug-in: cfjs (ColdFusionJavaScript)

2007-03-17 Thread Christopher Jordan

Hi folks!

Well, I've updated the plug-in to include the following new functions:

StructKeyExists,
ListRest,
DateFormat,
TimeFormat

Here are the valid date and time format masks:

*   = Long month (eg. January)
*   mmm = Short month (eg. Jan)
*   mm  = Numeric date (eg. 07)
*   m   = Numeric date (eg. 7)
*   = Long day (eg. Monday)
*   ddd = Short day (eg. Mon)
*   dd  = Numeric day (eg. 07)
*   d   = Numeric day (eg. 7)
*   = Year (eg. 1999)
*   yy  = Year (eg. 99)

*   h:Hours;no leading zero for single-digit hours (12-hour clock)
*   hh:   Hours;leading zero for single-digit hours (12-hour clock)
*   H:Hours;no leading zero for single-digit hours (24-hour clock)
*   HH:   Hours;leading zero for single-digit hours (24-hour clock)
*   m:Minutes;  no leading zero for single-digit minutes
*   mm:   Minutes;  a leading zero for single-digit minutes
*   s:Seconds;  no leading zero for single-digit seconds
*   ss:   Seconds;  leading zero for single-digit seconds
*
*   t:One-character lower-case time marker string, such as a or p
*   tt:   Multiple-character lower-case time marker string, such as am or pm
*   T:One-character upper-case time marker string, such as A or P
*   TT:   Multiple-character upper-case time marker string, such as AM 
or PM

*
*   short:   equivalent to h:mm TT
*   medium:  equivalent to h:mm:ss TT
*   long:medium followed by three-letter time zone; as in, 2:34:55 
PM EST

*   full:same as long

The plug-in is now available in a compressed version. It's 7KB instead of 18KB.

Keep the suggestions and comments coming. :o)

Here are some examples of how to use the plug-in:
script src=path/to/jquery.js/script
script src=path/to/jquery.cfjs.packed.js/script
script src=path/to/jqyery.dates.js/script
script
   var myList = 1,2,3,4,5,6;
   var modifiedList = $.ListRest(myList);
   // or maybe...
   $(#someID).empty().append($.ListRest(myList));

   // or...
   var myStruct = {};
   myStruct.value1 = jQuery;
   myStruct.value2 = ROCKS!;
   myStruct.value3 = So does ColdFusion;

   if(!$.StructKeyExists(myStruct, value4)){
//do something cool if the struct key doesn't exist
   }

   if($.StructKeyExists(myStruct, value3)){
//do something cool if the struct key exists
   }

   // or...
   var str, str1, str2;
   str = $(#TimeStringID).val();
   str = $.parseODBCDateTime(str); // this function is in the jquery.dates.js
   str1 = $.DateFormat(str, mm/dd/);
   str2 = $.TimeFormat(str, hh:mm:ss);
   $(#someID).empty().append(str1 +   + str2);

/script
input id=TimeStringID type=text value={ts '2007-03-17 00:00:00'}
span id=someID/span

Do those examples help?

I'll work on putting these up on my website (http://cjordan.us)

Cheers,
Chris

Dan G. Switzer, II wrote:

Please add:

StructKeyExists: function(s,k){
for(var n in s){
if (n == k) return true;
}
return false;
},


Shall we post additions and updates here?



This would be much more efficient:

StructKeyExists: function(s,k){
return !!s[k];
},

However, it's also important to remember that a ColdFusion structure isn't
the exact same thing as a JavaScript Object.

-Dan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

  


--
http://cjordan.info

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] help with syntax, naming a function

2007-03-17 Thread Brandon Aaron
Thank you for a test page. I'm going to take a look at this in more
detail as soon as I get the chance.

--
Brandon Aaron

On 3/15/07, rolfsf [EMAIL PROTECTED] wrote:

 okay, so I figured it out... I think

 http://www.monkeypuzzle.net/testfiles/jquery/leftRight/index2.html

 jQuery.fn.sizeLayout = function() {
 if($.browser.msie){
 var ww = $(window).width();
 var wh = $(window).height();
 var pt = $('#rightPane').offset().top;
 var dw = $('#leftPane').outerWidth();
 $('#leftPane').css('height', (wh - pt - 10) + 
 'px'); // set height of
 left div
 $('#rightPane').css('height', (wh - pt - 10) 
 + 'px');
 $('#rightPane').css('width', (ww - dw - 30) + 'px');};
  };

 $().ready(function(){
 $(window).sizeLayout();
 $(window).resize(function(){
 $(this).sizeLayout();
 });
 });

 but can someone tell me why, on document load in IE6, there's an additional
 16px at the bottom, which disappears on resize? Dimensions.js seems to think
 there is a bottom scrollbar maybe?

 Thanks

 --
 View this message in context: 
 http://www.nabble.com/help-with-syntax%2C-naming-a-function-tf3409727.html#a9501497
 Sent from the JQuery mailing list archive at Nabble.com.


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Can't figure out how to put this all together...

2007-03-17 Thread Daemach

I think John is brilliant - a bona fide genius.  In fact, he's me!  In
another forum I participate in there are 2 other John Wilsons, so I started
using Daemach instead.  Now it's habit.

I do think taconite is a great bridge for beginning coders - it has all the
power of jQuery because it's calling jQuery functions directly.  If you're
having trouble with the javascript coding it's worth your time to get your
head around it.  It is slightly less flexible than pure js/jQuery, but not
much.

The form was just to illustrate the mechanics.  You are free to make the
form work however you want.  I've just been trying to help you learn by
helping you solve the problems as you presented them.  Just look at how it
works now by using the firebug console, read the taconite and jQuery docs
thoroughly and start experimenting.  Teach a man to fish and all that ;)

If it were me I wouldn't go this route - I would do all the validation on
the client side or just use a masking function to ensure that they
*couldn't* type anything but numbers.  For example, the below code solves
your validation problem where calculators are concerned:

   $(input:text).each(function(){
 $(this).attr(title,this.value).keyup(function(){

   if (isNaN(this.value)) this.value =
this.title;
   else this.title = this.value;
 })
 });

If you wanted to stick with using the validation, I would also use keyup
events to validate instead of blur because blur requires you to tab out of
the field to do the validation.  My autoSave plugin handles most of that for
you, including minimizing the number of ajax calls by adding a timer event
to the input fields.

$(input:text).autoSave(function(){
   var Params = {};
   $(input:text).each(function(){
   Params[$(this).attr(name)] =
$(this).val();
   });
   $.post(CalcTest.cfm,Params);
});

If you wanted to use a button to calculate, the natural thing would be to
disable the button until validation passed.  This means that when using the
blur event, when you tab out of that last field the button would still be
disabled which feels strange.  Rather than using messages for validation you
might also consider using other cues, like adding a colored border or
background to the fields - red for a bad value and green for good.

And I took the calculation directly from your first post ;)

On 3/17/07, Rick Faircloth [EMAIL PROTECTED] wrote:


 Hi, Daemach…



Actually, the line below to the calctest.cfm works somewhat,

but it doesn't function as I want it to… no button to click for

calculation... I prefer that the user have to click a button.



Calculations are incorrect.



But I really haven't had time to thoroughly evaluate the approach.

This is something very different from every other approach I've been

working on… this was done by John Wilson using Taconite.  He

just put something together for a basic proof-of-concept for me.



I've got to take some time to study his approach and the Taconite

plug-in.  Have you used the plug-in?  John's recommending it as

a tag-based bridge for those of used to CF's syntax and trying to

learn jQuery.  What's your take on that?



Rick



*From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On
Behalf Of *Daemach
*Sent:* Friday, March 16, 2007 2:34 PM
*To:* jQuery Discussion.
*Subject:* Re: [jQuery] Can't figure out how to put this all together...



Looks like it works - is it making more sense now?

On 3/16/07, *Rick Faircloth* [EMAIL PROTECTED]  wrote:

Oh, and I meant to give you the online demo…



http://bodaford.whitestonemedia.com/html/calctest.cfm



Rick



*From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On
Behalf Of *John Wilson
*Sent:* Friday, March 16, 2007 12:48 AM
*To:* discuss@jquery.com
*Subject:* Re: [jQuery] Can't figure out how to put this all together...



A while back, I mentioned to Rey that I thought Mike Alsup's taconite
plugin was a nearly perfect bridge for CF programmers learning ajax.  It's
time to see if I was right ;)


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] NEW Plug-in: cfjs (ColdFusionJavaScript)

2007-03-17 Thread Daemach

Great work Chris -

For those of you who aren't familiar with the CF functions, they are very
helpful real-world functions.  A fantastic reference site for many different
code APIs can be found here:  http://gotapi.com/  For Cold Fusion, look
under Macromedia.  Try looking under functions for examples of the new
functions Chris just added.  There is also a search box above that left
column to save you from digging ;)

Hmm - sure would be nice to get the jQuery API up here...

On 3/17/07, Christopher Jordan [EMAIL PROTECTED] wrote:


 Hi folks!

Well, I've updated the plug-in to include the following new functions:

StructKeyExists,
ListRest,
DateFormat,
TimeFormat

Here are the valid date and time format masks:

*   = Long month (eg. January)
*   mmm = Short month (eg. Jan)
*   mm  = Numeric date (eg. 07)
*   m   = Numeric date (eg. 7)
*   = Long day (eg. Monday)
*   ddd = Short day (eg. Mon)
*   dd  = Numeric day (eg. 07)
*   d   = Numeric day (eg. 7)
*   = Year (eg. 1999)
*   yy  = Year (eg. 99)

*   h:Hours;no leading zero for single-digit hours (12-hour clock)
*   hh:   Hours;leading zero for single-digit hours (12-hour clock)
*   H:Hours;no leading zero for single-digit hours (24-hour clock)
*   HH:   Hours;leading zero for single-digit hours (24-hour clock)
*   m:Minutes;  no leading zero for single-digit minutes
*   mm:   Minutes;  a leading zero for single-digit minutes
*   s:Seconds;  no leading zero for single-digit seconds
*   ss:   Seconds;  leading zero for single-digit seconds
*
*   t:One-character lower-case time marker string, such as a or p
*   tt:   Multiple-character lower-case time marker string, such as am or
pm
*   T:One-character upper-case time marker string, such as A or P
*   TT:   Multiple-character upper-case time marker string, such as AM or
PM
*
*   short:   equivalent to h:mm TT
*   medium:  equivalent to h:mm:ss TT
*   long:medium followed by three-letter time zone; as in, 2:34:55 PM
EST
*   full:same as long

 The plug-in is now available in a compressed version. It's 7KB instead of 18KB.

Keep the suggestions and comments coming. :o)

Here are some examples of how to use the plug-in:
script src=path/to/jquery.js/script
script src=path/to/jquery.cfjs.packed.js/script
script src=path/to/jqyery.dates.js/script
script
var myList = 1,2,3,4,5,6;
var modifiedList = $.ListRest(myList);
// or maybe...
$(#someID).empty().append($.ListRest(myList));

// or...
var myStruct = {};
myStruct.value1 = jQuery;
myStruct.value2 = ROCKS!;
myStruct.value3 = So does ColdFusion;

if(!$.StructKeyExists(myStruct, value4)){
//do something cool if the struct key doesn't exist
}

if($.StructKeyExists(myStruct, value3)){
//do something cool if the struct key exists
}

// or...
var str, str1, str2;
str = $(#TimeStringID).val();
str = $.parseODBCDateTime(str); // this function is in the jquery.dates.js
str1 = $.DateFormat(str, mm/dd/);
str2 = $.TimeFormat(str, hh:mm:ss);
$(#someID).empty().append(str1 +   + str2);

/script
input id=TimeStringID type=text value={ts '2007-03-17 00:00:00'}
span id=someID/span

Do those examples help?

I'll work on putting these up on my website (http://cjordan.us)

Cheers,
Chris

Dan G. Switzer, II wrote:

 Please add:

StructKeyExists: function(s,k){
for(var n in s){
if (n == k) return true;
}
return false;
},


Shall we post additions and updates here?

 This would be much more efficient:

StructKeyExists: function(s,k){
return !!s[k];
},

However, it's also important to remember that a ColdFusion structure isn't
the exact same thing as a JavaScript Object.

-Dan


___
jQuery mailing list
[EMAIL PROTECTED]://jquery.com/discuss/


--
http://cjordan.info


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Test

2007-03-17 Thread Daemach2

Disregard, please.  I'm having some posting/account issues ;)
-- 
View this message in context: http://www.nabble.com/Test-tf3420133.html#a9532281
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] json deserialization

2007-03-17 Thread Michael Geary
 This works for me:
 
 $.ajax({
 url: 'email.pl',
 type: post,
 data: {
 rm: 'deleteLetter',
 ID: myForm.letterSelect.value
 },
 dataType: 'json',
 success: function( ret ) {
 alert( ret.a );
 }
 });
 
 I believe the order in which you pass the params to $.ajax matters.

There's only one argument being passed to $.ajax, a single object literal.

To illustrate, you could write the code like this:

 var args = {
 url: 'email.pl',
 type: post,
 data: {
 rm: 'deleteLetter',
 ID: myForm.letterSelect.value
 },
 dataType: 'json',
 success: function( ret ) {
 alert( ret.a );
 }
 };

 $.ajax( args );

The order of properties in an object literal doesn't matter, except possibly
in a couple of pathological cases [1] [2] that don't apply here.

-Mike

[1] If a property name is used twice in the same object literal - which one
wins?
[2] If the receiving code does for( name in argobject ) and assumes a
particular order of enumeration (which is undefined behavior anyway).


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] NEW Plug-in: cfjs (ColdFusionJavaScript)

2007-03-17 Thread Christopher Jordan

Thanks Daemach. :o)

The jQuery 1.0.3 API is on gotapi.com under Ajax and Frameworks. But 
it being 1.0.3 it's pretty old.


Well, I'm glad some folks are finding the cfjs and dates plug-ins useful.

If anyone has suggestions or comments. I'd love to hear 'em! :o)

Chris

Daemach wrote:

Great work Chris -

For those of you who aren't familiar with the CF functions, they are 
very helpful real-world functions.  A fantastic reference site for 
many different code APIs can be found here:  http://gotapi.com/  For 
Cold Fusion, look under Macromedia.  Try looking under functions for 
examples of the new functions Chris just added.  There is also a 
search box above that left column to save you from digging ;)


Hmm - sure would be nice to get the jQuery API up here...

On 3/17/07, *Christopher Jordan* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


Hi folks!

Well, I've updated the plug-in to include the following new functions:

StructKeyExists,
ListRest,
DateFormat,
TimeFormat

Here are the valid date and time format masks:

*   = Long month (eg. January)
*   mmm = Short month (eg. Jan)
*   mm  = Numeric date (eg. 07)
*   m   = Numeric date (eg. 7)
*   = Long day (eg. Monday)
*   ddd = Short day (eg. Mon)
*   dd  = Numeric day (eg. 07)
*   d   = Numeric day (eg. 7)
*   = Year (eg. 1999)
*   yy  = Year (eg. 99)

*   h:Hours;no leading zero for single-digit hours
(12-hour clock)
*   hh:   Hours;leading zero for single-digit hours (12-hour
clock)
*   H:Hours;no leading zero for single-digit hours
(24-hour clock)
*   HH:   Hours;leading zero for single-digit hours (24-hour
clock)
*   m:Minutes;  no leading zero for single-digit minutes
*   mm:   Minutes;  a leading zero for single-digit minutes
*   s:Seconds;  no leading zero for single-digit seconds
*   ss:   Seconds;  leading zero for single-digit seconds
*
*   t:One-character lower-case time marker string, such as a or p
*   tt:   Multiple-character lower-case time marker string, such
as am or pm
*   T:One-character upper-case time marker string, such as A or P
*   TT:   Multiple-character upper-case time marker string, such
as AM or PM
*
*   short:   equivalent to h:mm TT
*   medium:  equivalent to h:mm:ss TT
*   long:medium followed by three-letter time zone; as in,
2:34:55 PM EST
*   full:same as long

The plug-in is now available in a compressed version. It's 7KB instead of 
18KB.

Keep the suggestions and comments coming. :o)

Here are some examples of how to use the plug-in:
script src=path/to/jquery.js/script

script src=path/to/jquery.cfjs.packed.js/script
script src=path/to/jqyery.dates.js/script
script
var myList = 1,2,3,4,5,6;
var modifiedList = $.ListRest(myList);

// or maybe...
$(#someID).empty().append($.ListRest(myList));

// or...
var myStruct = {};
myStruct.value1 = jQuery;
myStruct.value2 = ROCKS!;

myStruct.value3 = So does ColdFusion;

if(!$.StructKeyExists(myStruct, value4)){
//do something cool if the struct key doesn't exist
}

if($.StructKeyExists(myStruct, value3)){

//do something cool if the struct key exists
}

// or...
var str, str1, str2;
str = $(#TimeStringID).val();
str = $.parseODBCDateTime(str); // this function is in the 
jquery.dates.js

str1 = $.DateFormat(str, mm/dd/);
str2 = $.TimeFormat(str, hh:mm:ss);
$(#someID).empty().append(str1 +   + str2);

/script

input id=TimeStringID type=text value={ts '2007-03-17 00:00:00'}
span id=someID/span

Do those examples help?

I'll work on putting these up on my website (
http://cjordan.us)

Cheers,
Chris



Dan G. Switzer, II wrote:

Please add:

StructKeyExists: function(s,k){
for(var n in s){
if (n == k) return true;
}
return false;
},


Shall we post additions and updates here?


This would be much more efficient:

StructKeyExists: function(s,k){
return !!s[k];
},

However, it's also important to remember that a ColdFusion structure isn't
the exact same thing as a JavaScript Object.


-Dan


___
jQuery mailing list

discuss@jquery.com mailto:discuss@jquery.com
http://jquery.com/discuss/

  


-- 
http://cjordan.info



___
jQuery mailing list
discuss@jquery.com mailto:discuss@jquery.com
http://jquery.com/discuss/





Re: [jQuery] Test

2007-03-17 Thread Christopher Jordan
I got this post just fine! :o)

Chris

Daemach2 wrote:
 Disregard, please.  I'm having some posting/account issues ;)
   

-- 
http://cjordan.info


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] NEW Plug-in: cfjs (ColdFusionJavaScript)

2007-03-17 Thread Daemach2

*cleans glasses*


Christopher Jordan wrote:
 
 Thanks Daemach. :o)
 
 The jQuery 1.0.3 API is on gotapi.com under Ajax and Frameworks. But 
 it being 1.0.3 it's pretty old.
 
 Well, I'm glad some folks are finding the cfjs and dates plug-ins useful.
 
 If anyone has suggestions or comments. I'd love to hear 'em! :o)
 
 Chris
 
 Daemach wrote:
 Great work Chris -

 For those of you who aren't familiar with the CF functions, they are 
 very helpful real-world functions.  A fantastic reference site for 
 many different code APIs can be found here:  http://gotapi.com/  For 
 Cold Fusion, look under Macromedia.  Try looking under functions for 
 examples of the new functions Chris just added.  There is also a 
 search box above that left column to save you from digging ;)

 Hmm - sure would be nice to get the jQuery API up here...

 On 3/17/07, *Christopher Jordan* [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:

 Hi folks!

 Well, I've updated the plug-in to include the following new
 functions:

 StructKeyExists,
 ListRest,
 DateFormat,
 TimeFormat

 Here are the valid date and time format masks:

 *   = Long month (eg. January)
 *   mmm = Short month (eg. Jan)
 *   mm  = Numeric date (eg. 07)
 *   m   = Numeric date (eg. 7)
 *   = Long day (eg. Monday)
 *   ddd = Short day (eg. Mon)
 *   dd  = Numeric day (eg. 07)
 *   d   = Numeric day (eg. 7)
 *   = Year (eg. 1999)
 *   yy  = Year (eg. 99)

 *   h:Hours;no leading zero for single-digit hours
 (12-hour clock)
 *   hh:   Hours;leading zero for single-digit hours (12-hour
 clock)
 *   H:Hours;no leading zero for single-digit hours
 (24-hour clock)
 *   HH:   Hours;leading zero for single-digit hours (24-hour
 clock)
 *   m:Minutes;  no leading zero for single-digit minutes
 *   mm:   Minutes;  a leading zero for single-digit minutes
 *   s:Seconds;  no leading zero for single-digit seconds
 *   ss:   Seconds;  leading zero for single-digit seconds
 *
 *   t:One-character lower-case time marker string, such as a or p
 *   tt:   Multiple-character lower-case time marker string, such
 as am or pm
 *   T:One-character upper-case time marker string, such as A or P
 *   TT:   Multiple-character upper-case time marker string, such
 as AM or PM
 *
 *   short:   equivalent to h:mm TT
 *   medium:  equivalent to h:mm:ss TT
 *   long:medium followed by three-letter time zone; as in,
 2:34:55 PM EST
 *   full:same as long

 The plug-in is now available in a compressed version. It's 7KB
 instead of 18KB.

 Keep the suggestions and comments coming. :o)

 Here are some examples of how to use the plug-in:
 script src=path/to/jquery.js/script

 script src=path/to/jquery.cfjs.packed.js/script
 script src=path/to/jqyery.dates.js/script
 script
 var myList = 1,2,3,4,5,6;
 var modifiedList = $.ListRest(myList);

 // or maybe...
 $(#someID).empty().append($.ListRest(myList));

 // or...
 var myStruct = {};
 myStruct.value1 = jQuery;
 myStruct.value2 = ROCKS!;

 myStruct.value3 = So does ColdFusion;

 if(!$.StructKeyExists(myStruct, value4)){
  //do something cool if the struct key doesn't exist
 }

 if($.StructKeyExists(myStruct, value3)){

  //do something cool if the struct key exists
 }

 // or...
 var str, str1, str2;
 str = $(#TimeStringID).val();
 str = $.parseODBCDateTime(str); // this function is in the 
 jquery.dates.js
 str1 = $.DateFormat(str, mm/dd/);
 str2 = $.TimeFormat(str, hh:mm:ss);
 $(#someID).empty().append(str1 +   + str2);

 /script

 input id=TimeStringID type=text value={ts '2007-03-17
 00:00:00'}
 span id=someID/span

 Do those examples help?

 I'll work on putting these up on my website (
 http://cjordan.us)

 Cheers,
 Chris
 

 Dan G. Switzer, II wrote:
 Please add:

StructKeyExists: function(s,k){
for(var n in s){
if (n == k) return true;
}
return false;
},


 Shall we post additions and updates here?
 
 This would be much more efficient:

 StructKeyExists: function(s,k){
 return !!s[k];
 },

 However, it's also important to remember that a ColdFusion
 structure isn't
 the exact same thing as a JavaScript Object.


 -Dan


 ___
 jQuery mailing list

 discuss@jquery.com mailto:discuss@jquery.com
 http://jquery.com/discuss/

   

 -- 
 http://cjordan.info


 ___
   

Re: [jQuery] bgiframe update, sneak peak

2007-03-17 Thread Brandon Aaron
Okay so I did some testing with this idea and if the element has a
background color on it, the iframe will show above it. You can see the
result on my test page.

--
Brandon Aaron

On 3/17/07, Brandon Aaron [EMAIL PROTECTED] wrote:
 Hey Joel,

 Thanks for the information! It is true that the iframe is behind the
 element it is called on by setting the z-index to -1 and by where it
 is inserted into the DOM. The only time the iframe should show through
 is if a child element (of the element that has the bgiframe method
 called on it) has an opacity of less then 1 on it. I believe I will
 take out setting the opacity by default (since in most cases it
 doesn't matter) and add an option to include it.

 --
 Brandon Aaron

 On 3/17/07, Joel Birch [EMAIL PROTECTED] wrote:
  On 15/03/2007, at 2:41 AM, Brandon Aaron wrote:
   Okay ... I've got a sneak peak of the new bgiframe plugin here:
   http://brandon.jquery.com/plugins/_bgiframe/test/
  
   This discussion started in the recent suckerfish plugin thread ...
   basically they ran into an issue where the expressions used by the
   bgiframe plugin slow down animations in IE6. This has been brought up
   before. Hopefully the flexibility provided by the new settings will
   help solve this problem and a few others.
 
  Hi Brandon,
 
  If you recall, the addition of an iframe to the superfish submenus
  interfered with the animations in IE6. You can see this in action on
  my demo page. However, I have found that if I delete this...
 
  filter:Alpha(Opacity=\'0\');
 
  ...from your plugin, all the animations work perfectly as per real
  browsers, and the submenus still stay above the select elements. I do
  realise it's possible that this only happens to be a good option in
  my case because I am adding the bgiframe solution only on hover (I
  would remove them on 'hoverOut' too), therefore I don't need to make
  the iframes invisible (I don't see the iframes even though I removed
  that line - I take it the iframe is behind the submenu?).
 
  Would it be possible to add an option to your plugin so that the
  opacity is not applied? That way developers have the option of
  dynamically applying and removing the iframe, allowing animations to
  work on the element the iframe is attached to.
 
  No rush of course - its the weekend :)
 
  Cheers
  Joel Birch.
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] json deserialization

2007-03-17 Thread Daemach

Why can't you $.post(myurl.cfm,data,function(response){ eval(response)})?
If you're certain the response is a valid json string, eval turns it back
into a javascript object/array/whatever.

On 3/16/07, Bojan [EMAIL PROTECTED] wrote:


Hello everyone,

I am trying to figure out how to deserialize json data that is sent back
as a response from a .post() call. I looked at the deserialization plugin
0.35 that fills out a form from json-like data. But what I'm trying to do
is send back arbitrary data (data, error messages etc. depending on the
response from the server function) that has nothing to do with a form - the
call itself is not necessarily coming from a form.  .getJSON() is doing a
fine job at this, but is there a way to get that functionality for .post()
calls or maybe I'm missing something obvious?

--
-bo
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery Powered Sites - The List Continues to Grow

2007-03-17 Thread Bryan McLemore

You can add www.curse-gaming.com :)  I've recently rewritten all our
javascript to use jquery and now working on adding more advanced features.

:)

Bryan McLemore
Kaelten

On 3/15/07, Rey Bango [EMAIL PROTECTED] wrote:


Hi all,

I've added www.sheriff.org, marmot.com  http://www.novita.org.au to the
list.

Keep the sites coming. Also, if you're using FireFox, consider using the
script below that jQuery team member Paul Bakaus developed to identify
jQuery sites. Its awesome.

Rey


// jQuery Detector
// version 0.1
// 2007-02-09
// Copyright (c) 2007, Paul Bakaus
// Released under the GPL license
// http://www.gnu.org/copyleft/gpl.html
//
// 
//
// This is a Greasemonkey user script.  To install it, you need
// Greasemonkey 0.3 or later: http://greasemonkey.mozdev.org/
// Then restart Firefox and revisit this script.
// Under Tools, there will be a new menu item to Install User Script.
// Accept the default configuration and install.
//
// To uninstall, go to Tools/Manage User Scripts,
// select Hello World, and click Uninstall.
//
// 
//
// ==UserScript==
// @name  jQuery Detector
// @namespace http://www.paulbakaus.com/
// @description   will show wether the actual page is powered by jQuery
// @include   *
// ==/UserScript==

var head = document.getElementsByTagName(head)[0];
if(head) {
var n = document.createElement(script);
n.src = http://paul.jquery.com/jquerydetector.js;;
head.appendChild(n);
}



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/





--
--
Bryan McLemore
Kaelten
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Right approach width .after() and effects

2007-03-17 Thread Olaf Gleba
Hi,

just started with jquery, respectively just switching from prototype/ 
scriptacolous to jquery...

I wonder, how i can attach an effect to the html content that has  
been inserted on the fly with $.post (In this case it is a short help  
text that is inserted right after corresponding label form tags).


Sample Code (excerpt):
...
$.post(url,
{ page: attr },
function(data) {
// this is the topic line
$(el).after(data).fadeIn(slow);   
}
);
...

$(el) ist the label tag element. The inserted html data appears  
proper after the label tag. Sadly the fadeIn points to the label tag  
and not the loaded data of course - as i refer only to $(el).

But. What syntax i must use to get the desired behaviour?

Thanks in advance.
Olaf





___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Can't figure out how to put this all together...

2007-03-17 Thread Rick Faircloth
Daemach. errr. John. :o)

Here's the code I've written from yours
with the validation I need.  I can't seem
to figure out a way to make taconite happy
with this.

Got any clues?

Rick

Here's the revamped code based on what you sent me:


-   

CFSET Principal_Error_Message = 
CFSET Interest_Error_Message = 
CFSET Years_Error_Message = 


CFIF IsDefined(Form.Principal

CFIF Not Len(Trim(Form.Principal))

CFSET Principal_Error_Message = Please enter the Principal
amount.

CFELSEIF Len(Trim(Form.Principal))
  and Not IsNumeric(REReplace(Form.Principal, [$.,], ,
All))
  
CFSET Principal_Error_Message = Please enter a valid
Principal amount.

/CFIF

/CFIF


CFIF IsDefined(Form.Interest)

CFIF Not Len(Trim(Form.Interest))

CFSET Interest_Error_Message = Please enter the Interest
Rate.

CFELSEIF Len(Trim(Form.Interest))
  and Not IsNumeric(REReplace(Form.Interest, [.], , All))
  
CFSET Interest_Error_Message = Please enter a valid
Interest Rate.

/CFIF

/CFIF


CFIF IsDefined(Form.Years)

CFIF Not Len(Trim(Form.Years))

CFSET Years_Error_Message = Please enter the Years.

CFELSEIF Len(Trim(Form.Years))
  and Not IsNumeric(REReplace(Form.Years, [0-9], , All))
  
CFSET Years_Error_Message = Please enter a valid number of
Years.

/CFIF

/CFIF


-

CFIF Not Len(Trim(Principal_Error_Message))
   and Not Len(Trim(Interest_Error_Message))
   and Not Len(Trim(Years_Error_Message))

 cfset interest = form.interest/(12*100)   
 cfset payment =
form.principal*(interest/(1-(1+interest)^-(form.years*12))) 


cfcontent type=text/xml reset=yes
cfheader name=Content-Type value=text/xml 
cfoutput
taconite
replaceContent select=##Result_Principal
cfif
listFindNoCase(lacking,Principal)CFOUTPUT#Principal_Error_Message#/CFO
UTPUT/cfif
/replaceContent
replaceContent select=##Result_Interest
cfif
listFindNoCase(lacking,Interest)CFOUTPUT#Interest_Error_Message#/CFOUT
PUT/cfif 
/replaceContent
replaceContent select=##Result_Years
cfif
listFindNoCase(lacking,Years)CFOUTPUT#Years_Error_Message#/CFOUTPUT/
cfif
/replaceContent 
replaceContent select=##Result
cfif listLen(lacking)Waiting for numbers...cfelseYour
payment is: #DollarFormat(payment)#!/cfif
/replaceContent 
/taconite
/cfoutput

!---If there are form fields submitted, this must be an ajax call.
Otherwise show the form---
cfelse
html xmlns= http://www.w3.org/1999/xhtml;
head
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
/
titleMortgage Calculator/title 
script type=text/javascript src=2007_0307_jquery.js/script
script type=text/javascript src=jquery.taconite.js/script
script language=JavaScript type=text/javascript 
$.taconite.debug = true; 

$(document).ready(function(){
$(input:text).each(function(){
  $(this).blur(function () {
var Params = {}; 
$(input:text).each(function(){
Params[$(this).attr(name)] = $(this).val();
});
$.post( CalcTest.cfm,Params);
});
  });
}); 
/script
/head
body
h3Mortgage Calculator/h3
form id=Calculate_Mortgage Name=Calculate_Mortgage 
table

tr
td id=Result_Principal/td
/tr

tr
th align=leftPrincipal:/th
tdinput tabindex=1 id=Principal name=Principal
type=Text/td 
/tr

tr
tddiv id=Result_Interest/div/td
/tr

tr
th align=leftInterest:/th 
tdinput tabindex=2 id=Interest name=Interest
type=Text/td
/tr

tr
tddiv id=Result_Years/div/td
/tr

tr
th align=leftYears:/th
tdinput tabindex=3 id=Years name=Years
type=Text/td 
/tr

tr
th align=leftResult: 

Re: [jQuery] Right approach width .after() and effects

2007-03-17 Thread Yansky

Is the data inserted within the label element? If so, you could try
$(el).children().fadeIn(slow);
If it's inserted after the element, you could try
$(el).next().fadeIn(slow);


Olaf Gleba wrote:
 
 Hi,
 
 just started with jquery, respectively just switching from prototype/ 
 scriptacolous to jquery...
 
 I wonder, how i can attach an effect to the html content that has  
 been inserted on the fly with $.post (In this case it is a short help  
 text that is inserted right after corresponding label form tags).
 
 
 Sample Code (excerpt):
 ...
 $.post(url,
   { page: attr },
   function(data) {
   // this is the topic line
   $(el).after(data).fadeIn(slow);   
   }
   );
 ...
 
 $(el) ist the label tag element. The inserted html data appears  
 proper after the label tag. Sadly the fadeIn points to the label tag  
 and not the loaded data of course - as i refer only to $(el).
 
 But. What syntax i must use to get the desired behaviour?
 
 Thanks in advance.
 Olaf
 
 
 
 
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 
 

-- 
View this message in context: 
http://www.nabble.com/Right-approach-width-.after%28%29-and-effects-tf3420389.html#a9533547
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] loading content into a div (IE7 problems)

2007-03-17 Thread Tom Holder

I'm also getting something very similar to this, the callback function never
seems to fire. I'm pulling my hair out trying to get to the bottom of the
problem. I'll update if I do find out anything more. Although I haven't
tested it extensively I believe I'm getting exactly the same problem in IE
6.

On 16/03/07, Mike Alsup [EMAIL PROTECTED] wrote:


Can you give us a url to look at?

 What could be the problem?

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/





--
Tom Holder

Technical Director
SimpleWeb Limited
Great websites. Low cost. No catch.

http://www.simpleweb-online.co.uk/
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] bgiframe update, sneak peak

2007-03-17 Thread Joel Birch
On 18/03/2007, at 6:34 AM, Brandon Aaron wrote:
 Okay so I did some testing with this idea and if the element has a
 background color on it, the iframe will show above it. You can see the
 result on my test page.

 --
 Brandon Aaron

 On 3/17/07, Brandon Aaron [EMAIL PROTECTED] wrote:
 Hey Joel,

 Thanks for the information! It is true that the iframe is behind the
 element it is called on by setting the z-index to -1 and by where it
 is inserted into the DOM. The only time the iframe should show  
 through
 is if a child element (of the element that has the bgiframe method
 called on it) has an opacity of less then 1 on it. I believe I will
 take out setting the opacity by default (since in most cases it
 doesn't matter) and add an option to include it.

 --
 Brandon Aaron

Hey Brandon, thanks for adding that option - it is perfect. I notice  
you have set the default as opacity:true (as in, you decided against  
taking out setting the opacity by default). Is that because of your  
tests (mentioned in your later post) where the iframe showed through?  
Regarding that, you said if the element has a background color on  
it, the iframe will show above it. When I tested this on my demo  
page I found that with the opacity code deleted the iframe *always*  
showed above the element it was attached to *regardless* of whether  
or not a background colour was set. The reason I didn't notice this  
earlier is because the element's children (li elements in my case)  
have background colours so they hide the iframe in effect.

So I think your current default setting of opacity:true is probably a  
good idea because 1. it emulates its regular behaviour, and 2. when  
the situation is like my case the developer can take advantage of  
setting the opacity option to false and enjoy perfect animations.

This is perfect for my menu plugin and I have updated my demo page to  
take advantage of it. This involved using your option to set  
opacity:false and also adding the following line to my superfish  
plugin's 'out' function:

.find(iframe, this).remove();

I had to add that to the plugin because I wanted it to happen after  
the mouseout delay, not immediately on mouseout. Anyway, now both  
slides and fades work perfectly in IE6 (check my demo page) and there  
is no lag whatsoever! The menu now works equally well in all regards  
for IE6 as it does for other browsers. I guess the only downside in  
my case is how convoluted the code is for applying the bgIframe to  
the menu:

$(document).ready(function(){
$(.nav)
.superfish({
animation : { opacity:show,height:show}
})
.find(li[ul])
.mouseover(function(){
$(ul, this).bgIframe({opacity:false});
})
.find(a)
.focus(function(){
$(ul, 
$(.navli[ul])).bgIframe({opacity:false});
});
});


Thanks for your help Brandon.

Cheers
Joel.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Can't figure out how to put this all together...

2007-03-17 Thread Daemach2

What kind of error messages are you getting?  Do you have an example url?

My suspicion is that you're working blind here and you're never going to be
able to work with ajax until you get that sorted out first.  Looking at the
cf code, for example, you are nesting 3 CFOUTPUTs inside the cfoutput that
is wrapping the entire taconite block.  It's pretty much guaranteed that
you're getting a CF error here.

I'm happy to continue to help you with this, but lets move this conversation
off this list until we get that sorted out.  Email me directly by using the
reply to author link and we'll go from there.  It's 3:15 my time - if you
hit me up in the next hour I can work with you one on one.


Rick Faircloth wrote:
 
 Daemach. errr. John. :o)
 
 Here's the code I've written from yours
 with the validation I need.  I can't seem
 to figure out a way to make taconite happy
 with this.
 
 Got any clues?
 
 Rick
 
 Here's the revamped code based on what you sent me:
   
 
 - 
 
 CFSET Principal_Error_Message = 
 CFSET Interest_Error_Message = 
 CFSET Years_Error_Message = 
   
   
 CFIF IsDefined(Form.Principal
 
   CFIF Not Len(Trim(Form.Principal))
   
   CFSET Principal_Error_Message = Please enter the Principal
 amount.
   
   CFELSEIF Len(Trim(Form.Principal))
 and Not IsNumeric(REReplace(Form.Principal, [$.,], ,
 All))
 
   CFSET Principal_Error_Message = Please enter a valid
 Principal amount.
   
   /CFIF
   
 /CFIF
 
 
 CFIF IsDefined(Form.Interest)
 
   CFIF Not Len(Trim(Form.Interest))
   
   CFSET Interest_Error_Message = Please enter the Interest
 Rate.
   
   CFELSEIF Len(Trim(Form.Interest))
 and Not IsNumeric(REReplace(Form.Interest, [.], , All))
 
   CFSET Interest_Error_Message = Please enter a valid
 Interest Rate.
   
   /CFIF
   
 /CFIF
 
 
 CFIF IsDefined(Form.Years)
 
   CFIF Not Len(Trim(Form.Years))
   
   CFSET Years_Error_Message = Please enter the Years.
   
   CFELSEIF Len(Trim(Form.Years))
 and Not IsNumeric(REReplace(Form.Years, [0-9], , All))
 
   CFSET Years_Error_Message = Please enter a valid number of
 Years.
   
 /CFIF
   
 /CFIF
 
 
 -
 
 CFIF Not Len(Trim(Principal_Error_Message))
and Not Len(Trim(Interest_Error_Message))
and Not Len(Trim(Years_Error_Message))
   
  cfset interest = form.interest/(12*100)   
  cfset payment =
 form.principal*(interest/(1-(1+interest)^-(form.years*12))) 
   
   
 cfcontent type=text/xml reset=yes
 cfheader name=Content-Type value=text/xml 
 cfoutput
 taconite
 replaceContent select=##Result_Principal
   cfif
 listFindNoCase(lacking,Principal)CFOUTPUT#Principal_Error_Message#/CFO
 UTPUT/cfif
 /replaceContent
 replaceContent select=##Result_Interest
 cfif
 listFindNoCase(lacking,Interest)CFOUTPUT#Interest_Error_Message#/CFOUT
 PUT/cfif 
 /replaceContent
 replaceContent select=##Result_Years
 cfif
 listFindNoCase(lacking,Years)CFOUTPUT#Years_Error_Message#/CFOUTPUT/
 cfif
 /replaceContent 
 replaceContent select=##Result
 cfif listLen(lacking)Waiting for numbers...cfelseYour
 payment is: #DollarFormat(payment)#!/cfif
 /replaceContent 
 /taconite
 /cfoutput
 
 !---If there are form fields submitted, this must be an ajax call.
 Otherwise show the form---
 cfelse
 html xmlns= http://www.w3.org/1999/xhtml;
 head
 meta http-equiv=Content-Type content=text/html;
 charset=iso-8859-1
 /
 titleMortgage Calculator/title 
 script type=text/javascript src=2007_0307_jquery.js/script
 script type=text/javascript src=jquery.taconite.js/script
 script language=JavaScript type=text/javascript 
 $.taconite.debug = true; 
 
 $(document).ready(function(){
 $(input:text).each(function(){
   $(this).blur(function () {
 var Params = {}; 
 $(input:text).each(function(){
 Params[$(this).attr(name)] = $(this).val();
 });
 $.post( CalcTest.cfm,Params);
 });
   });
 }); 
 /script
 /head
 body
 h3Mortgage Calculator/h3
 form id=Calculate_Mortgage Name=Calculate_Mortgage 
 table
   
 tr
   td id=Result_Principal/td
   /tr
   
   tr
 th 

Re: [jQuery] loading content into a div (IE7 problems)

2007-03-17 Thread Yansky

I've noticed that ajax can sometimes consider an internal link a different
domain if you're accessing the page without putting www before the address 
you're link does use www ( vice-versa). 

I think I read in another post on this mailing list that IE sees internal
links as full links, so maybe the combination of these two things is what's
causing it?

 

Tom Holder-2 wrote:
 
 I'm also getting something very similar to this, the callback function
 never
 seems to fire. I'm pulling my hair out trying to get to the bottom of the
 problem. I'll update if I do find out anything more. Although I haven't
 tested it extensively I believe I'm getting exactly the same problem in IE
 6.
 
 On 16/03/07, Mike Alsup [EMAIL PROTECTED] wrote:

 Can you give us a url to look at?

  What could be the problem?

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/

 
 
 
 -- 
 Tom Holder
 
 Technical Director
 SimpleWeb Limited
 Great websites. Low cost. No catch.
 
 http://www.simpleweb-online.co.uk/
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 
 

-- 
View this message in context: 
http://www.nabble.com/loading-content-into-a-div-%28IE7-problems%29-tf3413367.html#a9534057
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Right approach width .after() and effects

2007-03-17 Thread Olaf Gleba
First thanks for your answer.

Am 17.03.2007 um 22:24 schrieb Yansky:

 If it's inserted after the element

yes

 , you could try

 $(el).next().fadeIn(slow);

This doesn't handle the insertion html of the $.post request. It only  
grabs the next label tag and process the fade in on this.

As far as i understand this $(el).after(xxx) not only sets the DOM  
pointer 'behind' the given el but insert the data also. So i have to  
bind the .fadeIn() to this function therefor.

So i still have no clue how to get what i want.






___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Right approach width .after() and effects

2007-03-17 Thread Olaf Gleba

Am 17.03.2007 um 21:20 schrieb Olaf Gleba:

 I wonder, how i can attach an effect to the html content that has
 been inserted on the fly with $.post (In this case it is a short help
 text that is inserted right after corresponding label form tags).

Got it. Solution:

$(el).after(data).next().fadeIn(slow);

It seems, you have to adress at least the first sibling of the result  
set of .after(xxx).




___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] slideDown/slideUp problems when using tables

2007-03-17 Thread Kush Murod

Hi Karl,

Your idea is great workaround, I have tried it 
http://www.khurshid.com/sebs/?page=portfolio_Table

However still something weird as you can see
Maybe I should just give up and use pure CSS
Thanks for help

Kush

Karl Swedberg wrote:
there have already been a number of threads related to the problems 
with showing and hiding table rows.


In a nutshell, table rows get mangled in Firefox when using any of the 
animated show and hide techniques because of FF's use of 
display:table-row and jQuery's setting animated elements to 
display:block when showing them. The non-animated .show() and .hide() 
work fine. Also, John Resig just posted a fix to opacity-related bugs 
yesterday, so you might be able to use .fadeIn() and .fadeOut() with 
table rows if you grab the latest nightly build:


http://docs.jquery.com/Downloading_jQuery#Nightly_Builds

While .slideDown() and .show('speed') still won't work properly in FF, 
you could use .fadeIn() as a compromise if you need some animation. 
For example,


$('tr:eq(2)').fadeOut('slow');
and
$('tr:eq(2)').show().fadeIn('slow');

to hide and show the third table row.

Also, you may find the solution in this thread helpful as well for 
doing the slide:
http://www.nabble.com/Hiding-and-showing-table-rows-tf2585537.html#a7208756 





--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Mar 17, 2007, at 11:11 AM, Rick Faircloth wrote:


Hi, Kush...

Looks like the responses are kinda slow today, so this newbie
(only working with jQuery for about 2 weeks) will tell you the little
he's learned.

I was very interested in using sliding table rows for exposing details
of calendar events.  I could get the rows sliding, but was never happy
with how smoothly they would show  hide.

I tried using two separate tables, one for the always showing event
summary and another for the showing  hiding details.  That performed
really well.  Don't ask me why.

Here's an example of what I did showing the concept.   It's just a 
couple

of headings and then when you click you see the details.

http://resm.whitestonemedia.com/html/trial_slide.cfm

Don't worry about the This is the part to click. line... that's just
experimentation.

Is it performance of the show/hide you're concerned about?

Rick


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Kush Murod
Sent: Saturday, March 17, 2007 8:44 AM
To: jQuery Discussion.
Subject: Re: [jQuery] slideDown/slideUp problems when using tables

Hi, me again

I meant I need some help with sliding table rows (tr) which doesn't
slide properly as it does when using divs

Thanks,
Kush





___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/





___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
  
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] slideDown/slideUp problems when using tables

2007-03-17 Thread Karl Swedberg

Hi Kush,

It looks like you're using jquery.latest.js. That one won't work with  
the .fadeIn() and .fadeOut().


As I mentioned before, you'll need the most recent nightly build.

Actually, scratch that. It looks like the file there is dated  
2007-03-01 (Rev: 1472):

http://jquery.com/src/nightlies/jquery-nightly.js

So, I put the latest svn builds up on my test server if you want to  
grab one and try the row stuff with it. It works fine with my tables:



* $Date: 2007-03-16 16:37:10 -0400 (Fri, 16 Mar 2007) $
* $Rev: 1538 $


http://test.learningjquery.com/scripts/jquery.js
http://test.learningjquery.com/scripts/jquery.lite.js
http://test.learningjquery.com/scripts/jquery.pack.js

--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Mar 17, 2007, at 7:36 PM, Kush Murod wrote:


Hi Karl,

Your idea is great workaround, I have tried it http:// 
www.khurshid.com/sebs/?page=portfolio_Table

However still something weird as you can see
Maybe I should just give up and use pure CSS
Thanks for help

Kush

Karl Swedberg wrote:
there have already been a number of threads related to the  
problems with showing and hiding table rows.


In a nutshell, table rows get mangled in Firefox when using any of  
the animated show and hide techniques because of FF's use of  
display:table-row and jQuery's setting animated elements to  
display:block when showing them. The non-animated .show() and .hide 
() work fine. Also, John Resig just posted a fix to opacity- 
related bugs yesterday, so you might be able to use .fadeIn()  
and .fadeOut() with table rows if you grab the latest nightly build:


http://docs.jquery.com/Downloading_jQuery#Nightly_Builds

While .slideDown() and .show('speed') still won't work properly in  
FF, you could use .fadeIn() as a compromise if you need some  
animation. For example,


$('tr:eq(2)').fadeOut('slow');
and
$('tr:eq(2)').show().fadeIn('slow');

to hide and show the third table row.

Also, you may find the solution in this thread helpful as well for  
doing the slide:
http://www.nabble.com/Hiding-and-showing-table-rows- 
tf2585537.html#a7208756




--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Mar 17, 2007, at 11:11 AM, Rick Faircloth wrote:


Hi, Kush...

Looks like the responses are kinda slow today, so this newbie
(only working with jQuery for about 2 weeks) will tell you the  
little

he's learned.

I was very interested in using sliding table rows for exposing  
details
of calendar events.  I could get the rows sliding, but was never  
happy

with how smoothly they would show  hide.

I tried using two separate tables, one for the always showing event
summary and another for the showing  hiding details.  That  
performed

really well.  Don't ask me why.

Here's an example of what I did showing the concept.   It's just  
a couple

of headings and then when you click you see the details.

http://resm.whitestonemedia.com/html/trial_slide.cfm

Don't worry about the This is the part to click. line... that's  
just

experimentation.

Is it performance of the show/hide you're concerned about?

Rick


-Original Message-
From: [EMAIL PROTECTED] [mailto:discuss- 
[EMAIL PROTECTED] On

Behalf Of Kush Murod
Sent: Saturday, March 17, 2007 8:44 AM
To: jQuery Discussion.
Subject: Re: [jQuery] slideDown/slideUp problems when using tables

Hi, me again

I meant I need some help with sliding table rows (tr) which doesn't
slide properly as it does when using divs

Thanks,
Kush





___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Selector not firing

2007-03-17 Thread Rob Wilkerson
Maybe I've been looking at this for too long, but the following line
just doesn't seem to be firing within $(document).ready()

$('[EMAIL PROTECTED]').attr ( href, /2007/sponsorship.html );

I want it to change all links to a sponsorship.html page to a page by
that same name in a different directory.  There are other statements
in that same document.ready() that seem to be firing perfectly.

What am I missing, here?

Thank you.

Rob

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Selector not firing

2007-03-17 Thread Josh Nathanson
Did you copy and paste that?  Looks like there's an extra space after the 
attr method, before the open parenthesis.  The syntax looks fine to me.

- Original Message - 
From: Rob Wilkerson [EMAIL PROTECTED]
To: jQuery Discussion. discuss@jquery.com
Sent: Saturday, March 17, 2007 6:03 PM
Subject: [jQuery] Selector not firing


 Maybe I've been looking at this for too long, but the following line
 just doesn't seem to be firing within $(document).ready()

 $('[EMAIL PROTECTED]').attr ( href, /2007/sponsorship.html );

 I want it to change all links to a sponsorship.html page to a page by
 that same name in a different directory.  There are other statements
 in that same document.ready() that seem to be firing perfectly.

 What am I missing, here?

 Thank you.

 Rob

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/ 


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Selector not firing

2007-03-17 Thread Rob Wilkerson
I did copy and paste that, but I did manage to track down that
problem.  It was a syntax error in a $(document).ready() function that
was included in an external script (this one is specific to a
particular page).

I do have one other question, though.  I'd like to get the top  left
positions of an element's parent so that I can shift the main element
to overlay it's parent.  I have a block of content and I want to
overlay a child block so that the parent is completely covered.

Any thoughts?

Thanks.

On 3/17/07, Josh Nathanson [EMAIL PROTECTED] wrote:
 Did you copy and paste that?  Looks like there's an extra space after the
 attr method, before the open parenthesis.  The syntax looks fine to me.

 - Original Message -
 From: Rob Wilkerson [EMAIL PROTECTED]
 To: jQuery Discussion. discuss@jquery.com
 Sent: Saturday, March 17, 2007 6:03 PM
 Subject: [jQuery] Selector not firing


  Maybe I've been looking at this for too long, but the following line
  just doesn't seem to be firing within $(document).ready()
 
  $('[EMAIL PROTECTED]').attr ( href, /2007/sponsorship.html );
 
  I want it to change all links to a sponsorship.html page to a page by
  that same name in a different directory.  There are other statements
  in that same document.ready() that seem to be firing perfectly.
 
  What am I missing, here?
 
  Thank you.
 
  Rob
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] slideDown/slideUp problems when using tables

2007-03-17 Thread Kush Murod

Hi Karl,
Thanks for your help dude
There are few things though.

   * in FF it fades in/out, but it had to manually show() it
 [.fadeIn('slow').show();] otherwise wasn't fadeIn, is it supposed
 to that way
   * in IE doesn't fade in/out is this a limitation or is it just me
 smoking crack :)

http://www.khurshid.com/sebs/?page=portfolio_Table

Regards,
Kush

Karl Swedberg wrote:

Hi Kush,

It looks like you're using jquery.latest.js. That one won't work with 
the .fadeIn() and .fadeOut().


As I mentioned before, you'll need the most recent nightly build.

Actually, scratch that. It looks like the file there is dated 
2007-03-01 (Rev: 1472):

http://jquery.com/src/nightlies/jquery-nightly.js

So, I put the latest svn builds up on my test server if you want to 
grab one and try the row stuff with it. It works fine with my tables:



* $Date: 2007-03-16 16:37:10 -0400 (Fri, 16 Mar 2007) $
* $Rev: 1538 $


http://test.learningjquery.com/scripts/jquery.js
http://test.learningjquery.com/scripts/jquery.lite.js
http://test.learningjquery.com/scripts/jquery.pack.js

--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Mar 17, 2007, at 7:36 PM, Kush Murod wrote:


Hi Karl,

Your idea is great workaround, I have tried it 
http://www.khurshid.com/sebs/?page=portfolio_Table

However still something weird as you can see
Maybe I should just give up and use pure CSS
Thanks for help

Kush

Karl Swedberg wrote:
there have already been a number of threads related to the problems 
with showing and hiding table rows.


In a nutshell, table rows get mangled in Firefox when using any of 
the animated show and hide techniques because of FF's use of 
display:table-row and jQuery's setting animated elements to 
display:block when showing them. The non-animated .show() and 
.hide() work fine. Also, John Resig just posted a fix to 
opacity-related bugs yesterday, so you might be able to use 
.fadeIn() and .fadeOut() with table rows if you grab the latest 
nightly build:


http://docs.jquery.com/Downloading_jQuery#Nightly_Builds

While .slideDown() and .show('speed') still won't work properly in 
FF, you could use .fadeIn() as a compromise if you need some 
animation. For example,


$('tr:eq(2)').fadeOut('slow');
and
$('tr:eq(2)').show().fadeIn('slow');

to hide and show the third table row.

Also, you may find the solution in this thread helpful as well for 
doing the slide:
http://www.nabble.com/Hiding-and-showing-table-rows-tf2585537.html#a7208756 





--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Mar 17, 2007, at 11:11 AM, Rick Faircloth wrote:


Hi, Kush...

Looks like the responses are kinda slow today, so this newbie
(only working with jQuery for about 2 weeks) will tell you the little
he's learned.

I was very interested in using sliding table rows for exposing details
of calendar events.  I could get the rows sliding, but was never happy
with how smoothly they would show  hide.

I tried using two separate tables, one for the always showing event
summary and another for the showing  hiding details.  That performed
really well.  Don't ask me why.

Here's an example of what I did showing the concept.   It's just a 
couple

of headings and then when you click you see the details.

http://resm.whitestonemedia.com/html/trial_slide.cfm

Don't worry about the This is the part to click. line... that's just
experimentation.

Is it performance of the show/hide you're concerned about?

Rick


-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On

Behalf Of Kush Murod
Sent: Saturday, March 17, 2007 8:44 AM
To: jQuery Discussion.
Subject: Re: [jQuery] slideDown/slideUp problems when using tables

Hi, me again

I meant I need some help with sliding table rows (tr) which doesn't
slide properly as it does when using divs

Thanks,
Kush





___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/





___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
  
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Selector not firing

2007-03-17 Thread Jack Killpatrick
These might help...

1. check out the Dimensions plugin:

http://docs.jquery.com/Plugins

2. if you want to block a block:

http://malsup.com/jquery/block/#element

- Jack

Rob Wilkerson wrote:
 I did copy and paste that, but I did manage to track down that
 problem.  It was a syntax error in a $(document).ready() function that
 was included in an external script (this one is specific to a
 particular page).

 I do have one other question, though.  I'd like to get the top  left
 positions of an element's parent so that I can shift the main element
 to overlay it's parent.  I have a block of content and I want to
 overlay a child block so that the parent is completely covered.

 Any thoughts?

 Thanks.

   


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] bgiframe update, sneak peak

2007-03-17 Thread John W

Hey guys this is great stuff. Joel your menu works a lot better now under IE6
and Brandon thanks for making Bgiframe updates.  One thing I was wondering,
since IE7 doesnt really suffer from the same issue as IE6 perhaps there is a
way not to fire the bgiframe for IE7. There isnt really a reason to  have
the iframe with IE7 or maybe Im wrong?



thumblewend wrote:
 
 On 18/03/2007, at 6:34 AM, Brandon Aaron wrote:
 Okay so I did some testing with this idea and if the element has a
 background color on it, the iframe will show above it. You can see the
 result on my test page.

 --
 Brandon Aaron

 On 3/17/07, Brandon Aaron [EMAIL PROTECTED] wrote:
 Hey Joel,

 Thanks for the information! It is true that the iframe is behind the
 element it is called on by setting the z-index to -1 and by where it
 is inserted into the DOM. The only time the iframe should show  
 through
 is if a child element (of the element that has the bgiframe method
 called on it) has an opacity of less then 1 on it. I believe I will
 take out setting the opacity by default (since in most cases it
 doesn't matter) and add an option to include it.

 --
 Brandon Aaron
 
 Hey Brandon, thanks for adding that option - it is perfect. I notice  
 you have set the default as opacity:true (as in, you decided against  
 taking out setting the opacity by default). Is that because of your  
 tests (mentioned in your later post) where the iframe showed through?  
 Regarding that, you said if the element has a background color on  
 it, the iframe will show above it. When I tested this on my demo  
 page I found that with the opacity code deleted the iframe *always*  
 showed above the element it was attached to *regardless* of whether  
 or not a background colour was set. The reason I didn't notice this  
 earlier is because the element's children (li elements in my case)  
 have background colours so they hide the iframe in effect.
 
 So I think your current default setting of opacity:true is probably a  
 good idea because 1. it emulates its regular behaviour, and 2. when  
 the situation is like my case the developer can take advantage of  
 setting the opacity option to false and enjoy perfect animations.
 
 This is perfect for my menu plugin and I have updated my demo page to  
 take advantage of it. This involved using your option to set  
 opacity:false and also adding the following line to my superfish  
 plugin's 'out' function:
 
 .find(iframe, this).remove();
 
 I had to add that to the plugin because I wanted it to happen after  
 the mouseout delay, not immediately on mouseout. Anyway, now both  
 slides and fades work perfectly in IE6 (check my demo page) and there  
 is no lag whatsoever! The menu now works equally well in all regards  
 for IE6 as it does for other browsers. I guess the only downside in  
 my case is how convoluted the code is for applying the bgIframe to  
 the menu:
 
 $(document).ready(function(){
   $(.nav)
   .superfish({
   animation : { opacity:show,height:show}
   })
   .find(li[ul])
   .mouseover(function(){
   $(ul, this).bgIframe({opacity:false});
   })
   .find(a)
   .focus(function(){
   $(ul, 
 $(.navli[ul])).bgIframe({opacity:false});
   });
 });
 
 
 Thanks for your help Brandon.
 
 Cheers
 Joel.
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 
 

-- 
View this message in context: 
http://www.nabble.com/bgiframe-update%2C-sneak-peak-tf3402941.html#a9535921
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Ajax + Page title

2007-03-17 Thread Agrawal, Ritesh

Hi,

I wanted to know is it possible to set page title using ajax. Actually I
load certain content of my website using ajax and wanted to reset the title
to suit the current display. But I didn't find any way to do this. 

Regards,
Ritesh
-- 
View this message in context: 
http://www.nabble.com/Ajax-%2B-Page-title-tf3421485.html#a9536262
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Ajax + Page title

2007-03-17 Thread Erik Beeson

There's nothing AJAX or even jQuery specific about changing the page title.
Just set document.title:
document.title = My title;

Google 'javascript page title' for more info.

--Erik

On 3/17/07, Agrawal, Ritesh [EMAIL PROTECTED] wrote:



Hi,

I wanted to know is it possible to set page title using ajax. Actually I
load certain content of my website using ajax and wanted to reset the
title
to suit the current display. But I didn't find any way to do this.

Regards,
Ritesh
--
View this message in context:
http://www.nabble.com/Ajax-%2B-Page-title-tf3421485.html#a9536262
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] show/hide (as animation effect) behavior inconsistent with other effects?

2007-03-17 Thread CarComplaints.com

I've run across what seems to be several inconsistencies using 
.hide(...) as an animation, vs. the other base effects (jQuery 1.1.2). 
I'd appreciate it if someone could shed some light on whether the 
behavior is intended. Tested in FF2  IE7, same behavior in both.

$('#myDiv').hide(300).show(300);
...doesn't seem to queue the effects, or maybe it does but there's a bug 
in the final state of .hide(delay) so show() doesn't believe it's really 
hidden? Unlike the other base effects, .show()  .hide() appear to test 
the initial state of the object - see below. Flip-flopping the chained 
methods to .show(300).hide(300) displays the queues effects as you would 
expect. Next...

$('#myDiv').hide(300,function() {
 alert('.');
});
...the callback function does not execute if #myDiv is already hidden. 
Same behavior with .show(...) when the object is already visible. I can 
see how that might be logical, but wasn't sure because it's a different 
behavior from the other animation effects - the callback function 
execution of the other base effects are not dependent on the object's 
initial state.

Test page here: http://www.carcomplaints.com/show-hide-bug.html

Thanks,
-Wick

-- 
http://www.CarComplaints.com
What's wrong with YOUR car?


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/