[jQuery] Re: Reducing this code.

2007-04-16 Thread Klaus Hartl


Klaus Hartl schrieb:
I'd choose this approach in order to avoid typing the class name "on" in 
more than one place (which may lead to errors if you want to change that 
one and forget it somewhere - not here maybe but in larger chunks of code).


It actually avoids duplicating the whole code to access the parent, not 
only the class name...



-- Klaus




[jQuery] Re: Reducing this code.

2007-04-16 Thread Klaus Hartl


Sean Catchpole schrieb:

Hello,

Perhaps this would be a faster way of typing this (yet still easy to read):

$(function(){
$("fieldset").find("intput,select,textarea")
.focus(function(){ $(this).parent().addClass("on"); })
.blur(function(){ $(this).parent().removeClass("on"); });
});

Also note that http://www.jquery.com/api/ is an excellent resource for 
learning jQuery.


~Sean


My suggestion:

$(function(){
var toggle = function() { $(this).parent().toggleClass('on') };
$('fieldset").find('input, select, 
textarea').focus(toggle).blur(toggle);

});

I'd choose this approach in order to avoid typing the class name "on" in 
more than one place (which may lead to errors if you want to change that 
one and forget it somewhere - not here maybe but in larger chunks of code).



-- Klaus





[jQuery] Re: Reducing this code.

2007-04-16 Thread Karl Rudd


In Firefox you can use the "Profile" feature of Firebug (
http://www.getfirebug.com ).

For most other browsers you'd have to stick with something like this:

 var start = new Date().getTime();
 // stuff to time
 var milliseconds = (new Date().getTime()) - start;

Karl Rudd

On 4/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


 Thanks guys.

 As it would be negligible, there's no need to worry.

 But how would you test speed in js? (My background is php)




 Aaron Heimlich wrote:
Off hand I'd have to say Sean's is faster, since it's only searching for
"every fieldset in the document" once instead of three times like yours
(unless jQuery does some result caching that I'm not aware of, in which case
the difference is probably negligible). But, as Karl said, you'd really have
to test both of 'em if you wanna find out.


On 4/17/07, Karl Rudd <[EMAIL PROTECTED]> wrote:
>
> You'd have to test it. Could be either.
>
> Karl Rudd
>
> On 4/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> >  Thanks guys. Very helpful.
> >
> >  So, which would be faster...
> >
> >   $("fieldset input, fieldset select, fieldset textarea")
> >
> >  or
> >
> >  $("fieldset").find("intput,select,textarea")
> >
> >  Thanks x 1,000,000
> >
> >
> >  Karl Rudd wrote:
> >
> >  You're on the right track.
> >
> >  Yes you can join (or "chain") the "focus" and "blur" functions
together.
> >
> >  You also don't need to "return false" in the "focus" and "blur"
> >  functions, as that would/should "cancel" the event.
> >
> >  You can also replace $(document).ready( function() {... with $(
function()
> > {...
> >
> >  Here is what I would write (formatted how I usually like it):
> >
> >  $( function() {
> >  $("fieldset input, fieldset select, fieldset textarea")
> >  .focus( function() {
> >  $(this.parentNode).addClass("on");
> >  })
> >  .blur( function() {
> >  $(this.parentNode).removeClass("on");
> >  });
> >  });
> >
> >  On 4/17/07, fambizzari <[EMAIL PROTECTED]> wrote:
> >
> >
> >  I am just beginning my journey with jQuery and would like to know how
> >  the following could be summarised:
> >
> >  $(document).ready
> >  (
> >  function()
> >  {
> >  $("fieldset input, fieldset select, fieldset
> > textarea").focus
> >  (
> >  function()
> >  {
> >
this.parentNode.className = "container on";
> >  return false;
> >   }
> >  );
> >
> >  $("fieldset input, fieldset select, fieldset
> > textarea").blur
> >  (
> >  function()
> >  {
> >
this.parentNode.className = "container";
> >  return false;
> >   }
> >  );
> >  }
> >  );
> >
> >  This code is used on a form. When a form element is selected, it
> >  changes the classname of its parent (called "container") to "container
> >  on" (this class has some css attached to it). When the form element is
> >  de-selected, it changes the class name back to "container".
> >
> >  Notes:
> >  1) The code is split onto different lines to help me with
> >  visualisation because i am new to jQuery and am still getting used to
> >  it.
> >  2) Is there are shorter version of saying $("fieldset input, fieldset
> >  select, fieldset textarea").
> >  3) Is it really necessary to repeat the two functions - one for focus
> >  and one for blur - or can they be joined?
> >
> >  Thanks everyone.
> >  1) The way it is spread out on different lines is to help me visualise
> >  what's going on.
> >  2) The first area of summarisation i would
> >
> >
> >
> >
> >
> >
> >
>



 --
 Aaron Heimlich
 Web Developer
 [EMAIL PROTECTED]
 http://aheimlich.freepgs.com


[jQuery] Re: Reducing this code.

2007-04-16 Thread [EMAIL PROTECTED]

Thanks guys.

As it would be negligible, there's no need to worry.

But how would you test speed in js? (My background is php)



Aaron Heimlich wrote:

Off hand I'd have to say Sean's is faster, since it's only searching 
for "every fieldset in the document" once instead of three times like 
yours (unless jQuery does some result caching that I'm not aware of, 
in which case the difference is probably negligible). But, as Karl 
said, you'd really have to test both of 'em if you wanna find out.


On 4/17/07, *Karl Rudd* <[EMAIL PROTECTED] 
> wrote:



You'd have to test it. Could be either.

Karl Rudd

On 4/17/07, [EMAIL PROTECTED] 
<[EMAIL PROTECTED] > wrote:
>
>  Thanks guys. Very helpful.
>
>  So, which would be faster...
>
>   $("fieldset input, fieldset select, fieldset textarea")
>
>  or
>
>  $("fieldset").find("intput,select,textarea")
>
>  Thanks x 1,000,000
>
>
>  Karl Rudd wrote:
>
>  You're on the right track.
>
>  Yes you can join (or "chain") the "focus" and "blur" functions
together.
>
>  You also don't need to "return false" in the "focus" and "blur"
>  functions, as that would/should "cancel" the event.
>
>  You can also replace $(document).ready( function() {... with $(
function()
> {...
>
>  Here is what I would write (formatted how I usually like it):
>
>  $( function() {
>  $("fieldset input, fieldset select, fieldset textarea")
>  .focus( function() {
>  $(this.parentNode).addClass("on");
>  })
>  .blur( function() {
>  $(this.parentNode).removeClass("on");
>  });
>  });
>
>  On 4/17/07, fambizzari <[EMAIL PROTECTED]
> wrote:
>
>
>  I am just beginning my journey with jQuery and would like to
know how
>  the following could be summarised:
>
>  $(document).ready
>  (
>  function()
>  {
>  $("fieldset input, fieldset select, fieldset
> textarea").focus
>  (
>  function()
>  {
>  this.parentNode.className =
"container on";
>  return false;
>   }
>  );
>
>  $("fieldset input, fieldset select, fieldset
> textarea").blur
>  (
>  function()
>  {
>  this.parentNode.className =
"container";
>  return false;
>   }
>  );
>  }
>  );
>
>  This code is used on a form. When a form element is selected, it
>  changes the classname of its parent (called "container") to
"container
>  on" (this class has some css attached to it). When the form
element is
>  de-selected, it changes the class name back to "container".
>
>  Notes:
>  1) The code is split onto different lines to help me with
>  visualisation because i am new to jQuery and am still getting
used to
>  it.
>  2) Is there are shorter version of saying $("fieldset input,
fieldset
>  select, fieldset textarea").
>  3) Is it really necessary to repeat the two functions - one for
focus
>  and one for blur - or can they be joined?
>
>  Thanks everyone.
>  1) The way it is spread out on different lines is to help me
visualise
>  what's going on.
>  2) The first area of summarisation i would
>
>
>
>
>
>
>




--
Aaron Heimlich
Web Developer
[EMAIL PROTECTED] 
http://aheimlich.freepgs.com 




[jQuery] Re: Reducing this code.

2007-04-16 Thread Karl Rudd


Good point Aaron. I agree, I think Sean's would be better, and clearer.

Karl Rudd

On 4/17/07, Aaron Heimlich <[EMAIL PROTECTED]> wrote:

Off hand I'd have to say Sean's is faster, since it's only searching for
"every fieldset in the document" once instead of three times like yours
(unless jQuery does some result caching that I'm not aware of, in which case
the difference is probably negligible). But, as Karl said, you'd really have
to test both of 'em if you wanna find out.


On 4/17/07, Karl Rudd <[EMAIL PROTECTED]> wrote:
>
> You'd have to test it. Could be either.
>
> Karl Rudd
>
> On 4/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> >  Thanks guys. Very helpful.
> >
> >  So, which would be faster...
> >
> >   $("fieldset input, fieldset select, fieldset textarea")
> >
> >  or
> >
> >  $("fieldset").find("intput,select,textarea")
> >
> >  Thanks x 1,000,000
> >
> >
> >  Karl Rudd wrote:
> >
> >  You're on the right track.
> >
> >  Yes you can join (or "chain") the "focus" and "blur" functions
together.
> >
> >  You also don't need to "return false" in the "focus" and "blur"
> >  functions, as that would/should "cancel" the event.
> >
> >  You can also replace $(document).ready( function() {... with $(
function()
> > {...
> >
> >  Here is what I would write (formatted how I usually like it):
> >
> >  $( function() {
> >  $("fieldset input, fieldset select, fieldset textarea")
> >  .focus( function() {
> >  $(this.parentNode).addClass("on");
> >  })
> >  .blur( function() {
> >  $(this.parentNode).removeClass("on");
> >  });
> >  });
> >
> >  On 4/17/07, fambizzari <[EMAIL PROTECTED]> wrote:
> >
> >
> >  I am just beginning my journey with jQuery and would like to know how
> >  the following could be summarised:
> >
> >  $(document).ready
> >  (
> >  function()
> >  {
> >  $("fieldset input, fieldset select, fieldset
> > textarea").focus
> >  (
> >  function()
> >  {
> >
this.parentNode.className = "container on";
> >  return false;
> >   }
> >  );
> >
> >  $("fieldset input, fieldset select, fieldset
> > textarea").blur
> >  (
> >  function()
> >  {
> >
this.parentNode.className = "container";
> >  return false;
> >   }
> >  );
> >  }
> >  );
> >
> >  This code is used on a form. When a form element is selected, it
> >  changes the classname of its parent (called "container") to "container
> >  on" (this class has some css attached to it). When the form element is
> >  de-selected, it changes the class name back to "container".
> >
> >  Notes:
> >  1) The code is split onto different lines to help me with
> >  visualisation because i am new to jQuery and am still getting used to
> >  it.
> >  2) Is there are shorter version of saying $("fieldset input, fieldset
> >  select, fieldset textarea").
> >  3) Is it really necessary to repeat the two functions - one for focus
> >  and one for blur - or can they be joined?
> >
> >  Thanks everyone.
> >  1) The way it is spread out on different lines is to help me visualise
> >  what's going on.
> >  2) The first area of summarisation i would
> >
> >
> >
> >
> >
> >
> >
>



--
Aaron Heimlich
Web Developer
[EMAIL PROTECTED]
http://aheimlich.freepgs.com


[jQuery] Re: Reducing this code.

2007-04-16 Thread Aaron Heimlich

Off hand I'd have to say Sean's is faster, since it's only searching for
"every fieldset in the document" once instead of three times like yours
(unless jQuery does some result caching that I'm not aware of, in which case
the difference is probably negligible). But, as Karl said, you'd really have
to test both of 'em if you wanna find out.

On 4/17/07, Karl Rudd <[EMAIL PROTECTED]> wrote:



You'd have to test it. Could be either.

Karl Rudd

On 4/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>  Thanks guys. Very helpful.
>
>  So, which would be faster...
>
>   $("fieldset input, fieldset select, fieldset textarea")
>
>  or
>
>  $("fieldset").find("intput,select,textarea")
>
>  Thanks x 1,000,000
>
>
>  Karl Rudd wrote:
>
>  You're on the right track.
>
>  Yes you can join (or "chain") the "focus" and "blur" functions
together.
>
>  You also don't need to "return false" in the "focus" and "blur"
>  functions, as that would/should "cancel" the event.
>
>  You can also replace $(document).ready( function() {... with $(
function()
> {...
>
>  Here is what I would write (formatted how I usually like it):
>
>  $( function() {
>  $("fieldset input, fieldset select, fieldset textarea")
>  .focus( function() {
>  $(this.parentNode).addClass("on");
>  })
>  .blur( function() {
>  $(this.parentNode).removeClass("on");
>  });
>  });
>
>  On 4/17/07, fambizzari <[EMAIL PROTECTED]> wrote:
>
>
>  I am just beginning my journey with jQuery and would like to know how
>  the following could be summarised:
>
>  $(document).ready
>  (
>  function()
>  {
>  $("fieldset input, fieldset select, fieldset
> textarea").focus
>  (
>  function()
>  {
>  this.parentNode.className = "container
on";
>  return false;
>   }
>  );
>
>  $("fieldset input, fieldset select, fieldset
> textarea").blur
>  (
>  function()
>  {
>  this.parentNode.className =
"container";
>  return false;
>   }
>  );
>  }
>  );
>
>  This code is used on a form. When a form element is selected, it
>  changes the classname of its parent (called "container") to "container
>  on" (this class has some css attached to it). When the form element is
>  de-selected, it changes the class name back to "container".
>
>  Notes:
>  1) The code is split onto different lines to help me with
>  visualisation because i am new to jQuery and am still getting used to
>  it.
>  2) Is there are shorter version of saying $("fieldset input, fieldset
>  select, fieldset textarea").
>  3) Is it really necessary to repeat the two functions - one for focus
>  and one for blur - or can they be joined?
>
>  Thanks everyone.
>  1) The way it is spread out on different lines is to help me visualise
>  what's going on.
>  2) The first area of summarisation i would
>
>
>
>
>
>
>





--
Aaron Heimlich
Web Developer
[EMAIL PROTECTED]
http://aheimlich.freepgs.com


[jQuery] Re: Reducing this code.

2007-04-16 Thread Karl Rudd


You'd have to test it. Could be either.

Karl Rudd

On 4/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


 Thanks guys. Very helpful.

 So, which would be faster...

  $("fieldset input, fieldset select, fieldset textarea")

 or

 $("fieldset").find("intput,select,textarea")

 Thanks x 1,000,000


 Karl Rudd wrote:

 You're on the right track.

 Yes you can join (or "chain") the "focus" and "blur" functions together.

 You also don't need to "return false" in the "focus" and "blur"
 functions, as that would/should "cancel" the event.

 You can also replace $(document).ready( function() {... with $( function()
{...

 Here is what I would write (formatted how I usually like it):

 $( function() {
 $("fieldset input, fieldset select, fieldset textarea")
 .focus( function() {
 $(this.parentNode).addClass("on");
 })
 .blur( function() {
 $(this.parentNode).removeClass("on");
 });
 });

 On 4/17/07, fambizzari <[EMAIL PROTECTED]> wrote:


 I am just beginning my journey with jQuery and would like to know how
 the following could be summarised:

 $(document).ready
 (
 function()
 {
 $("fieldset input, fieldset select, fieldset
textarea").focus
 (
 function()
 {
 this.parentNode.className = "container on";
 return false;
  }
 );

 $("fieldset input, fieldset select, fieldset
textarea").blur
 (
 function()
 {
 this.parentNode.className = "container";
 return false;
  }
 );
 }
 );

 This code is used on a form. When a form element is selected, it
 changes the classname of its parent (called "container") to "container
 on" (this class has some css attached to it). When the form element is
 de-selected, it changes the class name back to "container".

 Notes:
 1) The code is split onto different lines to help me with
 visualisation because i am new to jQuery and am still getting used to
 it.
 2) Is there are shorter version of saying $("fieldset input, fieldset
 select, fieldset textarea").
 3) Is it really necessary to repeat the two functions - one for focus
 and one for blur - or can they be joined?

 Thanks everyone.
 1) The way it is spread out on different lines is to help me visualise
 what's going on.
 2) The first area of summarisation i would









[jQuery] Re: Reducing this code.

2007-04-16 Thread [EMAIL PROTECTED]

Thanks guys. Very helpful.

So, which would be faster...

$("fieldset input, fieldset select, fieldset textarea")

or

$("fieldset").find("intput,select,textarea")

Thanks x 1,000,000

Karl Rudd wrote:



You're on the right track.

Yes you can join (or "chain") the "focus" and "blur" functions together.

You also don't need to "return false" in the "focus" and "blur"
functions, as that would/should "cancel" the event.

You can also replace $(document).ready( function() {... with $( 
function() {...


Here is what I would write (formatted how I usually like it):

$( function() {
$("fieldset input, fieldset select, fieldset textarea")
.focus( function() {
$(this.parentNode).addClass("on");
})
.blur( function() {
$(this.parentNode).removeClass("on");
});
});

On 4/17/07, fambizzari <[EMAIL PROTECTED]> wrote:



I am just beginning my journey with jQuery and would like to know how
the following could be summarised:

$(document).ready
(
function()
{
$("fieldset input, fieldset select, fieldset 
textarea").focus

(
function()
{
this.parentNode.className = 
"container on";

return false;
 }
);

$("fieldset input, fieldset select, fieldset 
textarea").blur

(
function()
{
this.parentNode.className = "container";
return false;
 }
);
}
);

This code is used on a form. When a form element is selected, it
changes the classname of its parent (called "container") to "container
on" (this class has some css attached to it). When the form element is
de-selected, it changes the class name back to "container".

Notes:
1) The code is split onto different lines to help me with
visualisation because i am new to jQuery and am still getting used to
it.
2) Is there are shorter version of saying $("fieldset input, fieldset
select, fieldset textarea").
3) Is it really necessary to repeat the two functions - one for focus
and one for blur - or can they be joined?

Thanks everyone.
1) The way it is spread out on different lines is to help me visualise
what's going on.
2) The first area of summarisation i would









[jQuery] Re: Reducing this code.

2007-04-16 Thread Karl Rudd


You're on the right track.

Yes you can join (or "chain") the "focus" and "blur" functions together.

You also don't need to "return false" in the "focus" and "blur"
functions, as that would/should "cancel" the event.

You can also replace $(document).ready( function() {... with $( function() {...

Here is what I would write (formatted how I usually like it):

$( function() {
$("fieldset input, fieldset select, fieldset textarea")
.focus( function() {
$(this.parentNode).addClass("on");
})
.blur( function() {
$(this.parentNode).removeClass("on");
});
});

On 4/17/07, fambizzari <[EMAIL PROTECTED]> wrote:


I am just beginning my journey with jQuery and would like to know how
the following could be summarised:

$(document).ready
(
function()
{
$("fieldset input, fieldset select, fieldset textarea").focus
(
function()
{
this.parentNode.className = "container on";
return false;
 }
);

$("fieldset input, fieldset select, fieldset textarea").blur
(
function()
{
this.parentNode.className = "container";
return false;
 }
);
}
);

This code is used on a form. When a form element is selected, it
changes the classname of its parent (called "container") to "container
on" (this class has some css attached to it). When the form element is
de-selected, it changes the class name back to "container".

Notes:
1) The code is split onto different lines to help me with
visualisation because i am new to jQuery and am still getting used to
it.
2) Is there are shorter version of saying $("fieldset input, fieldset
select, fieldset textarea").
3) Is it really necessary to repeat the two functions - one for focus
and one for blur - or can they be joined?

Thanks everyone.
1) The way it is spread out on different lines is to help me visualise
what's going on.
2) The first area of summarisation i would




[jQuery] Re: Reducing this code.

2007-04-16 Thread Sean Catchpole

Hello,

Perhaps this would be a faster way of typing this (yet still easy to read):

$(function(){
   $("fieldset").find("intput,select,textarea")
   .focus(function(){ $(this).parent().addClass("on"); })
   .blur(function(){ $(this).parent().removeClass("on"); });
});

Also note that http://www.jquery.com/api/ is an excellent resource for
learning jQuery.

~Sean


[jQuery] Re: Autocomplete plugin status2

2007-04-16 Thread Dylan Verheul


On 4/17/07, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:

Another issue is Opera insisting on submitting the form when pressing
enter, even with event.preventDefault() called at the right moment, at
least it works in IE and Firefox. Anyone got an idea how that can be
avoided?


I've never been able to fix that, but it's been a while since I looked
into it, and I've hardly had any response from Opera users (my users
are mostly IE/FF with a pinch of Safari).


[jQuery] Reducing this code.

2007-04-16 Thread fambizzari

I am just beginning my journey with jQuery and would like to know how
the following could be summarised:

$(document).ready
(
function()
{
$("fieldset input, fieldset select, fieldset textarea").focus
(
function()
{
this.parentNode.className = "container on";
return false;
 }
);

$("fieldset input, fieldset select, fieldset textarea").blur
(
function()
{
this.parentNode.className = "container";
return false;
 }
);
}
);

This code is used on a form. When a form element is selected, it
changes the classname of its parent (called "container") to "container
on" (this class has some css attached to it). When the form element is
de-selected, it changes the class name back to "container".

Notes:
1) The code is split onto different lines to help me with
visualisation because i am new to jQuery and am still getting used to
it.
2) Is there are shorter version of saying $("fieldset input, fieldset
select, fieldset textarea").
3) Is it really necessary to repeat the two functions - one for focus
and one for blur - or can they be joined?

Thanks everyone.
1) The way it is spread out on different lines is to help me visualise
what's going on.
2) The first area of summarisation i would



[jQuery] Re: Find Y position of an element on the page

2007-04-16 Thread Dan G. Switzer, II

Brandon,

>Yeah I think I understand what you are saying but this has absolutely
>nothing to do with the offset method  or the dimensions plugin and
>everything to do with positioning and css. You could however clone the
>element, append to the body, set position absolute and top and left
>values to the element you cloned. That seems like it would get the
>desired effect. That is unless I'm not understanding! :)
>
>The offset method deals only with getting the offset of the element
>from the top left of the document.

I never said it was a problem--just that the dimensions plug-in lacked
anything for calculating this relative positioning issue. In my case, I
could clone the element. I was moving the location of a textarea element and
needed the cursor to stay put as well as keep it's tab index--so I had to
actually manipulate textarea element itself.

I was just saying it would have been nice if there was a built-in function
for calculating relative parent offsets. :)

-Dan



[jQuery] Re: Multiple .bind

2007-04-16 Thread Brandon Aaron


I believe this is the issue you are experiencing.
http://dev.jquery.com/ticket/935

--
Brandon Aaron

On 4/16/07, DaveG <[EMAIL PROTECTED]> wrote:


I'm binding a click function. If I include either one of the binds it
works -- so the syntax and object references are correct.

If I include both binds they do not work. No errors, they just don't
trigger.

function tocDisplay(e){
   $('#toc_content')[e.data.mode]();
}
$('#toc_header').bind('click', {mode: 'toggle'}, tocDisplay);
$('#toc_content a').bind('click', {mode: 'hide'}, tocDisplay);


Is there a problem binding the same function to multiple objects?

  ~ ~ Dave



[jQuery] Re: Library showdowns

2007-04-16 Thread Sean Catchpole

Jeffrey and Glen,

Allow me to explain currying. Imagine if you will the following function
(written in javascript)
add = function (a,b) { return a+b }
I can now call add(3,7) and it will return 10.
A language that allows currying would allow me to pass only one variable and
it would return a new function that takes a single variable. ex:
add(3)would return a function that adds three to the input. Here is an
example way
of implementing it in javascript:
add = function (a) { return function (b) { return a+b } }
Now I can call add(3) and it will return function (b) { return 3+b }
In the same sense as the first example we can now call add(3)(7) and it will
return 10.

This allows for lots of cleverness in use of functions and ultimately make
functions far more reusable. I consider it a great advantage of functional
programming. So as you can see, the same effect can be created, but it's
tedious. I'm trying to come up with a trickier way so that it's not so
painful to create a curried function in javascript.


~Sean


[jQuery] Multiple .bind

2007-04-16 Thread DaveG


I'm binding a click function. If I include either one of the binds it 
works -- so the syntax and object references are correct.


If I include both binds they do not work. No errors, they just don't 
trigger.


   function tocDisplay(e){
  $('#toc_content')[e.data.mode]();
   }
   $('#toc_header').bind('click', {mode: 'toggle'}, tocDisplay);
   $('#toc_content a').bind('click', {mode: 'hide'}, tocDisplay);


Is there a problem binding the same function to multiple objects?

 ~ ~ Dave


[jQuery] Re: $().append() problem

2007-04-16 Thread [EMAIL PROTECTED]

Yes. That makes more sense. Thanks.

On Apr 16, 9:28 pm, "Jeff S." <[EMAIL PROTECTED]> wrote:
> Are you sure appending is what you want to do?  Appending to an
>  does not really make sense to me.  Maybe using the after() or
> before() would make more sense.
>
> DIV beforeappend:
> 
> DIV afterappend:
> 
>
> INPUT beforeappend:
> 
> INPUT afterappend:
>  type="hidden" name="name"  value="some value" />
>
> On Apr 16, 9:33 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > I just noticed that I canappendOK in IE6 to a  block, but
> > not to a form element. In other words, appending to:
>
> >  <- does not
> > work
>
> > Appending to:
>
> >  <-  works
>
> > On Apr 16, 8:13 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > > I am appending a hidden form field similar to this:
>
> > > $("#some_id").append(" > > \"some value\">");
>
> > > Works fine in all Mac browsers but testing in IE6 on Windows it
> > > appears to not to get added to the DOM tree. The hidded value is not
> > > available when the form is submitted.
>
> > > Also tried $().html()
>
> > > IE6 reports "Unexpected call to method or property access"



[jQuery] Re: Will this code enable & disable a submit button?

2007-04-16 Thread limodou


On 4/17/07, Rick Faircloth <[EMAIL PROTECTED]> wrote:


> You would probably need to return a more complex object from the
> server that contained a boolean in addition to your text.  Structures
> and JSON/WDDX work well for that kind of thing.  You would then use
> the boolean to trigger an if () statement.

Ummm could you elaborate a little on that?  :o)


I tried the code of Sean, and it's ok, and I also can use this:



 var enabled = true;
 toggleSubmit = function(form){
   if(enabled)
 $("input:submit",form).attr("disabled",true);
   else
 $("input:submit",form).attr("disabled",false);
   enabled = !enabled;
 }



I use true or false, it's the same with 'disabled' or "". I tested it
in IE 6.0 and FF 2.0. jquery 1.1.2

--
I like python!
UliPad <>: http://wiki.woodpecker.org.cn/moin/UliPad
My Blog: http://www.donews.net/limodou


[jQuery] Re: Will this code enable & disable a submit button?

2007-04-16 Thread Rick Faircloth

> You would probably need to return a more complex object from the
> server that contained a boolean in addition to your text.  Structures
> and JSON/WDDX work well for that kind of thing.  You would then use
> the boolean to trigger an if () statement.

Ummm could you elaborate a little on that?  :o)

Rick


-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Daemach
Sent: Monday, April 16, 2007 10:14 PM
To: jQuery (English)
Subject: [jQuery] Re: Will this code enable & disable a submit button?


You would probably need to return a more complex object from the
server that contained a boolean in addition to your text.  Structures
and JSON/WDDX work well for that kind of thing.  You would then use
the boolean to trigger an if () statement. I

On Apr 16, 6:19 pm, "Rick Faircloth" <[EMAIL PROTECTED]> wrote:
> > Why are you declaring functions inside of your $(document).ready
>
> That was just a hangover from where I pulled that code... originally it
was
> part of Jorn's Validation plug-in...
>
> Since you've created an actual function called "toggleSubmit" to toggle
the
> button,
> how would I trigger that function, say, after this code, *if* the data
> return from the
> post is a string?  (In other words, the posted data was found to be
> Invalid...
>
> How would it be combined with this code:
>
> $("#Principal").blur(function(){
> $.post("callpage_Validate_Mortgage_Inputs.cfm",
> {principal:$("#Principal").val()},
> function (data) {$("#Result_Principal").empty().append(data) } )
});
>
> Pseudo-code:
>
> If, after the post (above), the posted data was Invalid, toggle
the
> button to a
> state of "disabled"...
>
> Rick
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>
> Behalf Of Sean Catchpole
> Sent: Monday, April 16, 2007 7:33 PM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: Will this code enable & disable a submit button?
>
> Rick,
>
> >  onInvalid: function(form) {
> Did you mean onInvalid = function(form){
>
> Why are you declaring functions inside of your $(document).ready() ?
>
> Below I've attached working code, give it a try:
>
> ~Sean
>
>  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
> http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
> Toggle Submit
> 
>  media="screen" />
> 
> * { margin:0px; padding:0px; }
> img { border:0px; }
> a {
>   outline:none;
>   display:block;
>   margin:14px;
>   font:14pt Calibri, Arial, sans-serif;
>   color:#000;
> }
> body { text-align:center; margin:30px; }
> 
>  src="http://jquery.com/src/jquery-latest.pack.js";>
> 
>
>   var enabled = true;
>   toggleSubmit = function(form){
> if(enabled)
>   $("input:submit",form).attr("disabled","disabled");
> else
>   $("input:submit",form).attr("disabled","");
> enabled = !enabled;
>   }
>
> 
> 
> 
> Toggle Submit
> 
> 
> 





[jQuery] Re: Will this code enable & disable a submit button?

2007-04-16 Thread Rick Faircloth

Check out this demo, Daemach, which uses Sean's
code below:

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

Rick



-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Daemach
Sent: Monday, April 16, 2007 10:11 PM
To: jQuery (English)
Subject: [jQuery] Re: Will this code enable & disable a submit button?


Actually to re-enable a disabled element you need to remove the
disabled attribute altogether - use:

 $(form).find("[EMAIL PROTECTED]").removeAttr("disabled");  or  $
("input:submit").removeAttr("disabled"); for short.

On Apr 16, 9:42 am, "Rick Faircloth" <[EMAIL PROTECTED]> wrote:
> Hi, all...
>
> Will the "onInvalid" and "onValid" lines in the code below work
> to enable & disable a submit button?
>
> Rick
>
> $(document).ready(function(){
>
> onInvalid: function(form) {
>  $(form).find("[EMAIL PROTECTED]").attr("disabled",
> "disabled");
>  };
>
> onValid: function(form) {
>  $(form).find("[EMAIL PROTECTED]").attr("disabled", "");
>  };
>
> $("#Principal").blur(function(){
> $.post("callpage_Validate_Mortgage_Inputs.cfm",
> {principal:$("#Principal").val()},
> function (data)
{$("#Result_Principal").empty().append(data)
>
> } ) });
>
> $("#Interest").blur(function(){
> $.post("callpage_Validate_Mortgage_Inputs.cfm",
> {interest:$("#Interest").val()},
> function (data)
{$("#Result_Interest").empty().append(data)
>
> }) });
>
> $("#Years").blur(function(){
>
> $.post("callpage_Validate_Mortgage_Inputs.cfm",{years:$("#Years").val()},
> function (data) {$("#Result_Years").empty().append(data)
})
>
> });
>
> $("#Calculate").click(function() { return
> CalculateMortgage(); });
>
> });





[jQuery] Re: New plugin: frameReady()

2007-04-16 Thread Daemach

So I did - thanks for the catch ;)

On Apr 16, 7:29 pm, "Ⓙⓐⓚⓔ" <[EMAIL PROTECTED]> wrote:
> looks like you got it! but you forgot to close the iframe in the demo xhtml
> doc!
>
>  src="/demos/frameReady/frametest.cfm">
>
> On 4/16/07, Daemach <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > frameReady works a lot like $(document).ready() with a few advantages
> > when working with frames:
>
> > $.frameReady(function,target,remote,jQuery);
>
> > -- Waits for the DOM to be ready in the target frame before running
> > code.
> > -- It can be run from within any frame or the root document.
> > -- Function is a standard anonymous function written as though you're
> > working with local elements.
> > -- Target can be any valid frame reference, including nested frames
> > and iFrames.  Must be a string.
> > -- Remote (default true) runs the function in the context of the
> > target frame so you can do $("p") instead of $
> > ("p",top.iFrame.mainFrame.document).
> > -- jQuery (default true if remote is true) will load jQuery in the
> > target frame before trying to run code if it doesn't exist there
> > already.  (you will need to specify a valid path for jQuery.js inside
> > the plugin).
>
> > Example:
>
> > $.frameReady(function(){
> >$("body").prepend('I'm a div');
> >$("#newDiv").css("color","red");
> > },"top.mainFrame");
>
> > It has only been tested in FF2 and IE7, so caveat emptor.  If there is
> > any interest in this I'll spend some time optimizing it.  At the
> > moment I'm using it on an intranet so it does what I need.
>
> > Demo & source here:http://ideamill.synaptrixgroup.com/?p=6
>
> --
> Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ



[jQuery] Re: New plugin: frameReady()

2007-04-16 Thread Ⓙⓐⓚⓔ

looks like you got it! but you forgot to close the iframe in the demo xhtml
doc!





On 4/16/07, Daemach <[EMAIL PROTECTED]> wrote:



frameReady works a lot like $(document).ready() with a few advantages
when working with frames:

$.frameReady(function,target,remote,jQuery);

-- Waits for the DOM to be ready in the target frame before running
code.
-- It can be run from within any frame or the root document.
-- Function is a standard anonymous function written as though you're
working with local elements.
-- Target can be any valid frame reference, including nested frames
and iFrames.  Must be a string.
-- Remote (default true) runs the function in the context of the
target frame so you can do $("p") instead of $
("p",top.iFrame.mainFrame.document).
-- jQuery (default true if remote is true) will load jQuery in the
target frame before trying to run code if it doesn't exist there
already.  (you will need to specify a valid path for jQuery.js inside
the plugin).

Example:

$.frameReady(function(){
   $("body").prepend('I'm a div');
   $("#newDiv").css("color","red");
},"top.mainFrame");

It has only been tested in FF2 and IE7, so caveat emptor.  If there is
any interest in this I'll spend some time optimizing it.  At the
moment I'm using it on an intranet so it does what I need.

Demo & source here: http://ideamill.synaptrixgroup.com/?p=6





--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ


[jQuery] Re: $().append() problem

2007-04-16 Thread Jeff S.

Are you sure appending is what you want to do?  Appending to an
 does not really make sense to me.  Maybe using the after() or
before() would make more sense.

DIV before append:

DIV after append:


INPUT before append:

INPUT after append:




On Apr 16, 9:33 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I just noticed that I can append OK in IE6 to a  block, but
> not to a form element. In other words, appending to:
>
>  <- does not
> work
>
> Appending to:
>
>  <-  works
>
> On Apr 16, 8:13 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > I am appending a hidden form field similar to this:
>
> > $("#some_id").append(" > \"some value\">");
>
> > Works fine in all Mac browsers but testing in IE6 on Windows it
> > appears to not to get added to the DOM tree. The hidded value is not
> > available when the form is submitted.
>
> > Also tried $().html()
>
> > IE6 reports "Unexpected call to method or property access"



[jQuery] Re: Will this code enable & disable a submit button?

2007-04-16 Thread Daemach

You would probably need to return a more complex object from the
server that contained a boolean in addition to your text.  Structures
and JSON/WDDX work well for that kind of thing.  You would then use
the boolean to trigger an if () statement. I

On Apr 16, 6:19 pm, "Rick Faircloth" <[EMAIL PROTECTED]> wrote:
> > Why are you declaring functions inside of your $(document).ready
>
> That was just a hangover from where I pulled that code... originally it was
> part of Jorn's Validation plug-in...
>
> Since you've created an actual function called "toggleSubmit" to toggle the
> button,
> how would I trigger that function, say, after this code, *if* the data
> return from the
> post is a string?  (In other words, the posted data was found to be
> Invalid...
>
> How would it be combined with this code:
>
> $("#Principal").blur(function(){
> $.post("callpage_Validate_Mortgage_Inputs.cfm",
> {principal:$("#Principal").val()},
> function (data) {$("#Result_Principal").empty().append(data) } ) });
>
> Pseudo-code:
>
> If, after the post (above), the posted data was Invalid, toggle the
> button to a
> state of "disabled"...
>
> Rick
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>
> Behalf Of Sean Catchpole
> Sent: Monday, April 16, 2007 7:33 PM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: Will this code enable & disable a submit button?
>
> Rick,
>
> >  onInvalid: function(form) {
> Did you mean onInvalid = function(form){
>
> Why are you declaring functions inside of your $(document).ready() ?
>
> Below I've attached working code, give it a try:
>
> ~Sean
>
>  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
> http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
> Toggle Submit
> 
>  media="screen" />
> 
> * { margin:0px; padding:0px; }
> img { border:0px; }
> a {
>   outline:none;
>   display:block;
>   margin:14px;
>   font:14pt Calibri, Arial, sans-serif;
>   color:#000;
> }
> body { text-align:center; margin:30px; }
> 
>  src="http://jquery.com/src/jquery-latest.pack.js";>
> 
>
>   var enabled = true;
>   toggleSubmit = function(form){
> if(enabled)
>   $("input:submit",form).attr("disabled","disabled");
> else
>   $("input:submit",form).attr("disabled","");
> enabled = !enabled;
>   }
>
> 
> 
> 
> Toggle Submit
> 
> 
> 



[jQuery] Re: Will this code enable & disable a submit button?

2007-04-16 Thread Daemach

Actually to re-enable a disabled element you need to remove the
disabled attribute altogether - use:

 $(form).find("[EMAIL PROTECTED]").removeAttr("disabled");  or  $
("input:submit").removeAttr("disabled"); for short.

On Apr 16, 9:42 am, "Rick Faircloth" <[EMAIL PROTECTED]> wrote:
> Hi, all...
>
> Will the "onInvalid" and "onValid" lines in the code below work
> to enable & disable a submit button?
>
> Rick
>
> $(document).ready(function(){
>
> onInvalid: function(form) {
>  $(form).find("[EMAIL PROTECTED]").attr("disabled",
> "disabled");
>  };
>
> onValid: function(form) {
>  $(form).find("[EMAIL PROTECTED]").attr("disabled", "");
>  };
>
> $("#Principal").blur(function(){
> $.post("callpage_Validate_Mortgage_Inputs.cfm",
> {principal:$("#Principal").val()},
> function (data) {$("#Result_Principal").empty().append(data)
>
> } ) });
>
> $("#Interest").blur(function(){
> $.post("callpage_Validate_Mortgage_Inputs.cfm",
> {interest:$("#Interest").val()},
> function (data) {$("#Result_Interest").empty().append(data)
>
> }) });
>
> $("#Years").blur(function(){
>
> $.post("callpage_Validate_Mortgage_Inputs.cfm",{years:$("#Years").val()},
> function (data) {$("#Result_Years").empty().append(data) })
>
> });
>
> $("#Calculate").click(function() { return
> CalculateMortgage(); });
>
> });



[jQuery] New plugin: frameReady()

2007-04-16 Thread Daemach

frameReady works a lot like $(document).ready() with a few advantages
when working with frames:

$.frameReady(function,target,remote,jQuery);

-- Waits for the DOM to be ready in the target frame before running
code.
-- It can be run from within any frame or the root document.
-- Function is a standard anonymous function written as though you're
working with local elements.
-- Target can be any valid frame reference, including nested frames
and iFrames.  Must be a string.
-- Remote (default true) runs the function in the context of the
target frame so you can do $("p") instead of $
("p",top.iFrame.mainFrame.document).
-- jQuery (default true if remote is true) will load jQuery in the
target frame before trying to run code if it doesn't exist there
already.  (you will need to specify a valid path for jQuery.js inside
the plugin).

Example:

$.frameReady(function(){
   $("body").prepend('I'm a div');
   $("#newDiv").css("color","red");
},"top.mainFrame");

It has only been tested in FF2 and IE7, so caveat emptor.  If there is
any interest in this I'll spend some time optimizing it.  At the
moment I'm using it on an intranet so it does what I need.

Demo & source here: http://ideamill.synaptrixgroup.com/?p=6



[jQuery] Re: $().append() problem

2007-04-16 Thread [EMAIL PROTECTED]

I just noticed that I can append OK in IE6 to a  block, but
not to a form element. In other words, appending to:

 <- does not
work

Appending to:

 <-  works

On Apr 16, 8:13 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I am appending a hidden form field similar to this:
>
> $("#some_id").append(" \"some value\">");
>
> Works fine in all Mac browsers but testing in IE6 on Windows it
> appears to not to get added to the DOM tree. The hidded value is not
> available when the form is submitted.
>
> Also tried $().html()
>
> IE6 reports "Unexpected call to method or property access"



[jQuery] Re: Will this code enable & disable a submit button?

2007-04-16 Thread Rick Faircloth

> Why are you declaring functions inside of your $(document).ready

That was just a hangover from where I pulled that code... originally it was
part of Jorn's Validation plug-in...

Since you've created an actual function called "toggleSubmit" to toggle the
button,
how would I trigger that function, say, after this code, *if* the data
return from the
post is a string?  (In other words, the posted data was found to be
Invalid...

How would it be combined with this code:

$("#Principal").blur(function(){ 
$.post("callpage_Validate_Mortgage_Inputs.cfm",
{principal:$("#Principal").val()},
function (data) {$("#Result_Principal").empty().append(data) } ) });

Pseudo-code:

If, after the post (above), the posted data was Invalid, toggle the
button to a
state of "disabled"...

Rick



-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Sean Catchpole
Sent: Monday, April 16, 2007 7:33 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Will this code enable & disable a submit button?


Rick,

>  onInvalid: function(form) {
Did you mean onInvalid = function(form){

Why are you declaring functions inside of your $(document).ready() ?

Below I've attached working code, give it a try:

~Sean

http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
Toggle Submit



* { margin:0px; padding:0px; }
img { border:0px; }
a {
  outline:none;
  display:block;
  margin:14px;
  font:14pt Calibri, Arial, sans-serif;
  color:#000;
}
body { text-align:center; margin:30px; }

http://jquery.com/src/jquery-latest.pack.js";>


  var enabled = true;
  toggleSubmit = function(form){
if(enabled)
  $("input:submit",form).attr("disabled","disabled");
else
  $("input:submit",form).attr("disabled","");
enabled = !enabled;
  }




Toggle Submit







[jQuery] $().append() problem

2007-04-16 Thread [EMAIL PROTECTED]

I am appending a hidden form field similar to this:

$("#some_id").append("");

Works fine in all Mac browsers but testing in IE6 on Windows it
appears to not to get added to the DOM tree. The hidded value is not
available when the form is submitted.

Also tried $().html()

IE6 reports "Unexpected call to method or property access"



[jQuery] Re: serialize problems w/ select menu on IE

2007-04-16 Thread Brandon Aaron


Adding the value attribute should solve the problem but if it doesn't
you might want to try using the form plugin. It provides a very robust
serialize method called formSerialize.
http://www.malsup.com/jquery/form/#api

--
Brandon Aaron

On 4/16/07, Brad Perkins <[EMAIL PROTECTED]> wrote:


I'm using jQuery 1.1.2.

I'm using this code to serialize form data before an Ajax submit.

var params = $('input,select,textarea').serialize();

The form has multiple select menus. On IE 6 and IE 7 the value from
one select is always blank when serialized regardless of the selected
option. This is causing the form to not validate server side.

The HTML for the  is


Select One...
OUT-SPARE
OUT-REPAIR
OUT-CALIBRATION
OUT-DECOMMISSIONED
OUT-OTHER
SHIPPED-REPAIR
SHIPPED-CALIBRATION
SHIPPED-BETWEEN SITES


Firefox and Opera work fine. Safari, Firefox and Camino when tested on
a Mac work fine too.

Any ideas?

Thanks,

Brad



[jQuery] Re: Library showdowns

2007-04-16 Thread Brandon Aaron


I believe Interface has added the ability to stop and maybe pause. The
last time I played with Dojo it was able to pause an animation but
that was a while back. YUI and Scriptaculous ... I'm not sure off
hand. I'd have to venture into their docs/source.

--
Brandon Aaron

On 4/16/07, Brian Cherne <[EMAIL PROTECTED]> wrote:

There's got to be someone on the list who knows of something jQuery can't do
that Scriptaculous, YUI or Dojo can do. For instance, does any know if
another library can cancel/freeze/stop an animation that is in progress?

Brian.


On 4/16/07, Sean Catchpole <[EMAIL PROTECTED]> wrote:
>
> Interesting find Karl, Thanks
>
> I'm still trying to see if I can find a graceful way to implement
> curried functions, but that method is elegant in it's own sense.
>
> ~Sean
>




[jQuery] Re: Find Y position of an element on the page

2007-04-16 Thread Brandon Aaron


Yeah I think I understand what you are saying but this has absolutely
nothing to do with the offset method  or the dimensions plugin and
everything to do with positioning and css. You could however clone the
element, append to the body, set position absolute and top and left
values to the element you cloned. That seems like it would get the
desired effect. That is unless I'm not understanding! :)

The offset method deals only with getting the offset of the element
from the top left of the document.

--
Brandon Aaron

On 4/16/07, Dan G. Switzer, II <[EMAIL PROTECTED]> wrote:


Brandon,

>Could you send me some example code of the problem you are having? I
>can't reproduce the issue you describe. Which browser is it in? The
>offset method goes to great lengths to squash browser inconsistencies
>with getting the offset of an element and there are lots of them. I'm
>sure I've missed a few so if you find any issues, just shoot me an
>email or open a ticket. I can usually get it worked out pretty
>quickly.

Ok, my original description may not have been a very accurate description of
the issue. The link below shows off the "issue":

http://www.pengoworks.com/workshop/jquery/dimension.htm

When you click button, it sets the following CSS properties:

position: absolute;
top: 0px;
left: 0px;

One might expect the Cell 2 to go to the top/left of the screen, but instead
it goes to the top/left of the first parent w/a relative position.

So, in order to place the element at the top/left of the screen, you'd need
to offset the element w/the position of the parent w/the relative position.

NOTE: You can do this by setting the Cell2 element to relative and moving to
the top/left offset multiple by negative 1. However, in my case I need to
move the position to absolute position.

In the plug-in I was working on, I need to center an element to the
viewpoint and change it's positioning to absolute. Because the element was
contained in a relative div, I need to do some negative offsetting to find
the true top/left of the viewpoint.

So what I ended up doing is going through the parents() and looking for
elements with an relative positioning and then adjusting my element
accordingly.

Hopefully this illustrates the problem clearly.

-Dan




[jQuery] Re: Trouble with BlockUI in IE 7

2007-04-16 Thread C-J Berg

I did a quick test and found out that the spinner is related to the
cursor style. I changed the code like this in my sample page:

window.setTimeout('$.unblockUI();$("*").css("cursor","default");',
5000);

That made the spinner stop.

// C-J

On Apr 17, 2:39 am, "C-J Berg" <[EMAIL PROTECTED]> wrote:
> It works great! Thanks a lot!
>
> The page gets a little too big when it's blocked, but that can be
> related to my simple CSS or even impossible to fix in quirks mode.
> That's not a problem anyway.
>
> By the way, I noticed the page load indicator in IE 7 (the spinner
> image on the page's tab) starts spinning when blockUI is invoked, but
> it doesn't stop when it's unblocked. Is it an IE 7 bug, or is
> something not reset by the script? Or did I do something wrong? (I
> don't know what triggers it. Is it cursor:wait on the body element or
> something?)
>
> C-J
>
> On Apr 17, 2:17 am, "Mike Alsup" <[EMAIL PROTECTED]> wrote:
>
> > I think I fixed the problem.  Can you try the latest version (1.08)?
>
> >http://dev.jquery.com/browser/trunk/plugins/blockUI/jquery.block.js?f...
>
> > Mike
>
> > On 4/16/07, Mike Alsup <[EMAIL PROTECTED]> wrote:
>
> > > Hi C-J,
>
> > > I think the problem has to do with quirks mode.  Can you try it with a
> > > strict doctype?
>
> > > Mike
>
> > > > I ran into a problem with BlockUI when I tried to use it on one of my
> > > > company's old sites (so please, don't get started on the awful table-
> > > > based layout). The overlay and the message are incorrectly positioned.
> > > > I can make it work by hacking the code to use the IE6 absolute
> > > > positioning code.
>
> > > > Here's an example page to recreate the problem:
>
> > > > 
> > > > 



[jQuery] Re: Trouble with BlockUI in IE 7

2007-04-16 Thread C-J Berg

It works great! Thanks a lot!

The page gets a little too big when it's blocked, but that can be
related to my simple CSS or even impossible to fix in quirks mode.
That's not a problem anyway.

By the way, I noticed the page load indicator in IE 7 (the spinner
image on the page's tab) starts spinning when blockUI is invoked, but
it doesn't stop when it's unblocked. Is it an IE 7 bug, or is
something not reset by the script? Or did I do something wrong? (I
don't know what triggers it. Is it cursor:wait on the body element or
something?)

C-J

On Apr 17, 2:17 am, "Mike Alsup" <[EMAIL PROTECTED]> wrote:
> I think I fixed the problem.  Can you try the latest version (1.08)?
>
> http://dev.jquery.com/browser/trunk/plugins/blockUI/jquery.block.js?f...
>
> Mike
>
> On 4/16/07, Mike Alsup <[EMAIL PROTECTED]> wrote:
>
> > Hi C-J,
>
> > I think the problem has to do with quirks mode.  Can you try it with a
> > strict doctype?
>
> > Mike
>
> > > I ran into a problem with BlockUI when I tried to use it on one of my
> > > company's old sites (so please, don't get started on the awful table-
> > > based layout). The overlay and the message are incorrectly positioned.
> > > I can make it work by hacking the code to use the IE6 absolute
> > > positioning code.
>
> > > Here's an example page to recreate the problem:
>
> > > 
> > > 



[jQuery] Re: Library showdowns

2007-04-16 Thread Glen Lipka

On 4/16/07, Sean Catchpole <[EMAIL PROTECTED]> wrote:



Interesting find Karl, Thanks

I'm still trying to see if I can find a graceful way to implement
curried functions, but that method is elegant in it's own sense.

~Sean



Does this have something to do with Indian food?
Seriously though, if you send me the code sample, I will put it up as a
showdown right away.  Then all you need to do is get some other library
samples.

I really think it's valuable to have a library of comparisons.  Its not all
about "which is better".  It's about "what is the difference?"
Well, I'm trying to focus on that anyway.
Glen


[jQuery] Re: Trouble with BlockUI in IE 7

2007-04-16 Thread C-J Berg

Hi Mike,

Yes, it's related to quirks mode. However, changing this old site to
standards mode wouldn't be fun, so I'd rather not do it.

Maybe you can use document.compatMode to switch between different
rendering techniques in IE? (http://msdn.microsoft.com/workshop/author/
dhtml/reference/properties/compatmode.asp)

// C-J

On Apr 17, 2:06 am, "Mike Alsup" <[EMAIL PROTECTED]> wrote:
> Hi C-J,
>
> I think the problem has to do with quirks mode.  Can you try it with a
> strict doctype?
>
> Mike
>
> > I ran into a problem with BlockUI when I tried to use it on one of my
> > company's old sites (so please, don't get started on the awful table-
> > based layout). The overlay and the message are incorrectly positioned.
> > I can make it work by hacking the code to use the IE6 absolute
> > positioning code.
>
> > Here's an example page to recreate the problem:
>
> > 
> > 



[jQuery] Re: Library showdowns

2007-04-16 Thread Jeffrey Kretz

Could you give more specifics about what you'd like to accomplish?  Or what
you mean by graceful?

The wiki article on Currying gives a javascript example:

--
function addN(n) {
   var curry = function(x) {
   return x + n;
   };
   return curry;
}
--
add2 = addN(2);
alert(add2);
alert(add2(7));
--

Seems relatively clean.

JK


-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Sean Catchpole
Sent: Monday, April 16, 2007 4:52 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Library showdowns


Interesting find Karl, Thanks

I'm still trying to see if I can find a graceful way to implement
curried functions, but that method is elegant in it's own sense.

~Sean



[jQuery] Re: Library showdowns

2007-04-16 Thread Brian Cherne

There's got to be someone on the list who knows of something jQuery can't do
that Scriptaculous, YUI or Dojo can do. For instance, does any know if
another library can cancel/freeze/stop an animation that is in progress?

Brian.

On 4/16/07, Sean Catchpole <[EMAIL PROTECTED]> wrote:



Interesting find Karl, Thanks

I'm still trying to see if I can find a graceful way to implement
curried functions, but that method is elegant in it's own sense.

~Sean



[jQuery] Re: Trouble with BlockUI in IE 7

2007-04-16 Thread Mike Alsup


I think I fixed the problem.  Can you try the latest version (1.08)?

http://dev.jquery.com/browser/trunk/plugins/blockUI/jquery.block.js?format=txt

Mike


On 4/16/07, Mike Alsup <[EMAIL PROTECTED]> wrote:

Hi C-J,

I think the problem has to do with quirks mode.  Can you try it with a
strict doctype?

Mike

> I ran into a problem with BlockUI when I tried to use it on one of my
> company's old sites (so please, don't get started on the awful table-
> based layout). The overlay and the message are incorrectly positioned.
> I can make it work by hacking the code to use the IE6 absolute
> positioning code.
>
> Here's an example page to recreate the problem:
>
> 
> 



[jQuery] Re: serialize problems w/ select menu on IE

2007-04-16 Thread Jeffrey Kretz

I might be barking up the wrong tree, but I would suggest assigning a
specific value to each of the option elements and give it another try.

JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Brad Perkins
Sent: Monday, April 16, 2007 4:25 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] serialize problems w/ select menu on IE


I'm using jQuery 1.1.2.

I'm using this code to serialize form data before an Ajax submit.

var params = $('input,select,textarea').serialize();

The form has multiple select menus. On IE 6 and IE 7 the value from
one select is always blank when serialized regardless of the selected
option. This is causing the form to not validate server side.

The HTML for the  is


Select One...
OUT-SPARE
OUT-REPAIR
OUT-CALIBRATION
OUT-DECOMMISSIONED
OUT-OTHER
SHIPPED-REPAIR
SHIPPED-CALIBRATION
SHIPPED-BETWEEN SITES


Firefox and Opera work fine. Safari, Firefox and Camino when tested on
a Mac work fine too.

Any ideas?

Thanks,

Brad



[jQuery] Re: Trouble with BlockUI in IE 7

2007-04-16 Thread Mike Alsup


Hi C-J,

I think the problem has to do with quirks mode.  Can you try it with a
strict doctype?

Mike


I ran into a problem with BlockUI when I tried to use it on one of my
company's old sites (so please, don't get started on the awful table-
based layout). The overlay and the message are incorrectly positioned.
I can make it work by hacking the code to use the IE6 absolute
positioning code.

Here's an example page to recreate the problem:





[jQuery] Re: Form plugin: file upload question

2007-04-16 Thread cdomigan

And by the way, thanks so much for this plugin Mike. It's the best
thing since sliced bread, even that really really tasty bread - the
stuff with big seeds in it. M



[jQuery] Re: Library showdowns

2007-04-16 Thread Sean Catchpole


Interesting find Karl, Thanks

I'm still trying to see if I can find a graceful way to implement
curried functions, but that method is elegant in it's own sense.

~Sean


[jQuery] Re: Library showdowns

2007-04-16 Thread Karl Rudd


Do you mean something like this?:

 http://www.dustindiaz.com/javascript-curry/

Karl Rudd

On 4/17/07, Sean Catchpole <[EMAIL PROTECTED]> wrote:


Jake,

Here's a problem that jQuery can't do.

It doesn't support Curried Functions.

Now that's not really fair because javascript does not support curried
functions either.
http://en.wikipedia.org/wiki/Curried_function

But I can think of a way that one could hack the same effect, can you?

~Sean



[jQuery] Re: Horizontal Menu Plugin

2007-04-16 Thread Jeff S.

Not exactly sure.. Maybe minitabs or "fancy menu"?  At one point I was
gonna work on a jQuery plugin to do something like one of these, but
got sidetracked.

http://www.frequency-decoder.com/demo/animated-minitabs/

http://www.simplebits.com/bits/minitabs.html
http://www.rootarcana.com/test/smartmini/
http://www.sgclark.com/sandbox/minislide/

http://www.raychung.com/
http://devthought.com/cssjavascript-true-power-fancy-menu/







On Apr 16, 5:48 pm, "James" <[EMAIL PROTECTED]> wrote:
> I recall a horizontal navigation menu which when the user clicked on
> an option, the background-color from the selected menu item slid
> dynamically over to the newly clicked item.
>
> Does anyone recall the name of this plugin / feature, or the site
> where I might find it? I've been looking with no real success as of
> yet.
>
> Thanks in advance!
>
> James



[jQuery] Re: Library showdowns

2007-04-16 Thread Sean Catchpole


Jake,

Here's a problem that jQuery can't do.

   It doesn't support Curried Functions.

Now that's not really fair because javascript does not support curried
functions either.
http://en.wikipedia.org/wiki/Curried_function

But I can think of a way that one could hack the same effect, can you?

~Sean


[jQuery] Re: Will this code enable & disable a submit button?

2007-04-16 Thread Sean Catchpole


Rick,


 onInvalid: function(form) {

Did you mean onInvalid = function(form){

Why are you declaring functions inside of your $(document).ready() ?

Below I've attached working code, give it a try:

~Sean

http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
Toggle Submit



* { margin:0px; padding:0px; }
img { border:0px; }
a {
 outline:none;
 display:block;
 margin:14px;
 font:14pt Calibri, Arial, sans-serif;
 color:#000;
}
body { text-align:center; margin:30px; }

http://jquery.com/src/jquery-latest.pack.js";>


 var enabled = true;
 toggleSubmit = function(form){
   if(enabled)
 $("input:submit",form).attr("disabled","disabled");
   else
 $("input:submit",form).attr("disabled","");
   enabled = !enabled;
 }




Toggle Submit





[jQuery] Re: Updated plugin: jqTOC -- table of contents

2007-04-16 Thread DaveG


Joel Birch wrote:
This looks awesome Dave. I like that it is a more "finished" product 
than my plugin so there is less left to the developer to do to get it 
working and looking great.
Not so sure about more finished, but thanks. You code helped a lot, but 
much of it was beyond my current understanding -- one day :)


I also like that you can see the hierarchy of headings in the list. 
Currently you are using CSS to emulate the look of nested lists. Would 
it be better if the list of links had more sematics ie. actual nested 
ordered (maybe unordered) lists rather than a string of anchor tags 
within a div?
In this case, I'm not sure what the added sematics would buy. 
Particularly when compared to the slight increase in code where we'd 
need to track opening and closing list tags. Especially if headers are 
not in strict H1, H2, H3 order, and were H1, H3, H2. The way it 
currently works is to simply increase the margin to obtain the 
appropriate indent.



The code is nice and brief and looks pretty optimal, good job.

Again, thanks.



[jQuery] serialize problems w/ select menu on IE

2007-04-16 Thread Brad Perkins


I'm using jQuery 1.1.2.

I'm using this code to serialize form data before an Ajax submit.

var params = $('input,select,textarea').serialize();

The form has multiple select menus. On IE 6 and IE 7 the value from
one select is always blank when serialized regardless of the selected
option. This is causing the form to not validate server side.

The HTML for the  is


Select One...
OUT-SPARE
OUT-REPAIR
OUT-CALIBRATION
OUT-DECOMMISSIONED
OUT-OTHER
SHIPPED-REPAIR
SHIPPED-CALIBRATION
SHIPPED-BETWEEN SITES


Firefox and Opera work fine. Safari, Firefox and Camino when tested on
a Mac work fine too.

Any ideas?

Thanks,

Brad


[jQuery] Re: to change tab for enter

2007-04-16 Thread BethaSidik


I've created the plugin for this purposes, name is enter2tab plugin.
This plugin created for my project, that develop a web application that
behave like normal window application, which can use enter to move on the
next field. 

The plugin needs you to explicitly add a tabindex for every element in the
form, especially input and select. Why? Because the plugin just work for
input and select element.

So, the plugin itself is placed in
http://swik.net/User:bethasidik/jQuery+Plugin+Enter2Tab

Ok, hope this plugin is useful for you.

/betha
-- 
View this message in context: 
http://www.nabble.com/to-change-tab-for-enter-tf3584151s15494.html#a10026674
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: Updated plugin: jqTOC -- table of contents

2007-04-16 Thread DaveG




It might be nice to have an "autohide" type behavior after x seconds on that
Content menu. 
Basically a delay on closing after clicking? Not sure that would be to 
intuitive. A delay on closing after mouse out might make sense though. I 
was considering triggering on mouse over, so that might work well.


[jQuery] Re: Form plugin: file upload question

2007-04-16 Thread Mike Alsup


Ah, I love those kind of problems!  Glad you figured it out.

Cheers!

Mike


On 4/16/07, cdomigan <[EMAIL PROTECTED]> wrote:


Whoopsy For future reference - when wanting functionality from the
0.96 version of the Form plugin, make sure NOT to include the 0.91
version...

Sorry everyone! :)




[jQuery] Re: Updated plugin: jqTOC -- table of contents

2007-04-16 Thread DaveG



The other thing I need to fix is IE6 support for fixed positioning.

IE6 now works, and 5 *should* work.


[jQuery] Problem with AJAX and links

2007-04-16 Thread digital spaghetti


Hey folks,

I've been working on this one with a little help, but i'm now stuck.

I have an AJAX interface, where I want all internal links to load
content into a specific div called .content.  The issue is it works,
except for link in content thats loaded into the div.

So far, here is what I have:

function hijackLinks(root) {
$('a',root).bind('click', function(){
  $('.content').load(this.href);
  return false;
});
};

This is the function that I pass the clicked link in to, I take it's
href and load the page into the .content div.

$(document).ready(function() {
  hijackLinks(document);
});

This loads the function on first load.  Then I do this:

$().ajaxStart(function(){
$.blockUI
hijackLinks($('.content').get(0));
});

$().ajaxStop(function(){
$.unblockUI;
hijackLinks($('.content').get(0));
});

i've called the function on both ajaxStart() and ajaxStop() to reload
the function into the page, but doesn't seem to work.  Can anyone
maybe help?

THanks,
Tane


[jQuery] Re: Form plugin: file upload question

2007-04-16 Thread cdomigan

Whoopsy For future reference - when wanting functionality from the
0.96 version of the Form plugin, make sure NOT to include the 0.91
version...

Sorry everyone! :)



[jQuery] Re: Autocomplete plugin status2

2007-04-16 Thread Jörn Zaefferer


Jörn Zaefferer schrieb:


Hi folks,

for anyone interested in the progess of the autocomplete plugin I've 
uploaded the current demo: http://jquery.bassistance.de/autocomplete/
I think I've fix the most serious issues. The latest version is in svn, 
the demo at the same URL.


I've got reports about crashes in safari (not in webkit nightlies) and 
an idea how that could be avoided.


Another issue is Opera insisting on submitting the form when pressing 
enter, even with event.preventDefault() called at the right moment, at 
least it works in IE and Firefox. Anyone got an idea how that can be 
avoided?


--
Jörn Zaefferer

http://bassistance.de



[jQuery] Re: Showing a bind(click...) as clickable

2007-04-16 Thread Jörn Zaefferer


wyo schrieb:

On 15 Apr., 18:27, "Brian Cherne" <[EMAIL PROTECTED]> wrote:
  

You could chain this on the end of $('#prev')

.hover(
   function(){ $(this).addClass('isOver'); }, // don't forget the comma
   function(){ $(this).removeClass('isOver'); }
);



".hover" is this a jQuery function? Where is it described?
  

http://jquery.bassistance.de/api-browser/#hoverFunctionFunction
http://docs.jquery.com/Events#hover.28_over.2C_out_.29

--
Jörn Zaefferer

http://bassistance.de



[jQuery] Trouble with BlockUI in IE 7

2007-04-16 Thread C-J Berg

(If this is a duplicate post, I'm sorry. I created it on the Nabble
Forums before I joined the mailing list, so it ended up on the forum,
but the mailing-list didn't accept it.)

Hi,

I ran into a problem with BlockUI when I tried to use it on one of my
company's old sites (so please, don't get started on the awful table-
based layout). The overlay and the message are incorrectly positioned.
I can make it work by hacking the code to use the IE6 absolute
positioning code.

Here's an example page to recreate the problem:





BlockUI Test Page



function block() {
 $.blockUI();
 window.setTimeout('$.unblockUI()', 5000);
 return false;
}
$(function() { $('td').click(block) });


* {
 margin: 0;
 padding: 0;
 font-size: 130%;
 text-align: center;
}
.table {
 border: 0;
 height: 100%;
 width: 100%;
 border-collapse:collapse;
}
.cell1 {
 background-color: #CCFFCC;
}
.cell2 {
 background-color: #FF;
}
.cell3 {
 background-color: #FF;
}




 
  Click to block
 
 
  Click to block
  Click to block
 





Cheers,

C-J



[jQuery] Horizontal Menu Plugin

2007-04-16 Thread James

I recall a horizontal navigation menu which when the user clicked on
an option, the background-color from the selected menu item slid
dynamically over to the newly clicked item.

Does anyone recall the name of this plugin / feature, or the site
where I might find it? I've been looking with no real success as of
yet.

Thanks in advance!

James



[jQuery] Re: Form plugin: file upload question

2007-04-16 Thread Jan Sorgalla


> > Just to make sure: Do you have enctype="multipart/form-data" as
> > attribute in your form tag?
>
> The plugin does that for you.  :-)

Ok ;)
Just saw guys debugging for hours before they noticed that they just
forgot it...

Jan



[jQuery] Re: New to jQuery and struggling

2007-04-16 Thread skimber


On Apr 16, 2:36 pm, Joel Birch <[EMAIL PROTECTED]> wrote:
> Yes there are always exceptions, which is I have been wracking my  
> brain trying to think of the one ones that apply here, so thanks for  
> your input Dan.

I use JS/jQuery inline when I'm working on a dynamic PHP site with an
included header and footer for example.  I don't want to be including
the jquery library or code on every single page of a site - or adding
extra logic in my templates - when it's only needed for a few pages.



[jQuery] Re: Form plugin: file upload question

2007-04-16 Thread Mike Alsup



Just to make sure: Do you have enctype="multipart/form-data" as
attribute in your form tag?


The plugin does that for you.  :-)


[jQuery] Re: New to jQuery and struggling

2007-04-16 Thread wls

> However, I am trying to add an additional $(document).ready(function()
> {}); in the middle of the document (i.e. inline) but it is not working
> and i don't know why.

I don't believe that you're going to find behavior chained.  Doing so
raises the interesting question of does your second function get
inserted before or after the existing chain, and if you are fairly
determined it should be one way, there's a dozen other people who can
reason why it should be the other.

The way I've been able to resolve this mentally is to consider that
each DOM's element handler has a single behavior associated with it.
When you invoke jQuery, you're patching that behavior handler.

Consider the case where you might have a button on the screen that
handles an onClick() event.  However, depending on some state, you
might want that button's behavior to change.  If you were simply
appending to handler chain, things could get really hairy.  Instead,
the solution is just to replace it.

Now, note, this is not a bad thing.  There is nothing at all that
prevents your .ready()'s anonymous function from walking through an
array of functions.  Effectively, doing a for-each like invocation on
everything.  That would allow you to register, in-line as you please,
additional functions, and at the end of it the ready() function would
do it's thing.

In short, make your function do the work, as you'll find the other
libraries do the same thing.  You can get the intended behavior, which
is to have one re-usable function who's job is to execute all the
things you ask it to.

-wls



[jQuery] Re: Find Y position of an element on the page

2007-04-16 Thread Dan G. Switzer, II

Brandon,

>Could you send me some example code of the problem you are having? I
>can't reproduce the issue you describe. Which browser is it in? The
>offset method goes to great lengths to squash browser inconsistencies
>with getting the offset of an element and there are lots of them. I'm
>sure I've missed a few so if you find any issues, just shoot me an
>email or open a ticket. I can usually get it worked out pretty
>quickly.

Ok, my original description may not have been a very accurate description of
the issue. The link below shows off the "issue":

http://www.pengoworks.com/workshop/jquery/dimension.htm

When you click button, it sets the following CSS properties:

position: absolute;
top: 0px;
left: 0px;

One might expect the Cell 2 to go to the top/left of the screen, but instead
it goes to the top/left of the first parent w/a relative position.

So, in order to place the element at the top/left of the screen, you'd need
to offset the element w/the position of the parent w/the relative position.

NOTE: You can do this by setting the Cell2 element to relative and moving to
the top/left offset multiple by negative 1. However, in my case I need to
move the position to absolute position.

In the plug-in I was working on, I need to center an element to the
viewpoint and change it's positioning to absolute. Because the element was
contained in a relative div, I need to do some negative offsetting to find
the true top/left of the viewpoint. 

So what I ended up doing is going through the parents() and looking for
elements with an relative positioning and then adjusting my element
accordingly.

Hopefully this illustrates the problem clearly.

-Dan



[jQuery] Re: to change tab for enter

2007-04-16 Thread Fabyo


Thanks perfect, perfect, perfect

thanks Robert


Roberto Ortelli wrote:
> 
> 
> Just a first attempt, I don't like it, and you need to add a few lines
> of code ; )
> 
> $("[EMAIL PROTECTED]").bind("keydown",function(e){
> if (e.keyCode == 13) {
> tabIndex = parseFloat($(this).attr("tabindex")) + 1;
> $("[EMAIL PROTECTED]")[tabIndex].focus();
> return false;
> }
> });
> 
> 
> 2007/4/16, Fabyo <[EMAIL PROTECTED]>:
>>
>>
>> [b]onsubmit[/b] = ( is use Unobtrusive JavaScript
>>
>>
>> Leonardo K wrote:
>> >
>> > Start tabindex with number 1.
>> >
>> > Without label:
>> >
>> > 
>> >Campo 1: 
>> >Campo 2: 
>> >Campo 3: 
>> >Campo 4: 
>> >Campo 5: 
>> >
>> > 
>> >
>> > With label:
>> >
>> > 
>> >Campo1:  > > name="campo1"
>> > id='campo1' tabindex='1'/>
>> >Campo2:  > > name="campo2"
>> > id='campo2' tabindex='2'/>
>> >Campo3:  > > name="campo3"
>> > id='campo3' tabindex='3'/>
>> >Campo4:  > > name="campo4"
>> > id='campo4' tabindex='4'/>
>> >Campo5:  > > name="campo5"
>> > id='campo5' tabindex='5'/>
>> >
>> > 
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/to-change-tab-for-enter-tf3584151s15494.html#a10021923
>> Sent from the JQuery mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Roberto Ortelli
> http://weblogger.ch
> 
> 

-- 
View this message in context: 
http://www.nabble.com/to-change-tab-for-enter-tf3584151s15494.html#a10024056
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: to change tab for enter

2007-04-16 Thread Roberto Ortelli


Just a first attempt, I don't like it, and you need to add a few lines
of code ; )

$("[EMAIL PROTECTED]").bind("keydown",function(e){
   if (e.keyCode == 13) {
   tabIndex = parseFloat($(this).attr("tabindex")) + 1;
   $("[EMAIL PROTECTED]")[tabIndex].focus();
   return false;
   }
});


2007/4/16, Fabyo <[EMAIL PROTECTED]>:



[b]onsubmit[/b] = ( is use Unobtrusive JavaScript


Leonardo K wrote:
>
> Start tabindex with number 1.
>
> Without label:
>
> 
>Campo 1: 
>Campo 2: 
>Campo 3: 
>Campo 4: 
>Campo 5: 
>
> 
>
> With label:
>
> 
>Campo1:   name="campo1"
> id='campo1' tabindex='1'/>
>Campo2:   name="campo2"
> id='campo2' tabindex='2'/>
>Campo3:   name="campo3"
> id='campo3' tabindex='3'/>
>Campo4:   name="campo4"
> id='campo4' tabindex='4'/>
>Campo5:   name="campo5"
> id='campo5' tabindex='5'/>
>
> 
>
>

--
View this message in context: 
http://www.nabble.com/to-change-tab-for-enter-tf3584151s15494.html#a10021923
Sent from the JQuery mailing list archive at Nabble.com.





--
Roberto Ortelli
http://weblogger.ch


[jQuery] Re: JavaScript Hijacking - Jquery among the vulnerable ones

2007-04-16 Thread Nathan Young -X \(natyoung - Artizen at Cisco\)

Hi.

> In reality, I have yet to see any evidence that this problem actually
> exists in the wild.

I'd caution against dismissing this possibility out of hand.

> A potential hacker would need to find a site that delivers private
data
> in this very specific fashion, build a page to exploit that, then have
> you visit his page AFTER you have already logged in and established
> a session on the other site.

It's really the second point that seems to make this unlikely but please
consider that some very high profile sites have exposed XSS
vulnerabilities.  The myspace worm for example got millions of hits:

http://namb.la/popular/

Don't think that hasn't happened on that scale elsewhere (it has) or
won't happen again on another equally high profile, high traffic site
(it will).

The key is that any site that has a XSS vulnerability can be used by an
attacker to do session riding on everyone who visits.

> A potential hacker would need to find a site that delivers private
data
> in this very specific fashion

This is still true, so if you care, don't publish your data this way.

-->Nathan


-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Matt Kruse
Sent: Monday, April 16, 2007 8:01 AM
To: jQuery (English)
Subject: [jQuery] Re: JavaScript Hijacking - Jquery among the vulnerable
ones


On Apr 16, 9:11 am, "Scottus " <[EMAIL PROTECTED]> wrote:
> The single take away (true point) they don't point out is that if you 
> use any javascript hosted on a remote server  (google adwords for
> example)  fully compromises any page that host these scripts.

I don't think that has anything to do with the article.

> So for any site that needs security Don't host third party 
> scripts/content problem solved.

Not at all. That has nothing to do with it. I think your conclusions are
based on a misunderstanding of the article.

The true take away of the article is something that has been known for a
long time, and rarely actually exists in reality:

Don't deliver a JSON response containing private information that
consists of an Array literal as the base object, in response to a GET
request that uses only session authentication.

In reality, I have yet to see any evidence that this problem actually
exists in the wild. It's a theoretical security concern (not even a
flaw) that is interesting but has very little practical application. A
potential hacker would need to find a site that delivers private data in
this very specific fashion, build a page to exploit that, then have you
visit his page AFTER you have already logged in and established a
session on the other site.

In other words, that's not going to happen. IMO.

Matt Kruse


[jQuery] Re: Form plugin: file upload question

2007-04-16 Thread Jan Sorgalla

HI,

On 16 Apr., 21:42, "cdomigan" <[EMAIL PROTECTED]> wrote:
> I'm having the same problem. The value (ie the path) in the file field
> is passed to my server, but my $_FILES array is empty!
>
> Any ideas?

Just to make sure: Do you have enctype="multipart/form-data" as
attribute in your form tag?

Jan



[jQuery] Re: Showing a bind(click...) as clickable

2007-04-16 Thread wyo

On 15 Apr., 18:27, "Brian Cherne" <[EMAIL PROTECTED]> wrote:
> You could chain this on the end of $('#prev')
>
> .hover(
>function(){ $(this).addClass('isOver'); }, // don't forget the comma
>function(){ $(this).removeClass('isOver'); }
> );
>
".hover" is this a jQuery function? Where is it described?

O. Wyss



[jQuery] Re: AJAX datagrid (paging & sorting) with jQuery?

2007-04-16 Thread Jörn Zaefferer


Richard Thomas schrieb:


I would check out the qjuery version of ext http://extjs.com/ Its got
some very nice looking sortable table features

Also the jquery plugin
http://motherrussia.polyester.se/jquery-plugins/tablesorter/


You can also check out my jqpie
http://projects.cyberlot.net/trac/jqpie/wiki/ExampleAuto, but its not
near as complete as the above 2 examples, mine does support pages
though.

Thanks.
Christian's tablesorter is pure client-side, that doesn't help much in 
my case. I'm gonna take a deeper look at Ext.


--
Jörn Zaefferer

http://bassistance.de



[jQuery] Re: Form plugin: file upload question

2007-04-16 Thread Mike Alsup


Hmm, that's weird.  Do you have a sample page?  What browser are you using?

Mike


On 4/16/07, cdomigan <[EMAIL PROTECTED]> wrote:


I'm having the same problem. The value (ie the path) in the file field
is passed to my server, but my $_FILES array is empty!

Any ideas?

On Apr 3, 4:30 am, Kush Murod <[EMAIL PROTECTED]> wrote:
> Thanks Mike, I still had old form script included down below, my bad :)
>
> Mike Alsup wrote:
>
> >> In other words I can't see anyfilebeing uploaded. I'll post an example
> >> if needed, let me know.
>
> > It's up to you to mange the uploaded files in your php script.  If you
> > don't move them with move_uploaded_file() they are deleted after the
> > script completes.
>
> > Mike




[jQuery] Re: Form plugin: file upload question

2007-04-16 Thread cdomigan

I'm having the same problem. The value (ie the path) in the file field
is passed to my server, but my $_FILES array is empty!

Any ideas?

On Apr 3, 4:30 am, Kush Murod <[EMAIL PROTECTED]> wrote:
> Thanks Mike, I still had old form script included down below, my bad :)
>
> Mike Alsup wrote:
>
> >> In other words I can't see anyfilebeing uploaded. I'll post an example
> >> if needed, let me know.
>
> > It's up to you to mange the uploaded files in your php script.  If you
> > don't move them with move_uploaded_file() they are deleted after the
> > script completes.
>
> > Mike



[jQuery] Re: Question about tablesorter plugin

2007-04-16 Thread Andy Matthews

Have you tried just recalling tableSorter() on that table?

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Monday, April 16, 2007 2:07 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Question about tablesorter plugin



Hi,

I am using the tablesorter plugin and its great. I have one question. I
allow the end users to remove rows from the table, to implement this I
determine which s are selected and then call jQuery.hide(). 



My question: after hiding a specific row(s), how can I reinitialize the
table's odd and even css settings? Is there an method I can call similar to
when you sort on a specific column it resets the rows odd and even css class
settings? 



Any help greatly appreciated. Thank you







___





[jQuery] Re: Library showdowns

2007-04-16 Thread Ⓙⓐⓚⓔ

Make a challenge that you, personally,  can't do in jQuery, and you assume
folks can't do it with other libraries!

That would be a challenge!

--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ


[jQuery] Re: Updated plugin: jqTOC -- table of contents

2007-04-16 Thread DaveG




The only other (and extremely minor) thing I could think of, as far as
feedback for you, is the situation where the browser's viewport height
is less than the content ment's height.  If that happens there is no
way to get to the "bottom" of the menu.  I'm not sure of the best way
to remedy that.  It is possible the content div could have a
"container" with a height of 100%, and then the menu itself would live
inside the container with an overflow of auto.
I noticed that, and took a quick attempt at fixing it, but didn't get 
far. I'll try your idea, and see what I get.


The other thing I need to fix is IE6 support for fixed positioning.


  ~ ~ Dave


[jQuery] Question about tablesorter plugin

2007-04-16 Thread


Hi,

I am using the tablesorter plugin and its great. I have one question. I allow 
the end users to remove rows from the table, to implement this I determine 
which s are selected and then call jQuery.hide(). 



My question: after hiding a specific row(s), how can I reinitialize the table's 
odd and even css settings? Is there an method I can call similar to when you 
sort on a specific column it resets the rows odd and even css class settings? 



Any help greatly appreciated. Thank you







___




[jQuery] Re: jquery modal form not loading - help!

2007-04-16 Thread abba bryant


I get the spinner and no form in firefox 1.5
According to firebug the get request is made and the returned page looks
like it should work.



Tetsuo-3 wrote:
> 
> 
> Hi Rob
> 
> Thanks for your help. I've looked at my scripts and can't see that it
> is requesting anything from domain, so I don't think that's it. As I
> mentioned, the window also doesn't load on my local machine, which
> suggests something more fundamentally wrong with the code. Strangely,
> I've had this working fine for weeks, and now all of a sudden it's not
> loading, despite me not changing anything, other than uploading the
> site to a host :\
> 
> Any other ideas? I can give you the url if it's something you feel you
> would understand..
> 
> Thanks
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/jquery-modal-form-not-loading---help%21-tf3583160s15494.html#a10022461
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: Will this code enable & disable a submit button?

2007-04-16 Thread Rick Faircloth

Hmmm... can't get it to enable/disable the submit button at all... with
either solution.

Would the code I showed you be likely to work with this code?




function CalculateMortgage(){

var Params = {};

$("input:text").each(function(){
Params[$(this).attr("name")] = $(this).val();
});

$.post("callpage_Validate_Mortgage_Inputs.cfm", Params,
function(data){
 
$("#Result").empty().append(data);
});

return false;
}


$(document).ready(function(){

onInvalid: function(form) {
 $("input:submit",form).attr("disabled","disabled");
};

onValid: function(form) {
 $("input:submit",form).attr("disabled","");

};  
 
$("#Principal").blur(function(){ 
$.post("callpage_Validate_Mortgage_Inputs.cfm",
{principal:$("#Principal").val()},
function (data) {$("#Result_Principal").empty().append(data)
} ) });

$("#Interest").blur(function(){
$.post("callpage_Validate_Mortgage_Inputs.cfm",
{interest:$("#Interest").val()},
function (data) {$("#Result_Interest").empty().append(data)
}) });

$("#Years").blur(function(){

$.post("callpage_Validate_Mortgage_Inputs.cfm",{years:$("#Years").val()},
function (data) {$("#Result_Years").empty().append(data) })
});

$("#Calculate").click(function() { return CalculateMortgage(); });

});



The submit button code is:



Any further thoughts on how this can be done?

Thanks,

Rick


-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Sean Catchpole
Sent: Monday, April 16, 2007 1:44 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Will this code enable & disable a submit button?


Hi Rick,

>   $(form).find("[EMAIL PROTECTED]").attr("disabled","disabled");
This should work just fine (although you are missing an ending ] ).
As a slightly shorter notation you can do:
$("input:submit",form).attr("disabled","disabled");

>   $(form).find("[EMAIL PROTECTED]").attr("disabled", "");
This should also work to enable the element, but the best test is
trial and error.

~Sean




[jQuery] Fading in Firefox?

2007-04-16 Thread Paul
This is probably another simple one.  (I searched the archive but didn't see
anything-maybe I'm not searching well.)  

 

I can't get the Fade effect to work in Firefox, though it does work in IE.
In Firefox the element just disappears suddenly rather than fading out.
Code below:

 

$('#podContainer:visible').fadeOut(1000, function(){

 $('#content').animate({className: 'contentWide'},1000);

});



[jQuery] Re: to change tab for enter

2007-04-16 Thread Fabyo


[b]onsubmit[/b] = ( is use Unobtrusive JavaScript


Leonardo K wrote:
> 
> Start tabindex with number 1.
> 
> Without label:
> 
> 
>Campo 1: 
>Campo 2: 
>Campo 3: 
>Campo 4: 
>Campo 5: 
>
> 
> 
> With label:
> 
> 
>Campo1:   name="campo1"
> id='campo1' tabindex='1'/>
>Campo2:   name="campo2"
> id='campo2' tabindex='2'/>
>Campo3:   name="campo3"
> id='campo3' tabindex='3'/>
>Campo4:   name="campo4"
> id='campo4' tabindex='4'/>
>Campo5:   name="campo5"
> id='campo5' tabindex='5'/>
>
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/to-change-tab-for-enter-tf3584151s15494.html#a10021923
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: AJAX datagrid (paging & sorting) with jQuery?

2007-04-16 Thread Richard Thomas


I would check out the qjuery version of ext http://extjs.com/ Its got
some very nice looking sortable table features

Also the jquery plugin
http://motherrussia.polyester.se/jquery-plugins/tablesorter/


You can also check out my jqpie
http://projects.cyberlot.net/trac/jqpie/wiki/ExampleAuto, but its not
near as complete as the above 2 examples, mine does support pages
though.



On 4/16/07, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:


Hi folks,

has anyone developed a datagrid that supports paging and sorting via
AJAX using jQuery? Is there any code or plugin I've totally missed?
Any examples, reports about certain difficulties (maybe even a
jQuery-based datagrid with JSF) are highly appreciated.

Regards

--
Jörn Zaefferer

http://bassistance.de




[jQuery] Re: AJAX datagrid (paging & sorting) with jQuery?

2007-04-16 Thread Jeffrey Kretz

Jack's Ext project now supports jQuery.  An example of the paged datagrid is
at:

http://extjs.com/deploy/ext/examples/grid/paging.html

You would need to supply the server-side code, though.

JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jörn Zaefferer
Sent: Monday, April 16, 2007 9:41 AM
To: jQuery Discussion.
Subject: [jQuery] AJAX datagrid (paging & sorting) with jQuery?


Hi folks,

has anyone developed a datagrid that supports paging and sorting via 
AJAX using jQuery? Is there any code or plugin I've totally missed?
Any examples, reports about certain difficulties (maybe even a 
jQuery-based datagrid with JSF) are highly appreciated.

Regards

-- 
Jörn Zaefferer

http://bassistance.de




[jQuery] Re: Bug : IE + slidetoggle + input radio

2007-04-16 Thread Sean Catchpole


Nash, do you have an example we can look at?

~Sean


[jQuery] Re: Calendar / Schedule Component.

2007-04-16 Thread Sean Catchpole


Google Calendar has several widgets/gadgets.

~Sean


[jQuery] Re: to change tab for enter

2007-04-16 Thread Leonardo K

Start tabindex with number 1.

Without label:


  Campo 1: 
  Campo 2: 
  Campo 3: 
  Campo 4: 
  Campo 5: 
  


With label:


  Campo1:  
  Campo2:  
  Campo3:  
  Campo4:  
  Campo5:  
  



[jQuery] Re: Updated plugin: jqTOC -- table of contents

2007-04-16 Thread [EMAIL PROTECTED]


Dave,

Thanks for the consideration on the select->close option.

The only other (and extremely minor) thing I could think of, as far as
feedback for you, is the situation where the browser's viewport height
is less than the content ment's height.  If that happens there is no
way to get to the "bottom" of the menu.  I'm not sure of the best way
to remedy that.  It is possible the content div could have a
"container" with a height of 100%, and then the menu itself would live
inside the container with an overflow of auto.

Like I said -- minor bug, but I could see the possibility that someone
might run into that scenario down the road ... so while you have the
code open ...

-khoker






On Apr 16, 11:48 am, DaveG <[EMAIL PROTECTED]> wrote:
> > Very nice work.  And kudos on a nice, working demo.  I always
> > appreciate when I can see something cool in action and immediately
> > start thinking about where I could put it to use.
>
> Thanks -- glad it's readable.
>
> > Suggestions:  (I know it is trivial to hack the script manually,
> > but ...) Add a parameter to close the content window when a heading is
> > selected.  It wasn't immediately obvious to me how to close the window
> > after I had made my selection -- or why the window was still around to
> > begin with.
>
> Added a parameter tocAutoClose, which defaults on. This will close the TOC 
> when clicking a link.
>
> Currently I have the click() events handled by anonymous functions, like:
>$('#toc_content a').click(function(){
>   $('#toc_content').hide();
>});
>
> I'd like to use a local function instead, as I'll be providing similar 
> functionality for other click events. I tried defining a local function, and 
> calling like:
>$('#toc_content a').click(my_func(param1));
>
> That did not work, and I didn't see an example in the API docs. How to call a 
> local function with a parameter from the click() function?
>
> Also, what is the 'correct' way to declare a local function? Simply declare 
> it inline within the parent function, or is there a more jQuery'esque way?
>
>  ~ ~ Dave



[jQuery] Re: Will this code enable & disable a submit button?

2007-04-16 Thread Sean Catchpole


Hi Rick,


  $(form).find("[EMAIL PROTECTED]").attr("disabled","disabled");

This should work just fine (although you are missing an ending ] ).
As a slightly shorter notation you can do:
$("input:submit",form).attr("disabled","disabled");


  $(form).find("[EMAIL PROTECTED]").attr("disabled", "");

This should also work to enable the element, but the best test is
trial and error.

~Sean


[jQuery] Re: to change tab for enter

2007-04-16 Thread Fabyo


It functioned perfect, but it would have as to function without using labels? 

my formu:


Campo 1: 
Campo 2: 
Campo 3: 
Campo 4: 
Campo 5: 




Roberto Ortelli wrote:
> 
> 
> Fabyo,
> pay attention, the solution below only works if you have a form like that:
> 
> One 
> Two 
> Three 
> 
> 
>> $("[EMAIL PROTECTED]").bind("keydown", function(e){
>>if (e.keyCode == 13) {
>>$(this).next().focus();
>>return false;
>>}
>>});
>>
> 
> If you have a more complex/realistic form like:
> 
> One 
> Two 
> Three 
> 
> 
> ... you can use something like:
> 
> $("[EMAIL PROTECTED]").bind("keydown", function(e){
>   if (e.keyCode == 13) {
>   $(this).parent().next().children("input").focus();
>   return false;
>   }
>   });
> 
> 

-- 
View this message in context: 
http://www.nabble.com/to-change-tab-for-enter-tf3584151s15494.html#a10021000
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] [jqUploader] What with users without flash ?

2007-04-16 Thread Jan Koprowski

Hi !

When I start use this extension i hope that when the browser doesn't
have flash field will be "normal" but not. I change (almost
everything) to get this effect but the main problem is:

var $el = jQuery('<' + opts.elementType + ' id="'+containerId+'"
class="' + opts.cls + '" style="width:'+opts.width+'px"> [...]
$this.after($el).remove();

This fragment of code removed normal file filed so when the flash
wasn't install field just disappear.  I removed this and change script
to replace  content where filed is.

Maybe this script generate some problems in some browsers but i can't
check this. In my opinion this method is better.



[jQuery] Re: viewportCenter() plugin now in beta...

2007-04-16 Thread Roman Weich


Giant Jam Sandwich schrieb:

Hey Roman,

Thanks for taking a look in Opera.

The plugin actually does support percentages. The pixel widths I
provided in the demo are just for demonstration purposes. If you do
use a percentage though, and the user resizes the viewport, it will
not maintain a perfect center. You would have to fire the
viewportCenter() method again. I've been toying around with the idea
of including an optional setting, where if a window resize event is
fired, the element will re-center. What do you think? Does that sound
useful?

Brian


Hi Brian,

yeah, that should work too.
But why all this work? Putting the one element at 50% top and left 
position should do the same. You can position the passed element 
relative to that one, and you never have to meddle with the events. (in 
theory ;)


Cheers,
/rw


[jQuery] Re: Updated plugin: jqTOC -- table of contents

2007-04-16 Thread Andy Matthews

Great plugin by the way.

It might be nice to have an "autohide" type behavior after x seconds on that
Content menu. 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of DaveG
Sent: Monday, April 16, 2007 11:49 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Updated plugin: jqTOC -- table of contents




> Very nice work.  And kudos on a nice, working demo.  I always 
> appreciate when I can see something cool in action and immediately 
> start thinking about where I could put it to use.
Thanks -- glad it's readable. 

> Suggestions:  (I know it is trivial to hack the script manually, but 
> ...) Add a parameter to close the content window when a heading is 
> selected.  It wasn't immediately obvious to me how to close the window 
> after I had made my selection -- or why the window was still around to 
> begin with.
Added a parameter tocAutoClose, which defaults on. This will close the TOC
when clicking a link.


Currently I have the click() events handled by anonymous functions, like:
   $('#toc_content a').click(function(){
  $('#toc_content').hide();
   });

I'd like to use a local function instead, as I'll be providing similar
functionality for other click events. I tried defining a local function, and
calling like:
   $('#toc_content a').click(my_func(param1));

That did not work, and I didn't see an example in the API docs. How to call
a local function with a parameter from the click() function?

Also, what is the 'correct' way to declare a local function? Simply declare
it inline within the parent function, or is there a more jQuery'esque way?

 ~ ~ Dave




[jQuery] Re: Library showdowns

2007-04-16 Thread Glen Lipka

On 4/16/07, Brian Cherne <[EMAIL PROTECTED]> wrote:


This is a great idea... and very useful comparison... it might be
interesting to see more tasks that are common in DHTML programming:

- how to infuse ajax content into a dom element
- how to create a tabbed interface (what files, what markup, what custom
code)
- how to create a modal popup

Some additional information I'd like to see are the number of files and
file size of library code required to do each comparison. It may get
repetitive with the other libraries that are monolithic in nature, but
things certainly change for the plug-in/à la carte libraries.




It took me about 15 minutes to create the challenge and the jQuery version
for the Ajax sample.
http://js.commadot.com/node/14
Then I spent another 30 minutes trying to do it with plain DOM Scripting.  I
gave up.  Work to do.

I can pretty easily make the other two challenges. Tabbed and Modal.
The big problem is going to be doing them in the other frameworks.

Glen


[jQuery] Re: Updated plugin: jqTOC -- table of contents

2007-04-16 Thread DaveG



> Very nice work.  And kudos on a nice, working demo.  I always
> appreciate when I can see something cool in action and immediately
> start thinking about where I could put it to use.
Thanks -- glad it's readable. 

> Suggestions:  (I know it is trivial to hack the script manually,
> but ...) Add a parameter to close the content window when a heading is
> selected.  It wasn't immediately obvious to me how to close the window
> after I had made my selection -- or why the window was still around to
> begin with.
Added a parameter tocAutoClose, which defaults on. This will close the TOC when 
clicking a link.


Currently I have the click() events handled by anonymous functions, like:
   $('#toc_content a').click(function(){
  $('#toc_content').hide();
   });

I'd like to use a local function instead, as I'll be providing similar 
functionality for other click events. I tried defining a local function, and 
calling like:
   $('#toc_content a').click(my_func(param1));

That did not work, and I didn't see an example in the API docs. How to call a 
local function with a parameter from the click() function?

Also, what is the 'correct' way to declare a local function? Simply declare it 
inline within the parent function, or is there a more jQuery'esque way?

 ~ ~ Dave



[jQuery] Will this code enable & disable a submit button?

2007-04-16 Thread Rick Faircloth

Hi, all...

Will the "onInvalid" and "onValid" lines in the code below work
to enable & disable a submit button?

Rick

$(document).ready(function(){

onInvalid: function(form) {
 $(form).find("[EMAIL PROTECTED]").attr("disabled",
"disabled");
 };

onValid: function(form) {
 $(form).find("[EMAIL PROTECTED]").attr("disabled", "");
 };

$("#Principal").blur(function(){ 
$.post("callpage_Validate_Mortgage_Inputs.cfm",
{principal:$("#Principal").val()},
function (data) {$("#Result_Principal").empty().append(data)
} ) });

$("#Interest").blur(function(){
$.post("callpage_Validate_Mortgage_Inputs.cfm",
{interest:$("#Interest").val()},
function (data) {$("#Result_Interest").empty().append(data)
}) });

$("#Years").blur(function(){

$.post("callpage_Validate_Mortgage_Inputs.cfm",{years:$("#Years").val()},
function (data) {$("#Result_Years").empty().append(data) })
});

$("#Calculate").click(function() { return
CalculateMortgage(); });

});




[jQuery] AJAX datagrid (paging & sorting) with jQuery?

2007-04-16 Thread Jörn Zaefferer


Hi folks,

has anyone developed a datagrid that supports paging and sorting via 
AJAX using jQuery? Is there any code or plugin I've totally missed?
Any examples, reports about certain difficulties (maybe even a 
jQuery-based datagrid with JSF) are highly appreciated.


Regards

--
Jörn Zaefferer

http://bassistance.de



[jQuery] Re: Trying to get slideshow working

2007-04-16 Thread BKDesign Solutions


Hi,

http://interface.eyecon.ro/docs/slideshow


I have probably spent 15 hours trying to get this to work like the demo.
Now that only shows my lack of knowledge.
I have aslo had two people contact me asking if I know how to, or know 
anyone who can get this working.


If someone knows how to create a working slideshow like the demo (but only 
one) with links on the slideshow prev/next, 12345 etc with  1 2 3 4 
hilighted when on it, I'm  willing to pay.

Even trying the demo a million times all I got was errors.

Thanks

Bruce 





[jQuery] Re: JavaScript Hijacking - Jquery among the vulnerable ones

2007-04-16 Thread Markus Peter


On 16.04.2007, at 18:02, Jeffrey Kretz wrote:


How would this work exactly?  I thought that session cookies and file
cookies are only passed by the browser in a request to a matching  
domain?


Or would it be something like this:

1. Log into Washington Mutual Bank Account (20 minute session).
2. Don't log out
3. In same browser, visit www.hackmypc.com
4. This new website initiates in Ajax call to WAMU, and because the
original session is still active, it works?


I explained it in detail here: http://groups.google.com/group/jquery- 
en/browse_thread/thread/ 
b467908cd0bb5581/9b83cd2d22c1c140#msg_fb6eec66af5f199b


You basically got it right, except step 4. The real step 4 is:

4. This new website has a 

[jQuery] Re: JavaScript Hijacking - Jquery among the vulnerable ones

2007-04-16 Thread Jeffrey Kretz

Here's the part I'm confused about:

> On 16.04.2007, at 17:01, Matt Kruse wrote:
> ...
> You can steal personal information from other sites, if users stay in  
> a cookie-based session while surfing on other pages.
> ... 

How would this work exactly?  I thought that session cookies and file
cookies are only passed by the browser in a request to a matching domain?

Or would it be something like this:

1. Log into Washington Mutual Bank Account (20 minute session).
2. Don't log out
3. In same browser, visit www.hackmypc.com
4. This new website initiates in Ajax call to WAMU, and because the
original session is still active, it works?

Is this the security flaw you are referring to?

JK



[jQuery] Re: Library showdowns

2007-04-16 Thread Brian Cherne

This is a great idea... and very useful comparison... it might be
interesting to see more tasks that are common in DHTML programming:

- how to infuse ajax content into a dom element
- how to create a tabbed interface (what files, what markup, what custom
code)
- how to create a modal popup

Some additional information I'd like to see are the number of files and file
size of library code required to do each comparison. It may get repetitive
with the other libraries that are monolithic in nature, but things certainly
change for the plug-in/à la carte libraries.

The one's that use plug-ins might be too long for an easy/scan-able
comparison, but it would be most interesting to see where jQuery stands. For
folks well-versed in other libraries (who happen to be lurking here) it
might be good to show things that jQuery can't do (or can't do easily)
out-of-the-box or with plug-ins that currently exist. The zebra stripe
example plays right into jQuery's sweet spot. Can someone think of
less-favorable examples?

Brian.

On 4/16/07, Ariel Jakobovits <[EMAIL PROTECTED]> wrote:



Me, too. Maybe just keep an eye on the questions people ask on the list
and use those?!

- Original Message 
From: Mike Alsup <[EMAIL PROTECTED]>
To: jquery-en@googlegroups.com
Sent: Monday, April 16, 2007 3:53:17 AM
Subject: [jQuery] Re: Library showdowns


Hi Glen,

I can't think of any specific challenges right now but I think this is
a cool idea.

Mike

On 4/15/07, Glen Lipka <[EMAIL PROTECTED]> wrote:
> I started a site to expand upon the idea of the zerba challenge.
> http://js.commadot.com (I decided not to regsiter jsframeworks.com)
>
> Side note: Drupal 5.1 is pretty awesome.  I am sure I am not using it's
full
> potential.  I haven't even changed the theme yet.
>
> Anyway, I copied in the zebra challenge as a proof-of-concept.  And I
> started a new challenge.
> http://js.commadot.com/node/11  - The expanding list challenge.
>
> It's a little bit tedious to do, but I think a good way to evangelize
jQuery
> and educate is to show how things can be done in a side-by-side
comparrison.
>  It's valuable for people considering switching or who have recently
> switched.
>
> Question:  Anyone want to help set up more challenges?  Anyone have
> suggestions for this to be better?  Anyone have a particular challenge
they
> would like to see?  Although I am trying to keep it simple to start so I
can
> get some content traction.
>
> Thanks,
>
> Glen
>
>
>
>
>
>






[jQuery] Re: JavaScript Hijacking - Jquery among the vulnerable ones

2007-04-16 Thread Markus Peter


On 16.04.2007, at 17:01, Matt Kruse wrote:


In reality, I have yet to see any evidence that this problem actually
exists in the wild. It's a theoretical security concern (not even a
flaw) that is interesting but has very little practical application.


You can steal personal information from other sites, if users stay in  
a cookie-based session while surfing on other pages.


There was at least one Gmail contact list exploit working similarly  
"in the wild" already.


Don't deliver private data as JavaScript/JSON unless it's secured  
with secrets in the URL.


--
Markus Peter - [EMAIL PROTECTED]  http://www.spin-ag.de/
SPiN AG, Bischof-von-Henle-Str. 2b, 93051 Regensburg, HRB 6295  
Regensburg

Aufsichtsratsvors.: Dr. Christian Kirnberger
Vorstände: Fabian Rott, Paul Schmid




  1   2   >