[jQuery] Re: Simple selector question

2007-04-09 Thread Karl Swedberg

On Apr 9, 2007, at 4:31 PM, Geoffrey Knutzen wrote:


Again,
Press send, find answer.
I answered my own question
$("table").css("borderCollapse","collapse")

I had led myself down the wrong path and was totally lost

Thanks anyway



Hi Geoff,

that's fine if you want to *set* the borderCollapse property to  
"collapse" for all tables. But if you are trying to select them,  
using .each() with an if statement inside or Brandon's .filter()  
suggestion would be want you need.


Cheers,

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






[jQuery] Re: slide window to a set height??

2007-04-09 Thread Matt Stith

Yep! Check out the .animate method!

$(stuff).animate({height:30},speed,callback);

You might wanna bookmark www.visualjquery.com, its the best way to browse
the wonders of jQuery!
On 4/10/07, sspboyd <[EMAIL PROTECTED] > wrote:



Hi,
I have looked at the docs and examples but I'm not sure if this is
possible.

Can I slide a window to a specified height?
For example, say I have a div that is 100px high. Can I animate it to
slide up so that it is only 30px high??

Thanks,
Steve




[jQuery] slide window to a set height??

2007-04-09 Thread sspboyd

Hi,
I have looked at the docs and examples but I'm not sure if this is
possible.

Can I slide a window to a specified height?
For example, say I have a div that is 100px high. Can I animate it to
slide up so that it is only 30px high??

Thanks,
Steve



[jQuery] Re: Find Programming Job?

2007-04-09 Thread Ⓙⓐⓚⓔ

it's up to us to police the list... any chucklehead can join and post... and
many do!
inside gmail, there's an option to report it as SPAM. If enough people click
it , the message will automatically be marked as spam.

Unfortunately some of the major contributors to  jQuery have had their
e-mail addresses harvested by spammers and their posts WERE sometimes
considered spam.


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


[jQuery] Re: Find Programming Job?

2007-04-09 Thread Widi Harsojo

today using this, come on ...

Programming Job Vacancy & Resources









On 4/10/07, Matt Stith <[EMAIL PROTECTED]> wrote:


Spam is a disadvantage of the move to google groups, we just gotta
tolerate it for now :-\

On 4/9/07, Christopher Jordan < [EMAIL PROTECTED]> wrote:
>
>
> Does anybody else feel like this is spam? Or am I just weird?
>
> Chris
>
> Cindy wrote:
> > Find Your Programming Job Vacancy and resources here -->
> > http://www.jobbankdata.com/job-programming.htm
> >
> >
>
> --
> http://www.cjordan.us
>




[jQuery] Re: jQuery and unit testing...

2007-04-09 Thread Aaron Heimlich

Web Page Analyzer[1] might be able to help too

[1] http://www.websiteoptimization.com/services/analyze/index.html

On 4/9/07, Giant Jam Sandwich <[EMAIL PROTECTED]> wrote:



Does anyone have resources related to unit testing the front-end of a
Web application, especially if it utilizes jQuery heavily. I have not
heard of unit testing much in this regard, but if there are tools or
sites that would be useful, this seems like a good place to post them.
I am aware of the posts recently regarding the speed tests on
selectors for some of the JavaScript frameworks, so please do not
repost the link to that site. Our managed services group does load
testing on completed Web applications at our company, but I would like
to know if there are tools for in-process front-end development that
measures download speeds, load times, total page weight, suggested
improvements, etc.

Thanks.

Brian





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


[jQuery] Re: jQuery and unit testing...

2007-04-09 Thread Aaron Heimlich

Selenium[1] might be able to help you. I've never actually used myself,
though.

[1] http://www.openqa.org/selenium/

On 4/9/07, Giant Jam Sandwich <[EMAIL PROTECTED]> wrote:



Does anyone have resources related to unit testing the front-end of a
Web application, especially if it utilizes jQuery heavily. I have not
heard of unit testing much in this regard, but if there are tools or
sites that would be useful, this seems like a good place to post them.
I am aware of the posts recently regarding the speed tests on
selectors for some of the JavaScript frameworks, so please do not
repost the link to that site. Our managed services group does load
testing on completed Web applications at our company, but I would like
to know if there are tools for in-process front-end development that
measures download speeds, load times, total page weight, suggested
improvements, etc.

Thanks.

Brian





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


[jQuery] Re: Find Programming Job?

2007-04-09 Thread Matt Stith

Spam is a disadvantage of the move to google groups, we just gotta tolerate
it for now :-\

On 4/9/07, Christopher Jordan <[EMAIL PROTECTED]> wrote:



Does anybody else feel like this is spam? Or am I just weird?

Chris

Cindy wrote:
> Find Your Programming Job Vacancy and resources here -->
> http://www.jobbankdata.com/job-programming.htm
>
>

--
http://www.cjordan.us



[jQuery] A return false function for all of jQuery when script not included?

2007-04-09 Thread [EMAIL PROTECTED]

I have implemented jQuery as my DHTML effects engine (and it rocks) in
the latest version of my site (preview two of version 2.8 of JAB
Creations which is not yet public). I have DHTML disabled by default
unless the user chooses broadband and or manually enables DHTML on my
site.

I have not removed nor will add dozens of lines of PHP per page, per
visitor to detect whether or not to serve the JavaScript functions
inside the XHTML itself; rather I'd like to avoid JavaScript console
errors by simply returning some sort of universal return false
function. My understanding of JavaScript is however not adequate
enough as it seems the functions are dynamically created and thus I'm
pretty much clueless how to even approach this! Thanks for reading!

 - John
My test server for 2.8 can be found at http://www.jabcreations.net/
though preview one is using script.aculo.us at the moment.



[jQuery] Re: General discussion

2007-04-09 Thread JimD

Wow this is very cool.  Nice work Diego.



[jQuery] jQuery and unit testing...

2007-04-09 Thread Giant Jam Sandwich

Does anyone have resources related to unit testing the front-end of a
Web application, especially if it utilizes jQuery heavily. I have not
heard of unit testing much in this regard, but if there are tools or
sites that would be useful, this seems like a good place to post them.
I am aware of the posts recently regarding the speed tests on
selectors for some of the JavaScript frameworks, so please do not
repost the link to that site. Our managed services group does load
testing on completed Web applications at our company, but I would like
to know if there are tools for in-process front-end development that
measures download speeds, load times, total page weight, suggested
improvements, etc.

Thanks.

Brian



[jQuery] Re: How best to achieve this slideout effect?

2007-04-09 Thread Glen Lipka

On 4/9/07, Jeroen Coumans <[EMAIL PROTECTED]> wrote:



On 9 apr, 00:59, "Glen Lipka" <[EMAIL PROTECTED]> wrote:
> Is the effect something like this?http://www.intuit.com/ (Click
quicklinks at the top right)

Thanks, yes that's the same effect, except we have quite some large
sections that slide out on top.

> Anyway, I would definitely shy away from scrolling the page.  It's not
the
> natural action.  Did you guys get data saying the users were confused?

We haven't done any usability testing yet (still prototyping), but
since we have quite some large slideout sections, some of which are
bigger than 1 screen, having them slide up means that you're left in
the middle of the document. The effect you see is as if you've
scrolled the document down, instead of sliding the section up. An
obvious solution is thus to scroll up before we slide up :-) Unless
you have other suggestions, besides making the sections smaller?

And can somebody please help me with the correct syntax for achieving
this? I'm quite new at Javascript, although jQuery is definitely
making it very easy! Instead of parallel execution of the ScrollTo and
slideToggle, I want them to execute one after another. How should I
adjust the following code?

$('.toggle').click(function() {
  $('#slideout').ScrollTo('slow').slideToggle('slow');
});

Jeroen Coumans



Most jQuery functions have a callback function.  Which basically means, it
doesn't run the callback until the first part is done.

SlideUp has is like this:
function slideTest() {
$("#slideTest").slideUp("slow",function(){
 window.scrollTo(0, 1500)
});
}

To see advanced "smooth scrolling" check out this previous thread.
http://www.nabble.com/Re%3A-ScrollTo-Functionality-p6684782.html

If you post an example online, I could look at it and make suggestions.
One possibility is (although, without seeing it, this might not be good)
Slide open an area 300px tall with overflow:auto.  This will slide open an
area that the user can see and interact with, but it would also have
scrollbars.  Again, this might be terrible.  I am just brainstorming. :)

Hope the callback thing works for you.

Glen


[jQuery] Question. Upload file

2007-04-09 Thread Nachitox

Im trying to understand some things. I have to upload a file
I've to 2 .js
http://cablemodem.fibertel.com.ar/d4rkm4st3r/common.js &
http://cablemodem.fibertel.com.ar/d4rkm4st3r/main.js

i dont know who to make work the testupload() function... (its in
main.js)

can someone explain me ?
please, contact me.

you can test the website in 
http://cablemodem.fibertel.com.ar/d4rkm4st3r/index.html

The .js in the js folder, are encripted by default... the ones in the
main folder, had already been decrypted to study them...


Edit: anybody understand me ? :P



[jQuery] Re: Find Programming Job?

2007-04-09 Thread Aaron Heimlich

My eyes, they burn! Make the ugliness stop! (and yes, this definitely spam)

On 4/9/07, Benjamin Sterling <[EMAIL PROTECTED]> wrote:


I would say it is spam. but the more I look at the site, the more I
think it is warning. a warning that really horrible looking sites still
live.. When will we be free of... of bad looking site.



--
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com





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


[jQuery] Re: How would I write this CF in JS?

2007-04-09 Thread Aaron Heimlich

Try this:

function superCoolValidator(value, element, params) {
   if(isNaN(parseInt(value.replace(/[\$\.,]/, ""))) {
   return false;
   } else {
   return true;
   }
}

$.validator.addMethod("superCoolValidator", superCoolValidator, "Your input
is not super cool!"); [1]

[1]
http://jquery.bassistance.de/api-browser/plugins.html#jQueryvalidatoraddMethodStringFunctionString

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



Hi, all...

I want to create custom validation that would
test input the same as this ColdFusion function,



which states that "if after all dollar signs, commas, and periods
are stripped from the input value, the value is not numeric..."

How would I write that in Javascript so I can use it as a custom
validation
in Jorn's Validation plug-in?

Realize that I don't want to change the value, I just want to run it
through
a test...

CF-coders?

Thanks,

Rick





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


[jQuery] Re: Find Programming Job?

2007-04-09 Thread Benjamin Sterling

I would say it is spam. but the more I look at the site, the more I
think it is warning. a warning that really horrible looking sites still
live.. When will we be free of... of bad looking site.



--
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com


[jQuery] Re: Find Programming Job?

2007-04-09 Thread Christopher Jordan


Does anybody else feel like this is spam? Or am I just weird?

Chris

Cindy wrote:

Find Your Programming Job Vacancy and resources here -->
http://www.jobbankdata.com/job-programming.htm




--
http://www.cjordan.us


[jQuery] How would I write this CF in JS?

2007-04-09 Thread Rick Faircloth


Hi, all...

I want to create custom validation that would
test input the same as this ColdFusion function,



which states that "if after all dollar signs, commas, and periods
are stripped from the input value, the value is not numeric..."

How would I write that in Javascript so I can use it as a custom validation
in Jorn's Validation plug-in?

Realize that I don't want to change the value, I just want to run it through
a test...

CF-coders?

Thanks,

Rick



[jQuery] Re: outerHTML and Firefox does not work

2007-04-09 Thread Karl Rudd


What do you mean by "required tag"? Do you mean the attributes in the
tag/element, like src="pic1"?

If you want the "src" attribute of the element you have selected you
could do this:

 alert( $("#k img").get(i).attr('src') );

Or if you have more than one 'img' inside the '#k' div you could loop
through each like this:

 $("#k img").each( function( index ) {
   // 'index' will be a number from 0 to ( number of 'img's - 1 )
   // 'this' will be set to each 'img' element
   alert( "index = " + index + ", this.src = " + this.src );
 });

Karl Rudd

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



thanks a lot
as a jquery beginner I wonder if there is no jquery way to get the required
tag?

best regards

Bernd
--
View this message in context: 
http://www.nabble.com/outerHTML-and-Firefox-does-not-work-tf3549488s15494.html#a9910093
Sent from the JQuery mailing list archive at Nabble.com.




[jQuery] Find Programming Job?

2007-04-09 Thread Cindy

Find Your Programming Job Vacancy and resources here -->
http://www.jobbankdata.com/job-programming.htm



[jQuery] Re: How best to achieve this slideout effect?

2007-04-09 Thread Jeroen Coumans

On 9 apr, 00:59, "Glen Lipka" <[EMAIL PROTECTED]> wrote:
> Is the effect something like this?http://www.intuit.com/ (Click quicklinks at 
> the top right)

Thanks, yes that's the same effect, except we have quite some large
sections that slide out on top.

> Anyway, I would definitely shy away from scrolling the page.  It's not the
> natural action.  Did you guys get data saying the users were confused?

We haven't done any usability testing yet (still prototyping), but
since we have quite some large slideout sections, some of which are
bigger than 1 screen, having them slide up means that you're left in
the middle of the document. The effect you see is as if you've
scrolled the document down, instead of sliding the section up. An
obvious solution is thus to scroll up before we slide up :-) Unless
you have other suggestions, besides making the sections smaller?

And can somebody please help me with the correct syntax for achieving
this? I'm quite new at Javascript, although jQuery is definitely
making it very easy! Instead of parallel execution of the ScrollTo and
slideToggle, I want them to execute one after another. How should I
adjust the following code?

$('.toggle').click(function() {
  $('#slideout').ScrollTo('slow').slideToggle('slow');
});

Jeroen Coumans



[jQuery] Re: outerHTML and Firefox does not work

2007-04-09 Thread bjb


thanks a lot
as a jquery beginner I wonder if there is no jquery way to get the required
tag?

best regards 

Bernd
-- 
View this message in context: 
http://www.nabble.com/outerHTML-and-Firefox-does-not-work-tf3549488s15494.html#a9910093
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] RE: Simple selector question

2007-04-09 Thread Geoffrey Knutzen

 
Again, 
Press send, find answer.
I answered my own question
$("table").css("borderCollapse","collapse")

I had led myself down the wrong path and was totally lost

Thanks anyway



-Original Message-
From: Geoffrey Knutzen [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 09, 2007 1:27 PM
To: 'jquery-en@googlegroups.com'
Subject: Simple selector question

 
How would one select all tables in a document that have the css property
border-collapse set to collapse?

My goal is to make a work around for a FF bug
(https://bugzilla.mozilla.org/show_bug.cgi?id=244135) where borders
disappear sometimes. I am hoping for find all tables with
border-collapse=collapse, set them to separate then set them back to
collapse again. 

Thanks
-Geoff



[jQuery] Re: outerHTML and Firefox does not work

2007-04-09 Thread Karl Rudd


Correct. Only Internet Explorer supports "outerHTML". Even "innerHTML"
started off as a Microsoft only thing, but because it was used so
widely other browsers have adopted it as a defacto standard.

What are you trying to do that you need to use outerHTML?

Karl Rudd

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


Hi,

I've some code that works fine with IE, but not on Firefox (2.0.0.3)
on Vista:

html:



...
...




i=0;
alert($("#k img").get(i).outerHTML );


returns "undefined" in FF
any ideas?




[jQuery] Re: General discussion

2007-04-09 Thread Mike Alsup


Yup!


Hi Mike,

Do you mean:
(function($){
 // use the $ symbol here to avoid collisions
})(jQuery);


[jQuery] Re: TableSorter question

2007-04-09 Thread Chris W. Parker

On Monday, April 09, 2007 2:35 PM Christian Bach <> said:

> Sorry Chris, seems you found a bug.
> 
> I checked in a new version that takes care of business.
> 
>
http://dev.jquery.com/browser/trunk/plugins/tablesorter/jquery.tablesort
er.js?format=txt

Cool. I'll give it a try.



Chris.



[jQuery] Re: TableSorter question

2007-04-09 Thread Chris W. Parker

On Monday, April 09, 2007 1:40 PM Chris W. Parker <> said:

> On Monday, April 09, 2007 12:43 PM Christian Bach <> said:
> 
>> tableSorter({
>> sortColumn: 0,
>> sortDir: 1
>> });
>> 
>> Will sort the first column in the opposite direction.
> 
> Actually that just makes my arrow appear upside down.

Well I made some changes to the TableSorter file and now it works. I
just hope I didn't introduce a bug.

The original is around line 220 and reads like this:

/** if we have a sortDir, reverse the damn thing. */
if(COLUMN_LAST_DIR != COLUMN_DIR) {
flatData.reverse();
}

I changed it to:

/** if we have a sortDir, reverse the damn thing. */
if(defaults.sortDir == 1)
{
flatData.reverse();
}


That seems to work fine.



Chris.


[jQuery] Re: TableSorter question

2007-04-09 Thread Christian Bach

Sorry Chris, seems you found a bug.

I checked in a new version that takes care of business.

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

/christian

2007/4/9, Chris W. Parker <[EMAIL PROTECTED]>:



On Monday, April 09, 2007 12:43 PM Christian Bach <> said:

> tableSorter({
> sortColumn: 0,
> sortDir: 1
> });
>
> Will sort the first column in the opposite direction.

Actually that just makes my arrow appear upside down.

Here's what I see without sortDir set.

Column 

April 9, 2007
April 10, 2007
April 11, 2007

Here's what I see with sortDir set to 1.

Column 

April 9, 2007
April 10, 2007
April 11, 2007




Chris.





--
POLYESTER*
Wittstocksgatan 2
115 24 Stockholm
Phone: 08-660 73 50 / +46-8-660 73 50
Mobile: 070-443 91 90 / +46-70-443 91 90
E-mail: [EMAIL PROTECTED]
http://www.polyester.se


[jQuery] Re: outerHTML and Firefox does not work

2007-04-09 Thread Blair Mitchelmore


outerHTML is an IE only property that only a few other browsers support. 
However, Mozilla's JavaScript implementation rocks so try this code I 
found on :


var _emptyTags = {
  "IMG":   true,
  "BR":true,
  "INPUT": true,
  "META":  true,
  "LINK":  true,
  "PARAM": true,
  "HR":true
};

HTMLElement.prototype.__defineGetter__("outerHTML", function () {
  var attrs = this.attributes;
  var str = "<" + this.tagName;
  for (var i = 0; i < attrs.length; i++)
 str += " " + attrs[i].name + "=\"" + attrs[i].value + "\"";

  if (_emptyTags[this.tagName])
 return str + ">";

  return str + ">" + this.innerHTML + "";
});

HTMLElement.prototype.__defineSetter__("outerHTML", function (sHTML) {
  var r = this.ownerDocument.createRange();
  r.setStartBefore(this);
  var df = r.createContextualFragment(sHTML);
  this.parentNode.replaceChild(df, this);
});

That should allow you to get and set outerHTML like a regular variable.

-blair

bjb wrote:

Hi,

I've some code that works fine with IE, but not on Firefox (2.0.0.3)
on Vista:

html:



...
...




i=0;
alert($("#k img").get(i).outerHTML );


returns "undefined" in FF
any ideas?





[jQuery] How can I code this func fully jQuery compatible

2007-04-09 Thread phpLord


Hi;

function showReplyBox(itemId,parentId)
   {
   var box = document.getElementById('comment-reply-box');
   var itemBox = document.getElementById('comment-item-'+itemId);
   var parent_id = document.getElementById('parent_id');
  
  
  
   parent_id.value= parentId ? parentId : itemId;


   $("#box").hide()
   $('#replybox').remove()

  
  
  
   var replyDiv = document.createElement('div');
  
   replyDiv.setAttribute('id','replybox');

   $('#replybox').hide()
   replyDiv.innerHTML = box.innerHTML;
   itemBox.appendChild(replyDiv);
   $('#replybox').slideDown("slow");

   }

I got a func like above, as you I am a newbie in jquery ;)

I try to do that like below but I cannot succeed it

function showReplyBox(itemId,parentId)
   {
   var box = $('#comment-reply-box');
   var itemBox = $('#comment-item-'+itemId);
   var parent_id = $('#parent_id');
  
  
   parent_id.val(parentId ? parentId : itemId);


   $("#box").hide()
   $('#replybox').remove()

  
   $('').attr("id","replybox")


   $('#comment-reply-box').appendTo('#replybox')
   $('#replybox').append('#comment-item-'+itemId)  


   }

tHanks for any help


[jQuery] droppables question

2007-04-09 Thread [EMAIL PROTECTED]

Hi,

How do I get the draggable element's text being deposited in my
droppable?  I have tried "text()" and "html()" and I get JS errors,
"text/html is not a function".  Here is the code I'm working with ...

$('#currentclasslist').Droppable(
{
accept: 'student',
tolerance: 'intersect',
activeclass: 'dropzoneactive',
hoverclass: 'dropzonehover',
ondrop: function (drag)
{
var name = $
('#' + id).text();
 
addStudentToClass(name);
}
}
);

The item being dragged in does not have an id attribute.

Thanks, - Dave



[jQuery] Re: General discussion

2007-04-09 Thread Chris W. Parker

On Monday, April 09, 2007 1:56 PM Diego A. <> said:

> However, I complete agree with your point about changing an existing
> selection. But wouldn't it make more sense to have a 'change' link
> that would fire up the file selection dialogue without actually
> displaying 3, 4, 5 input boxes?

[snip]

> Having a 'remove' and 'change' link would probably cover most
> scenarios, wouldn't you agree?

Yes I agree. That's probably a better alternative because of the space
savings.

Good work.


Chris.


[jQuery] Re: General discussion

2007-04-09 Thread Diego A.

Hi Chris,

When I made the plugin, my aim was to allow the selection of multiple
files by only showing one box. I thought the old style list of 5 file
input boxes was messy and space consuming. That is why I thought your
suggestion was against the concept of the plugin.

However, I complete agree with your point about changing an existing
selection. But wouldn't it make more sense to have a 'change' link
that would fire up the file selection dialogue without actually
displaying 3, 4, 5 input boxes?

GMail shows multiple file inputs until the files are uploaded in the
background (as you compose your email). Then there's no option to
change it or remove it. All you can do is untick the box next to the
name (so the file isn't sent).

Having a 'remove' and 'change' link would probably cover most
scenarios, wouldn't you agree?

Cheers,
Diego A.

On Apr 9, 9:47 pm, "Chris W. Parker" <[EMAIL PROTECTED]> wrote:
> On Monday, April 09, 2007 1:07 PM Diego A. <> said:
>
> > Hi Chris,
>
> > Thanks for the suggestions. I made the debug mode just so people
> > could see what's actually going on. I didn't intend it to be used. It
> > would defeat the purpose of the plugin if I didn't hide the
> > additional elements.
>
> I disagree. I think it's a useful mode beyond the idea of debugging.
> It's basically the same behavior as Gmail's file attachment system and I
> think that's really useful.
>
> If I were to use this (which I probably will) I would probably always
> put it in "debug" mode so that I (or anyone else) could quickly change
> the path of a file instead of having to remove and then re-add the
> correct one.
>
> Hopfully I'm not missing the point of the "debug" mode. If I am please
> let me know.
>
> Chris.



[jQuery] Re: ANNOUNCE: New jQuery Book Available for Pre-Order!!

2007-04-09 Thread Aaron Heimlich

On 4/9/07, Jonathan Chaffer <[EMAIL PROTECTED]> wrote:


They tend to offer the eBook ... bundled with the print edition at a
reduced cost.



That's what I would want to pre-order, but I don't see it listed on the
book's page.

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


[jQuery] Re: table paging and sorting together

2007-04-09 Thread Jonathan Chaffer

On Apr 6, 2007, at 13:53 , Paul wrote:

I’m curious how you all handle paged tabular data that also needs  
to be sortable.  I would typically rely on ajax to retrieve next  
25 / previous 25 rows, but if the user can sort any column they  
want they effectively change what “next 25” means every time they  
click a column header.  Do I need to abandon the tablesorter plugin  
and simply use ajax to rebuild the table or is there a better way?
Yes, you pretty much have to do both on the browser or both on the  
server. You can send all the data to the browser and have it paged  
there, or you can perform the sort on the server. Here's a relevant  
excerpt from The Good Book (no not that one):



Sorting and Paging Go Together

Data that is long enough to benefit from sorting is likely long  
enough to be a candidate for paging. It is not unusual to wish to  
combine these two techniques for data presentation. Since they both  
affect the set of data that is present on a page, though, it is  
important to consider their interactions while implementing them.


Both sorting and pagination can be accomplished either on the server  
or in the web browser. We must keep the strategies for the two tasks  
in sync, however. Otherwise, we can end up with confusing behavior.  
Suppose, for example, that both sorting and paging is done on the  
server:



When the table is re-sorted by number, a different set of rows is  
present on page one of the table. If paging is done by the server and  
sorting by the browser, though, the entire data set is not available  
for the sorting routine and so it goes wrong:



Only the data already present on the page can be displayed. To  
prevent this from being a problem, we must either perform both tasks  
on the server, or both in the browser.


--
Jonathan Chaffer
Technology Officer, Structure Interactive




[jQuery] Re: General discussion

2007-04-09 Thread Diego A.

Great idea Scott. And I agree, I wouldn't personally use them, but it
would make the plugin 1. more flexible and 2. expandable (custom
validation, etc).

This is something I'll definitely include in the next version.

Thanks,
Diego A.

On Apr 9, 9:37 pm, Scott Sauyet <[EMAIL PROTECTED]> wrote:
> Diego A. wrote:
> > Fixed the bug and re-packed the script.
>
> Looks great to me.  If you're looking for things to do on it, it would
> be nice if the text "File selected for upload:" and the text "Remove
> this file from selection" were configurable.
>
> The only other thing I might consider with this, besides the suggestion
> of restricting file types, would be to add optional callback functions
> for the events it generates, namely, fileAdded(), fileRemoved(),
> maxFilesThreshholdReached(), and maxFilesThreshholdSomethingElse() :-).
>
> I could especially see that useful for highlighting or in some way
> calling attention to a max files message on threshhold reached.
>
> I'm not sure I would use these callbacks even if they were offered, but
> I could certainly see possibilities for them.
>
> Thanks for another nice tool,
>
>-- Scott



[jQuery] Re: General discussion

2007-04-09 Thread Chris W. Parker

On Monday, April 09, 2007 1:07 PM Diego A. <> said:

> Hi Chris,
> 
> Thanks for the suggestions. I made the debug mode just so people
> could see what's actually going on. I didn't intend it to be used. It
> would defeat the purpose of the plugin if I didn't hide the
> additional elements.

I disagree. I think it's a useful mode beyond the idea of debugging.
It's basically the same behavior as Gmail's file attachment system and I
think that's really useful.

If I were to use this (which I probably will) I would probably always
put it in "debug" mode so that I (or anyone else) could quickly change
the path of a file instead of having to remove and then re-add the
correct one.

Hopfully I'm not missing the point of the "debug" mode. If I am please
let me know.



Chris.


[jQuery] Re: Simple selector question

2007-04-09 Thread Brandon Aaron


You could also use filter to get a jQuery object of the tables that
have borderCollapse == collapse.

var $tables = $('table').filter(function() {
 return $(this).css('borderCollapse') == 'collapse';
});

Now you can run any jQuery methods you might need on this result set.
That is if you need to use this group of tables again later.

--
Brandon Aaron

On 4/9/07, Karl Swedberg <[EMAIL PROTECTED]> wrote:

Hi Geoff,

You should be able to loop through he tables with .each() and see if they
have the css property border-collpase set to "collapse" and if so, do
something. The following should work -- inside a $(document).ready(), of
course:

$('table').each(function() {
  if ($(this).css('borderCollapse') == 'collapse') {
//do your magic
  };
});



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





On Apr 9, 2007, at 4:26 PM, Geoffrey Knutzen wrote:



How would one select all tables in a document that have the css property
border-collapse set to collapse?

My goal is to make a work around for a FF bug
(https://bugzilla.mozilla.org/show_bug.cgi?id=244135) where
borders
disappear sometimes. I am hoping for find all tables with
border-collapse=collapse, set them to separate then set them back to
collapse again.

Thanks
-Geoff





[jQuery] Re: TableSorter question

2007-04-09 Thread Chris W. Parker

On Monday, April 09, 2007 12:43 PM Christian Bach <> said:

> tableSorter({
> sortColumn: 0,
> sortDir: 1
> });
> 
> Will sort the first column in the opposite direction.

Actually that just makes my arrow appear upside down.

Here's what I see without sortDir set.

Column 

April 9, 2007
April 10, 2007
April 11, 2007

Here's what I see with sortDir set to 1.

Column 

April 9, 2007
April 10, 2007
April 11, 2007




Chris.


[jQuery] outerHTML and Firefox does not work

2007-04-09 Thread bjb

Hi,

I've some code that works fine with IE, but not on Firefox (2.0.0.3)
on Vista:

html:



...
...




i=0;
alert($("#k img").get(i).outerHTML );


returns "undefined" in FF
any ideas?



[jQuery] Re: Simple selector question

2007-04-09 Thread Karl Swedberg

Hi Geoff,

You should be able to loop through he tables with .each() and see if  
they have the css property border-collpase set to "collapse" and if  
so, do something. The following should work -- inside a $ 
(document).ready(), of course:


$('table').each(function() {
  if ($(this).css('borderCollapse') == 'collapse') {
//do your magic
  };
});



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



On Apr 9, 2007, at 4:26 PM, Geoffrey Knutzen wrote:




How would one select all tables in a document that have the css  
property

border-collapse set to collapse?

My goal is to make a work around for a FF bug
(https://bugzilla.mozilla.org/show_bug.cgi?id=244135) where borders
disappear sometimes. I am hoping for find all tables with
border-collapse=collapse, set them to separate then set them back to
collapse again.

Thanks
-Geoff





[jQuery] Re: Simple selector question

2007-04-09 Thread Andy Matthews

$('table').attr('css','border-collapse')

Maybe?

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Geoffrey Knutzen
Sent: Monday, April 09, 2007 3:27 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Simple selector question


 
How would one select all tables in a document that have the css property
border-collapse set to collapse?

My goal is to make a work around for a FF bug
(https://bugzilla.mozilla.org/show_bug.cgi?id=244135) where borders
disappear sometimes. I am hoping for find all tables with
border-collapse=collapse, set them to separate then set them back to
collapse again. 

Thanks
-Geoff




[jQuery] Re: Autocomplete Question

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

>>http://www.dyve.net/jquery/autocomplete.txt
>
>I'll try to combine my changes w/Dylan's instructions today and post
>something.

Here are my modified directions:
http://www.pengoworks.com/workshop/jquery/autocomplete_docs.txt

There's a link in the Download section on this page:
http://www.pengoworks.com/workshop/jquery/autocomplete.htm

I'll try to expand the directions even more when I have a chance. 

-Dan



[jQuery] Re: General discussion

2007-04-09 Thread Scott Sauyet


Diego A. wrote:

Fixed the bug and re-packed the script.


Looks great to me.  If you're looking for things to do on it, it would 
be nice if the text "File selected for upload:" and the text "Remove 
this file from selection" were configurable.


The only other thing I might consider with this, besides the suggestion 
of restricting file types, would be to add optional callback functions 
for the events it generates, namely, fileAdded(), fileRemoved(), 
maxFilesThreshholdReached(), and maxFilesThreshholdSomethingElse() :-).


I could especially see that useful for highlighting or in some way 
calling attention to a max files message on threshhold reached.


I'm not sure I would use these callbacks even if they were offered, but 
I could certainly see possibilities for them.


Thanks for another nice tool,

  -- Scott



[jQuery] Re: ANNOUNCE: New jQuery Book Available for Pre-Order!!

2007-04-09 Thread Jonathan Chaffer

On Apr 6, 2007, at 13:13 , Aaron Heimlich wrote:


Sweet! Do you know if there's gonna be an eBook version available?


The publisher produces eBook versions of most of their books, so I  
expect so. We don't know the details yet, but I expect it'll be in  
line with their other offerings. Here's one with the same cover price:


http://www.packtpub.com/drupal/book

They tend to offer the eBook either separately or bundled with the  
print edition at a reduced cost.


--
Jonathan Chaffer
Technology Officer, Structure Interactive

[jQuery] Re: New plugin: ContextMenu

2007-04-09 Thread stonecipher

Anyone have any luck getting this ContextMenu plugin to work with
either Left-Click or Hover/Mouseover?



> > Is it possible to make it withleftclick too? could be a nice
> > addition as many users don't know they have to right click.
>
> > Cheers,
> > Danial
>
> Yep I'll try and put this in the next version. Something in the settings
> like mouseButton: "right"/"left"/"both"?
>
> Chris



[jQuery] Simple selector question

2007-04-09 Thread Geoffrey Knutzen

 
How would one select all tables in a document that have the css property
border-collapse set to collapse?

My goal is to make a work around for a FF bug
(https://bugzilla.mozilla.org/show_bug.cgi?id=244135) where borders
disappear sometimes. I am hoping for find all tables with
border-collapse=collapse, set them to separate then set them back to
collapse again. 

Thanks
-Geoff



[jQuery] Re: General discussion

2007-04-09 Thread Diego A.

Hi Chris,

Whatever happens, you should always be able to see one empty file
input (disabled if you've reached the limit).

I'll look into it

Thanks,
Diego A.

On Apr 9, 9:22 pm, Christopher Jordan <[EMAIL PROTECTED]>
wrote:
> Oh! I see. Well, thanks for setting me straight. I didn't really
> understand what I was seeing then I guess. It's funny, I had five files
> "uploaded" but only three of the browse controls had anything in them.
> After I removed them all, shouldn't I have been left with only one
> browse control?
>
> I've not looked at the code under the hood, and suppose it doesn't
> really matter *too* much to me as long as it works. :o) Anyway, good
> idea for the plugin.
>
> Cheers,
> Chris
>
>
>
> Diego A. wrote:
>
> > Example 3 is in debug mode so you see what;s happening behind the scences. 
> > It
> > doesn't hide the multiple file inputs...
> > Not an error, just a demostration of how it actually works.
>
> > ;-)
>
> > Christopher Jordan wrote:
>
> >> Deigo,
>
> >> I like it too. Cool. I did notice the same as Scott about the limitation
> >> error on example 2. I also noticed a problem where example 3 kept adding
> >> browse boxes and buttons. I started with one, then got an additional one
> >> for each file I added, and after removing all the files, I was left with
> >> two brows controls right next to each other. :o'
>
> >> Otherwise, great work! I think I could definitely find use for this. :o)
>
> >> Chris
>
> >> Scott Sauyet wrote:
> >>> Diego A. wrote:
>  The name says it all. Just thought somebody might find it useful.
>  Please reply to this thread with suggestions, comments...
>
> http://www.fyneworks.com/jQuery/multiple-file-upload/
> >>> Looks very nice.  I love the clean markup.
>
> >>> One bug.  Testing your demo page in FF2.0.0.3 and IE7.0.5730.11 both on
> >>> WinXPsp2, I found that the "limit-3" limits me to two entries, not
> >>> three.  I didn't look at the code, but I'm guessing it's a typical
> >>> off-by-one issue.
>
> >>> Thanks for sharing this,
>
> >>>   -- Scott
>
> >> --
> >>http://www.cjordan.us
>
> --http://www.cjordan.us



[jQuery] [Plugin update]: jquery.cfjs.js

2007-04-09 Thread Chris Jordan

Hi folks,

Just thought I'd drop a quick line to let everyone know that I've
added the ListPrepend() function to the ColdFusionJavaScript plugin
for jQuery.

This *is* a function that CF offers (though I hadn't occasion to use
it until recently), so I figured it needed to be in the plugin. It is
the opposite of ListAppend() and does what you probably suspect it
does

Example:

This code:
var List = "1,2,3,4";
$.ListAppend(List, 5); // sending the number five as a string
would work too.

produces this value for List:
1,2,3,4,5

now if we add this line to the above code:
$.ListPrepend(List, "ChrisRocks");

the value for List is now:
ChrisRocks,1,2,3,4,5


Also, as an interesting (... or maybe I'm just easily amused) side
note, Ray Camden and The-Powers-That-Be over at RIAForge.org have
agreed to create a 'Miscellaneous'  category where projects like this
one can be hosted. I hadn't originally wanted to add it as a project
on RIAForge because I didn't think it met their established
requirements. However, at the prompting of a user, I shot Ray an
email, and presumably after some deliberation they added the new
category. Ray tells me it was something they were sort of considering
anyway.

Okay, well for what it's worth... there ya go. :o)

Cheers!
Chris



[jQuery] Re: General discussion

2007-04-09 Thread Christopher Jordan


Oh! I see. Well, thanks for setting me straight. I didn't really 
understand what I was seeing then I guess. It's funny, I had five files 
"uploaded" but only three of the browse controls had anything in them. 
After I removed them all, shouldn't I have been left with only one 
browse control?


I've not looked at the code under the hood, and suppose it doesn't 
really matter *too* much to me as long as it works. :o) Anyway, good 
idea for the plugin.


Cheers,
Chris

Diego A. wrote:


Example 3 is in debug mode so you see what;s happening behind the scences. It
doesn't hide the multiple file inputs...
Not an error, just a demostration of how it actually works.

;-)

Christopher Jordan wrote:


Deigo,

I like it too. Cool. I did notice the same as Scott about the limitation 
error on example 2. I also noticed a problem where example 3 kept adding 
browse boxes and buttons. I started with one, then got an additional one 
for each file I added, and after removing all the files, I was left with 
two brows controls right next to each other. :o'


Otherwise, great work! I think I could definitely find use for this. :o)

Chris

Scott Sauyet wrote:

Diego A. wrote:

The name says it all. Just thought somebody might find it useful.
Please reply to this thread with suggestions, comments...

http://www.fyneworks.com/jQuery/multiple-file-upload/

Looks very nice.  I love the clean markup.

One bug.  Testing your demo page in FF2.0.0.3 and IE7.0.5730.11 both on 
WinXPsp2, I found that the "limit-3" limits me to two entries, not 
three.  I didn't look at the code, but I'm guessing it's a typical 
off-by-one issue.


Thanks for sharing this,

  -- Scott



--
http://www.cjordan.us






--
http://www.cjordan.us


[jQuery] Re: General discussion

2007-04-09 Thread Diego A.

On Apr 9, 8:21 pm, "Mike Alsup" <[EMAIL PROTECTED]> wrote:
> Diego, take a quick look at the Plugin Authoring guidelines for ways
> to avoid collisions on the $ namespace.

Hi Mike,

The plugin is now un-collision-able

Thanks,
Diego A.

> On 4/9/07, Diego A. <[EMAIL PROTECTED]> wrote:
>
>
>
> > The name says it all. Just thought somebody might find it useful.
> > Please reply to this thread with suggestions, comments...
>
> >http://www.fyneworks.com/jQuery/multiple-file-upload/
>
> > --
> > View this message in 
> > context:http://www.nabble.com/General-discussion-tf3548823s15494.html#a9907176
> > Sent from the jQuery Multiple File Upload mailing list archive at 
> > Nabble.com.



[jQuery] Re: General discussion

2007-04-09 Thread Diego A.


Hi Chris,

Thanks for the suggestions. I made the debug mode just so people could see
what's actually going on. I didn't intend it to be used. It would defeat the
purpose of the plugin if I didn't hide the additional elements.

Having...
[input]
[remove]
[input]
[remove]
...could be a bit of a pain but if somebody really wants it, I could make it
work...

Cheers,
Diego A.


Chris W. Parker wrote:
> 
> 
> On Monday, April 09, 2007 11:38 AM Diego A. <> said:
> 
>> The name says it all. Just thought somebody might find it useful.
>> Please reply to this thread with suggestions, comments...
>> 
>> http://www.fyneworks.com/jQuery/multiple-file-upload/
> 
> Pretty cool dude.
> 
> The limit-3 demo only allowed me to add two files. Maybe you've got a
> '<' where you should have a '<='?
> 
> In the debug example I think the [Remove] line should be placed below
> the corresponding .
> 
> I propose:
> 
> 
> [Remove]
> 
> [Remove]
> 
> [Remove]
> 
> Instead of:
> 
> 
> 
> 
> [Remove]
> [Remove]
> [Remove]
> 
> 
> 
> Regards,
> Chris.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/General-discussion-tf3548823s15494.html#a9908639
Sent from the jQuery Multiple File Upload mailing list archive at Nabble.com.



[jQuery] Re: General discussion

2007-04-09 Thread Diego A.


Hi Mike,

Do you mean:
(function($){
 // use the $ symbol here to avoid collisions
})(jQuery);

???


malsup wrote:
> 
> 
> Diego, take a quick look at the Plugin Authoring guidelines for ways
> to avoid collisions on the $ namespace.
> 
> Mike
> 
> On 4/9/07, Diego A. <[EMAIL PROTECTED]> wrote:
>>
>>
>> The name says it all. Just thought somebody might find it useful.
>> Please reply to this thread with suggestions, comments...
>>
>> http://www.fyneworks.com/jQuery/multiple-file-upload/
>>
>> --
>> View this message in context:
>> http://www.nabble.com/General-discussion-tf3548823s15494.html#a9907176
>> Sent from the jQuery Multiple File Upload mailing list archive at
>> Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/General-discussion-tf3548823s15494.html#a9908591
Sent from the jQuery Multiple File Upload mailing list archive at Nabble.com.



[jQuery] Re: General discussion

2007-04-09 Thread Diego A.


Hi Bruce,

I'm not sure you can control the browser's dialog, but you can definitely
check the name of the file chosen and disallow certain extensions. This
could be a built-in feature and I might implement it this week

Thanks for the suggestion!


Bruce-32 wrote:
> 
> 
> This is great!
> 
> Works too! :)
> 
> Is there a way to add allowed file types? Sorry if dumb ques but am new to 
> this all
> 
> hanks
> 
> Bruce P
> bkdesign
> 
> - Original Message - 
> From: "Diego A." <[EMAIL PROTECTED]>
> To: 
> Sent: Monday, April 09, 2007 2:37 PM
> Subject: [jQuery] General discussion
> 
> 
>>
>>
>> The name says it all. Just thought somebody might find it useful.
>> Please reply to this thread with suggestions, comments...
>>
>> http://www.fyneworks.com/jQuery/multiple-file-upload/
>>
>> -- 
>> View this message in context: 
>> http://www.nabble.com/General-discussion-tf3548823s15494.html#a9907176
>> Sent from the jQuery Multiple File Upload mailing list archive at 
>> Nabble.com.
>>
>>
>> 
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/General-discussion-tf3548823s15494.html#a9908560
Sent from the jQuery Multiple File Upload mailing list archive at Nabble.com.



[jQuery] Re: jQuery n00b

2007-04-09 Thread Matt Quackenbush

Evan, Andy, Scott, Karl-

Thank you for the replies.  One portion has been solved: getting at the
correct href w/o writing a bunch of functions.  The following does the
trick:


var href = $(this).attr('href');


I had previously tried simply using


$("#stand-summary").load(this.href)


but was unsuccessful.

Also thank you for pointing out the over-zealousness of my XPath solution
vs. a simple CSS selector solution.  Sometimes I get carried away with
writing "cool stuff" and don't think of the simple solution.  :-)


Can't really comment on the AJAX, because it could be a server side error.


I didn't think this was the case, as it is simply requesting a flat HTML
file, and the path/name is identical to the "working" version.  I also
received no errors in FireBug - I thought (the page was reloading, so I
couldn't see it).  But I just opened FireBug and was playing around with the
code to see what, if anything would generate an error.  If I comment out the
.load() call, the responseText is appropriately returned from the server.
However, once I uncomment it, the following error is generated:

uncaught exception: [Exception... "Component returned failure code:
0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open]" nsresult:
"0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: javascript:
eval(__firebugTemp__); :: anonymous :: line 1" data: no]

Any ideas as to what that is trying to tell me?

One other related question... According to the jQuery docs, you can set the
AJAX defaults by calling $.ajaxSetup().  In their example, they say that the
following code "Sets the defaults for AJAX requests to the url '/xmlhttp/'
.".

$.ajaxSetup({
   url: "/xmlhttp/",
   global: false,
   type: "POST"
});

As I understand that statement, it means that I can now use $.ajax({ url: "
foo.htm" }) and jQuery will prepend "/xmlhttp/" to "foo.htm", as though I
had written $.ajax({ url: "/xmlhttp/foo.htm" }).  Am I correctly
understanding that?  I ask because I've written the following code, which
appears before the .click() block, but it does not seem to behave in this
manner.

$.ajaxSetup({
   url: "ajax/",
   global: false,
   type: "GET"
});

In FireBug, I get the dreaded 404 returned if I do not prepend the "ajax/"
to the url in my $.ajax() call.


Thanks again,

Matt


[jQuery] Re: General discussion

2007-04-09 Thread Diego A.


Example 3 is in debug mode so you see what;s happening behind the scences. It
doesn't hide the multiple file inputs...
Not an error, just a demostration of how it actually works.

;-)

Christopher Jordan wrote:
> 
> 
> Deigo,
> 
> I like it too. Cool. I did notice the same as Scott about the limitation 
> error on example 2. I also noticed a problem where example 3 kept adding 
> browse boxes and buttons. I started with one, then got an additional one 
> for each file I added, and after removing all the files, I was left with 
> two brows controls right next to each other. :o'
> 
> Otherwise, great work! I think I could definitely find use for this. :o)
> 
> Chris
> 
> Scott Sauyet wrote:
>> 
>> Diego A. wrote:
>>> The name says it all. Just thought somebody might find it useful.
>>> Please reply to this thread with suggestions, comments...
>>>
>>> http://www.fyneworks.com/jQuery/multiple-file-upload/
>> 
>> Looks very nice.  I love the clean markup.
>> 
>> One bug.  Testing your demo page in FF2.0.0.3 and IE7.0.5730.11 both on 
>> WinXPsp2, I found that the "limit-3" limits me to two entries, not 
>> three.  I didn't look at the code, but I'm guessing it's a typical 
>> off-by-one issue.
>> 
>> Thanks for sharing this,
>> 
>>   -- Scott
>> 
>> 
> 
> -- 
> http://www.cjordan.us
> 
> 

-- 
View this message in context: 
http://www.nabble.com/General-discussion-tf3548823s15494.html#a9908537
Sent from the jQuery Multiple File Upload mailing list archive at Nabble.com.



[jQuery] Re: General discussion

2007-04-09 Thread Diego A.


Cheers, Scott...
Fixed the bug and re-packed the script.


Scott Sauyet-3 wrote:
> 
> 
> Diego A. wrote:
>> The name says it all. Just thought somebody might find it useful.
>> Please reply to this thread with suggestions, comments...
>> 
>> http://www.fyneworks.com/jQuery/multiple-file-upload/
> 
> Looks very nice.  I love the clean markup.
> 
> One bug.  Testing your demo page in FF2.0.0.3 and IE7.0.5730.11 both on 
> WinXPsp2, I found that the "limit-3" limits me to two entries, not 
> three.  I didn't look at the code, but I'm guessing it's a typical 
> off-by-one issue.
> 
> Thanks for sharing this,
> 
>-- Scott
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/General-discussion-tf3548823s15494.html#a9908514
Sent from the jQuery Multiple File Upload mailing list archive at Nabble.com.



[jQuery] Re: General discussion

2007-04-09 Thread BKDesign Solutions


This is great!

Works too! :)

Is there a way to add allowed file types? Sorry if dumb ques but am new to 
this all


hanks

Bruce P
bkdesign

- Original Message - 
From: "Diego A." <[EMAIL PROTECTED]>

To: 
Sent: Monday, April 09, 2007 2:37 PM
Subject: [jQuery] General discussion





The name says it all. Just thought somebody might find it useful.
Please reply to this thread with suggestions, comments...

http://www.fyneworks.com/jQuery/multiple-file-upload/

--
View this message in context: 
http://www.nabble.com/General-discussion-tf3548823s15494.html#a9907176
Sent from the jQuery Multiple File Upload mailing list archive at 
Nabble.com.









[jQuery] Re: TableSorter question

2007-04-09 Thread Christian Bach

tableSorter({
sortColumn: 0,
sortDir: 1
});

Will sort the first column in the opposite direction.

/christian

2007/4/9, Chris W. Parker <[EMAIL PROTECTED]>:



On Monday, April 09, 2007 12:02 PM Andy Matthews <> said:

> There's an option for default sort. How is the data getting to the
> page? Is it hard-coded or the result of an SQL operation?

It's both. I mean that it's not JSON or XML data. The data returned from
the SQL call is used to create the table's HTML with PHP. Then
TableSorter does its magic.



Chris.





--
POLYESTER*
Wittstocksgatan 2
115 24 Stockholm
Phone: 08-660 73 50 / +46-8-660 73 50
Mobile: 070-443 91 90 / +46-70-443 91 90
E-mail: [EMAIL PROTECTED]
http://www.polyester.se


[jQuery] Re: General discussion

2007-04-09 Thread Christopher Jordan


Deigo,

I like it too. Cool. I did notice the same as Scott about the limitation 
error on example 2. I also noticed a problem where example 3 kept adding 
browse boxes and buttons. I started with one, then got an additional one 
for each file I added, and after removing all the files, I was left with 
two brows controls right next to each other. :o'


Otherwise, great work! I think I could definitely find use for this. :o)

Chris

Scott Sauyet wrote:


Diego A. wrote:

The name says it all. Just thought somebody might find it useful.
Please reply to this thread with suggestions, comments...

http://www.fyneworks.com/jQuery/multiple-file-upload/


Looks very nice.  I love the clean markup.

One bug.  Testing your demo page in FF2.0.0.3 and IE7.0.5730.11 both on 
WinXPsp2, I found that the "limit-3" limits me to two entries, not 
three.  I didn't look at the code, but I'm guessing it's a typical 
off-by-one issue.


Thanks for sharing this,

  -- Scott




--
http://www.cjordan.us


[jQuery] Re: General discussion

2007-04-09 Thread Mike Alsup


Diego, take a quick look at the Plugin Authoring guidelines for ways
to avoid collisions on the $ namespace.

Mike

On 4/9/07, Diego A. <[EMAIL PROTECTED]> wrote:



The name says it all. Just thought somebody might find it useful.
Please reply to this thread with suggestions, comments...

http://www.fyneworks.com/jQuery/multiple-file-upload/

--
View this message in context: 
http://www.nabble.com/General-discussion-tf3548823s15494.html#a9907176
Sent from the jQuery Multiple File Upload mailing list archive at Nabble.com.




[jQuery] Re: General discussion

2007-04-09 Thread Chris W. Parker

On Monday, April 09, 2007 11:38 AM Diego A. <> said:

> The name says it all. Just thought somebody might find it useful.
> Please reply to this thread with suggestions, comments...
> 
> http://www.fyneworks.com/jQuery/multiple-file-upload/

Pretty cool dude.

The limit-3 demo only allowed me to add two files. Maybe you've got a
'<' where you should have a '<='?

In the debug example I think the [Remove] line should be placed below
the corresponding .

I propose:


[Remove]

[Remove]

[Remove]

Instead of:




[Remove]
[Remove]
[Remove]



Regards,
Chris.


[jQuery] Re: TableSorter question

2007-04-09 Thread Chris W. Parker

On Monday, April 09, 2007 12:02 PM Andy Matthews <> said:

> There's an option for default sort. How is the data getting to the
> page? Is it hard-coded or the result of an SQL operation?

It's both. I mean that it's not JSON or XML data. The data returned from
the SQL call is used to create the table's HTML with PHP. Then
TableSorter does its magic.



Chris.


[jQuery] Re: TableSorter question

2007-04-09 Thread Andy Matthews

There's an option for default sort. How is the data getting to the page? Is
it hard-coded or the result of an SQL operation?

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Chris W. Parker
Sent: Monday, April 09, 2007 1:58 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] TableSorter question


Hello,
 
I want my table to be sorted in the opposite direction that it's currently
being sorted in when TableSorter does its first sort. I can't find a switch
to do that but perhaps I'm not seeing it. Anyone know what it's called or
should I just add my own?
 
 
Thanks,
Chris.




[jQuery] TableSorter question

2007-04-09 Thread Chris W. Parker

Hello,
 
I want my table to be sorted in the opposite direction that it's
currently being sorted in when TableSorter does its first sort. I can't
find a switch to do that but perhaps I'm not seeing it. Anyone know what
it's called or should I just add my own?
 
 
Thanks,
Chris.



[jQuery] Re: General discussion

2007-04-09 Thread Scott Sauyet


Diego A. wrote:

The name says it all. Just thought somebody might find it useful.
Please reply to this thread with suggestions, comments...

http://www.fyneworks.com/jQuery/multiple-file-upload/


Looks very nice.  I love the clean markup.

One bug.  Testing your demo page in FF2.0.0.3 and IE7.0.5730.11 both on 
WinXPsp2, I found that the "limit-3" limits me to two entries, not 
three.  I didn't look at the code, but I'm guessing it's a typical 
off-by-one issue.


Thanks for sharing this,

  -- Scott



[jQuery] Re: General discussion

2007-04-09 Thread Mike Alsup


Diego, this is awesome.  Great work!


The name says it all. Just thought somebody might find it useful.
Please reply to this thread with suggestions, comments...

http://www.fyneworks.com/jQuery/multiple-file-upload/


[jQuery] Re: Getting option text from select

2007-04-09 Thread Buzzterrier

Thx. As it turned out I had a syntax problem:

//works
$('#mySelect :selected').text();

//does not, need space before colon
$('#mySelect:selected').text();

On Apr 9, 11:33 am, "Andy Matthews" <[EMAIL PROTECTED]> wrote:
> Check the archives. I asked the same question about 5 months ago. I can't
> recall what project it was for, but I know it worked.
>
> andy
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>
> Behalf Of Buzzterrier
> Sent: Monday, April 09, 2007 1:20 PM
> To: jQuery (English)
> Subject: [jQuery] Getting option text from select
>
> Is there a way to get the selected option's text from a select-one control?
> The form plugin returns the value, but I cannot seem to find a way to get
> the text.



[jQuery] General discussion

2007-04-09 Thread Diego A.


The name says it all. Just thought somebody might find it useful.
Please reply to this thread with suggestions, comments...

http://www.fyneworks.com/jQuery/multiple-file-upload/

-- 
View this message in context: 
http://www.nabble.com/General-discussion-tf3548823s15494.html#a9907176
Sent from the jQuery Multiple File Upload mailing list archive at Nabble.com.



[jQuery] Re: IE XML Bug

2007-04-09 Thread Diego A.


Sorry, old posted. I've soled it here:
http://fyneworks.blogspot.com/2007/04/fix-for-jquery-bug-in-ie-working-with.html


Diego A. wrote:
> 
> Has anyone else had problems fetching elements on a XML document in IE?
> 
> Anyone solved it?
> 

-- 
View this message in context: 
http://www.nabble.com/IE-XML-Bug-tf3525509s15494.html#a9907150
Sent from the jQuery Developers mailing list archive at Nabble.com.



[jQuery] Re: Getting option text from select

2007-04-09 Thread Andy Matthews

Check the archives. I asked the same question about 5 months ago. I can't
recall what project it was for, but I know it worked.


andy 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Buzzterrier
Sent: Monday, April 09, 2007 1:20 PM
To: jQuery (English)
Subject: [jQuery] Getting option text from select


Is there a way to get the selected option's text from a select-one control?
The form plugin returns the value, but I cannot seem to find a way to get
the text.




[jQuery] Re: Getting option text from select

2007-04-09 Thread Mike Alsup


This might work:

$('#mySelect [EMAIL PROTECTED]).text();


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


Is there a way to get the selected option's text from a select-one
control? The form plugin returns the value, but I cannot seem to find
a way to get the text.




[jQuery] Getting option text from select

2007-04-09 Thread Buzzterrier

Is there a way to get the selected option's text from a select-one
control? The form plugin returns the value, but I cannot seem to find
a way to get the text.



[jQuery] Re: dimensions offset() and centered BODY tag

2007-04-09 Thread [EMAIL PROTECTED]

I agree with Brandon - you are usually better off wrapping your
content in a #wrapper div.
Also, I'm not sure why you need to do this programatically.
With your current code, set position:relative on the body tag - now
you should be able to absolutely position any child of the body tag
treating the upper left corner of the body as 0,0.

christoph

On Apr 8, 8:04 pm, "Brandon Aaron" <[EMAIL PROTECTED]> wrote:

> And actually dealing with the body tag and getting its offset can be a
> pain. Especially if you use position instead of just margin. I would
> suggest using a div to center your content.
>
> --
> Brandon Aaron
>
> On 4/8/07, PragueExpat <[EMAIL PROTECTED]> wrote:
>
>
>
> > The body of my page is centered. It is 800px in width. I have a div that I
> > need to be absolutely positioned over the body, so I am trying to get the
> > left position of the (centered) body tag using the dimensions.js offset
> > method.
>
> > In IE I get the correct left position, but in FF I get 0.
>
> > When I ask for the left position of the first element in the body, IE says 0
> > while FF gives the correct number (even taking into account the centered
> > body).
>
> > $(window).width() does work in both browsers, so I could use that to figure
> > out where the centered body is, but I was just wondering if others have had
> > success finding the position of a centered body tag.
>
> > Thanks!
> > --
> > View this message in 
> > context:http://www.nabble.com/dimensions-offset%28%29-and-centered-BODY-tag-t...
> > Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: jQuery n00b

2007-04-09 Thread Klaus Hartl


Evan schrieb:

Can't really comment on the AJAX, because it could be a server side
error.

However, to dynamically determine the href, use the following:

$(document).ready(function() {
$("//[EMAIL PROTECTED]//a").click(
function() {
var href = $(this).attr('href'); // in this
case this refers to the anchor DOM element, so wrap it in a $() to
return a JQuery object and get he href
$("#stand-summary").load(href);
return false;
}
);

});


Or simply not wrap it and just do

this.href


;-)



-- Klaus


[jQuery] Re: plugin issues

2007-04-09 Thread Ariel Jakobovits
1.1.2

- Original Message 
From: Jonathan Sharp <[EMAIL PROTECTED]>
To: jquery-en@googlegroups.com
Sent: Monday, April 9, 2007 9:48:16 AM
Subject: [jQuery] Re: plugin issues

Ariel,

 

What version of jQuery are you using?

 

Cheers,

-Jonathan

 

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

I am working with jdMenu.

It works great on FF, throws an "invalid argument" in IE.


The example on the site (http://jdsharp.us/code/jQuery/plugins/jdMenu/) does 
not throw the error.

So I figure it's an issue with the mix of libraries I am using.


I would like to use the files packaged in the jdMenu zip, but the jQuery.js 
file it includes is packed so I can't add in the modifications I've made to my 
jQuery.js file, without which nothing works on my site (primarily the scope 
parameter for the ajax callback, which I would like to see added into the main 
jQuery file).


Question 1: How should I deal with this?

Question 2: How can we deal with this for the future?









[jQuery] Re: Autocomplete plugin

2007-04-09 Thread Priest, James \(NIH/NIEHS\) [C]

> -Original Message-
> From: Dan G. Switzer, II [mailto:[EMAIL PROTECTED] 

> 
> Does this look like your problem?
> 
> http://anotherdan.com/2006/6/8/ajax-and-integrated-windows-aut
> hentication
> 
> Honestly, the only time I've seen this issue was when I was using HTTP
> accidentally when my main page was in HTTPS.

Yep - that looks like it - each letter I type in after the initial 2 -
I'm prompted for login...

I'll have to dig around and see how to implement that and if it fixes
the issue...  Still trying to get correct results back from Mach-II but
I think I have that figured out :)

Thanks!
Jim


[jQuery] Re: plugin issues

2007-04-09 Thread Jonathan Sharp

Ariel,

What version of jQuery are you using?

Cheers,
-Jonathan


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



I am working with jdMenu.

It works great on FF, throws an "invalid argument" in IE.

The example on the site (http://jdsharp.us/code/jQuery/plugins/jdMenu/)
does not throw the error.

So I figure it's an issue with the mix of libraries I am using.

I would like to use the files packaged in the jdMenu zip, but the
jQuery.js file it includes is packed so I can't add in the modifications
I've made to my jQuery.js file, without which nothing works on my site
(primarily the scope parameter for the ajax callback, which I would like to
see added into the main jQuery file).

Question 1: How should I deal with this?

Question 2: How can we deal with this for the future?




[jQuery] Re: table paging and sorting together

2007-04-09 Thread Matt Kruse

I am trying to finish up my table sorting/paging/filtering plugin
here:
http://www.JavascriptToolbox.com/lib/table/
(been trying to finish it up for a while... sick kids don't mix well
with javascript development free time...)

It works fine with sorting, filtering, and paging all on the same
table. It is not in the form of a jQuery plugin yet, but that is my
next step so that it can be used in a typical jQuery-ish way rather
than only using the class name approach.

Let me know what you think.

Matt

On Apr 6, 12:53 pm, "Paul" <[EMAIL PROTECTED]> wrote:
> I'm using this table sorter 
> plugin:http://motherrussia.polyester.se/docs/tablesorter/.
>
> I'm curious how you all handle paged tabular data that also needs to be
> sortable.  I would typically rely on ajax to retrieve next 25 / previous 25
> rows, but if the user can sort any column they want they effectively change
> what "next 25" means every time they click a column header.  Do I need to
> abandon the tablesorter plugin and simply use ajax to rebuild the table or
> is there a better way?
>
> Thanks for your input.
>
> Paul



[jQuery] Re: Autocomplete plugin

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

James,

>Next problem - I've got my call to my query fixed - but I've got a weird
>one - my application is protected via integrated Windows authentication
>(using IIS)... So when I visit my page I have to login (I've got this
>setup on my development machine to mimic the production server)...
>
>So I start typing in the autocomplete field and I get prompted to login
>again...   Which makes sense since I'm making another request to the
>server - but how do folks get around this?

Does this look like your problem?

http://anotherdan.com/2006/6/8/ajax-and-integrated-windows-authentication

Honestly, the only time I've seen this issue was when I was using HTTP
accidentally when my main page was in HTTPS.

-Dan



[jQuery] Re: Autocomplete plugin

2007-04-09 Thread Priest, James \(NIH/NIEHS\) [C]

> -Original Message-
> From: Dan G. Switzer, II [mailto:[EMAIL PROTECTED] 

> Also, make sure you're using a tool where you can monitor the HTTP
> traffic--this will help your debugging immensely. I recommend 
> Firebug for

Oh yes - I have Firebug working OT. :) 

Next problem - I've got my call to my query fixed - but I've got a weird
one - my application is protected via integrated Windows authentication
(using IIS)... So when I visit my page I have to login (I've got this
setup on my development machine to mimic the production server)...

So I start typing in the autocomplete field and I get prompted to login
again...   Which makes sense since I'm making another request to the
server - but how do folks get around this?  

Jim



[jQuery] Re: Autocomplete Question

2007-04-09 Thread Dylan Verheul


Jim, there's also some examples on www.dyve.net/jquery?autocomplete,
those will also work with Dan's modifications.

My jQuery plugins are my first open source / code sharing experience,
it's really fun to see stuff like this (other people improving on it)
happen.

On 4/9/07, Priest, James (NIH/NIEHS) [C] <[EMAIL PROTECTED]> wrote:


> -Original Message-
> From: Dan G. Switzer, II [mailto:[EMAIL PROTECTED]
> My mod is 95% Dylan's code, with just some bug fixes and a
> few additional
> features. I apologize for the lack of documentation.

No problem!!

And I'll apologize in advance for how badly I'm probably going to
butcher my first Ajax attempt! :)

Actually you're example looks fairly straightforward.  I'm working in
Mach-II so there may be some hurdles making all this fit into my MVC
setting but hopefully that won't be too bad.

Jim



[jQuery] Re: Autocomplete plugin

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

James,

>OK - I'm stuck :)
>
>I'm implementing Dan's plugin from here:
>http://www.pengoworks.com/workshop/jquery/autocomplete.htm
>
>And the code calls the autocomplete_ajax.cfm page directly - but in
>Mach-II I can't do that.  Can I call a .cfc instead?
>
>
>   $("#CityAjax").autocomplete(
>   "autocomplete_ajax.cfm"
>   );

You should be able to call a Mach-II file just fine. Just use  to clear the output buffer (you might need to set the
content type as well.)

Here's a technique Raymond Camden uses to use Mach II w/Spry and it's AJAX
calls. The only real difference between what Raymond's doing and what you're
doing is instead of returning pure XML, you're just returning a pipe
delimited file.

http://ray.camdenfamily.com/index.cfm/2006/8/22/Using-AJAX-with-ModelGlue

Also, make sure you're using a tool where you can monitor the HTTP
traffic--this will help your debugging immensely. I recommend Firebug for
Firefox and I really like Fiddler HTTP Debugger as a general Windows HTTP
monitoring proxy.

-Dan



[jQuery] Re: Autocomplete plugin

2007-04-09 Thread Jörn Zaefferer


Dan G. Switzer, II schrieb:

What I'd like to know: Are there any plans to work on those mentioned
plugins, especially regarding documentation?

If not, would you agree and maybe help on another derivate, this time
merging the efforts and documenting them?



I've been giving serious thought to re-writing the plug-in and cleaning some
things up (as well as making sure I write to the latest plug-in
recommendations.)

I think there are some changes that would make things more intuitive.
  
I've started merging your version and the complete-multiple mod, see 
svn://jquery.com/trunk/plugins/autocomplete

The select-multiple mod doesn't work as it should yet.
Currently I'm investigating if your text-selection code could be 
replaced with the fieldSelection plugin by Alex Brem.
And I wonder if it is possible to extract the code that draws the 
selectbox from the other stuff. That could help a lot cleaning up the 
codebase.
I've also modified the signature of the plugin methods: Pass an array as 
the first argument for local-autocomplete, or an url for remote.


Your help is still highly appreciated.

--
Jörn Zaefferer

http://bassistance.de



[jQuery] Re: Autocomplete plugin

2007-04-09 Thread Priest, James \(NIH/NIEHS\) [C]

OK - I'm stuck :)

I'm implementing Dan's plugin from here:
http://www.pengoworks.com/workshop/jquery/autocomplete.htm

And the code calls the autocomplete_ajax.cfm page directly - but in
Mach-II I can't do that.  Can I call a .cfc instead?


$("#CityAjax").autocomplete(
"autocomplete_ajax.cfm"
);

Or has anyone used this with Mach-II (or probably any of the CF
frameworks)???

Jim


[jQuery] Re: Autocomplete plugin

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

Jim,

>This is actually what I was considering doing... So you pass the single
>result of the autocomplete to a hidden form - and then use that during
>another form submission?

Correct. While my example doesn't show it, you'd have the functionality to
the findValue() function in the example code. Instead of displaying it in an
alert, you'd post it to a hidden form field.

>I'm working on a user admin and was going to use the 'auto complete' as
>a filter to easily find the correct record and then the user would click
>an 'edit' button and go to a normal form.  Will your improved
>documentation include something on the 'findValue()' function :)

I'll try :) 

Yeah, I use the Autocomplete code in several places as a pseudo-live search.
Where you use the autocomplete box to find records and then use a primary
key to actually build the functionality. This seems to work really well.

-Dan



[jQuery] Re: dependencies in ext

2007-04-09 Thread Brandon Aaron


No that tool was specific to Interface.

--
Brandon Aaron

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


The tool that someone on the list developed recently regarding javascript 
dependencies...is it generic? Can it be run on the ext project to determine 
dependencies to reduce code footprint?





[jQuery] Re: Autocomplete plugin

2007-04-09 Thread Priest, James \(NIH/NIEHS\) [C]

> -Original Message-
> From: Dan G. Switzer, II [mailto:[EMAIL PROTECTED] 

> This is why I added the findValue() functionality. In a 
> project I have, I
> use the "Autocomplete" sort of like a "live search" and then 
> actually update
> a hidden field based on the value in the input field.
> 
> This works very well, but is outside the box of what some 
> people think of as  an autocomplete field.


This is actually what I was considering doing... So you pass the single
result of the autocomplete to a hidden form - and then use that during
another form submission?  

I'm working on a user admin and was going to use the 'auto complete' as
a filter to easily find the correct record and then the user would click
an 'edit' button and go to a normal form.  Will your improved
documentation include something on the 'findValue()' function :)

Thanks!
Jim


[jQuery] Re: Autocomplete Question

2007-04-09 Thread Priest, James \(NIH/NIEHS\) [C]

> -Original Message-
> From: Dan G. Switzer, II [mailto:[EMAIL PROTECTED] 
> My mod is 95% Dylan's code, with just some bug fixes and a 
> few additional
> features. I apologize for the lack of documentation.

No problem!!  

And I'll apologize in advance for how badly I'm probably going to
butcher my first Ajax attempt! :)

Actually you're example looks fairly straightforward.  I'm working in
Mach-II so there may be some hurdles making all this fit into my MVC
setting but hopefully that won't be too bad.

Jim


[jQuery] Re: Autocomplete plugin

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

Jörn,

>What I'd like to know: Are there any plans to work on those mentioned
>plugins, especially regarding documentation?
>
>If not, would you agree and maybe help on another derivate, this time
>merging the efforts and documenting them?

I've been giving serious thought to re-writing the plug-in and cleaning some
things up (as well as making sure I write to the latest plug-in
recommendations.)

I think there are some changes that would make things more intuitive.

-Dan



[jQuery] Re: jQuery n00b

2007-04-09 Thread Andy Matthews

Ooops...

I see now why you had the return false in your code. I didn't see the a. And
yes, you should be able to do that. 

$("#standingsContainer a")

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Scott Sauyet
Sent: Monday, April 09, 2007 8:11 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: jQuery n00b


QuackFuzed wrote:
>   $("//[EMAIL PROTECTED]//a").click(

It's been a while since I did any XPath, but couldn't the above be more
simply written with CSS seclectors as

 $("#standingsContainer a").click(

?  Or am I missing something?

   -- Scott





[jQuery] Re: jQuery n00b

2007-04-09 Thread Karl Swedberg



On Apr 9, 2007, at 9:10 AM, Scott Sauyet wrote:

QuackFuzed wrote:

$("//[EMAIL PROTECTED]//a").click(


It's been a while since I did any XPath, but couldn't the above be  
more simply written with CSS seclectors as


$("#standingsContainer a").click(

?  Or am I missing something?


That's right, Scott. Much simpler your way.


On Apr 9, 2007, at 9:02 AM, Andy Matthews wrote:


One thing to point out is the you don't need the "return false" in  
your
code. Because a DIV doesn't have a built in click handler (like an  
a tag

does) you don't need to cancel it's click handler


I missed the "a" at first, too, because of the unorthodox selector  
expression. But it's there, so the "return false" needs to stay.


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




[jQuery] Re: Autocomplete Question

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

Jim,

>Dan - are you changing code or just the instructional text??

I was just going to take Dylan's instructions and add my
changes/addition/notes to them.

My mod is 95% Dylan's code, with just some bug fixes and a few additional
features. I apologize for the lack of documentation.

-Dan



[jQuery] Re: Autocomplete plugin

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

Dylan,

>Oops, little too fast. You want the reverse of this ,showing more data
>and then showing less in the select box. I guess you can do this, but
>you might need to cheat by writing to the input field from your
>onItemSelect code.

This is why I added the findValue() functionality. In a project I have, I
use the "Autocomplete" sort of like a "live search" and then actually update
a hidden field based on the value in the input field.

This works very well, but is outside the box of what some people think of as
an autocomplete field.

-Dan



[jQuery] Re: jQuery n00b

2007-04-09 Thread Scott Sauyet


QuackFuzed wrote:

$("//[EMAIL PROTECTED]//a").click(


It's been a while since I did any XPath, but couldn't the above be more 
simply written with CSS seclectors as


$("#standingsContainer a").click(

?  Or am I missing something?

  -- Scott



[jQuery] Re: Autocomplete Question

2007-04-09 Thread Priest, James \(NIH/NIEHS\) [C]

> -Original Message-
> From: Dan G. Switzer, II [mailto:[EMAIL PROTECTED] 
> >http://www.dyve.net/jquery/autocomplete.txt
> 
> I'll try to combine my changes w/Dylan's instructions today and post
> something.


Dan - are you changing code or just the instructional text??

I'm actually reading your page right now - getting ready to dig into
this AJAX stuff for the first time (finally!) :)

Thanks to you Dylan and you for the great examples!
Jim


[jQuery] Re: Autocomplete plugin

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

Shelane,

>Ability to show a subset of returned data (within each "record") and hide
>the rest.  On select, pick the data apart to put in different hidden
>fields.

My version already does this (as you may already know.)

See:
http://www.pengoworks.com/workshop/jquery/autocomplete.htm

Look at the "Ajax City Autocomplete" example.

$("#CityAjax").autocomplete(
"autocomplete_ajax.cfm",
{
delay:10,
minChars:2,
matchSubset:1,
matchContains:1,
cacheLength:10,
onItemSelect:selectItem,
onFindValue:findValue,
formatItem:formatItem,
autoFill:true
}
);

In the settings mapping, the key things to do this are the following:

onItemSelect:selectItem 
- This says call the selectItem() function when an item is selected

onFindValue:findValue,
- This is the custom function to use when finding a value. The
findValue() method will look in the text input element and then look to see
if the value is in the cache, if not it will go look it up via AJAX. It'll
return a  element with the match, or null if it doesn't exist. You can
then look in the "extra" custom attribute to get to all your additional
values. 

formatItem:formatItem,
- This defined how the  should be displayed. 

If you look at the source code in my example, you should be able to get the
exact functionality you want.

-Dan



[jQuery] Re: Autocomplete Question

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

Guys,

>http://www.dyve.net/jquery/autocomplete.txt

I'll try to combine my changes w/Dylan's instructions today and post
something.

-Dan



[jQuery] Re: jQuery n00b

2007-04-09 Thread Andy Matthews

One thing to point out is the you don't need the "return false" in your
code. Because a DIV doesn't have a built in click handler (like an a tag
does) you don't need to cancel it's click handler. This should work just
fine:

$(document).ready(function() {
$("//[EMAIL PROTECTED]//a").click( function() {
$.get("myfile.htm", function(data){
$("#stand-summary").html(data)
});
});
});




-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of QuackFuzed
Sent: Monday, April 09, 2007 12:44 AM
To: jQuery (English)
Subject: [jQuery] jQuery n00b


Hello,

After reading lots about jQuery on a number of CF blogs/lists, I've finally
got a project that I think warrants me jumping into it.  I've only started
going through the docs, etc a few hours ago, so I'm sure I'm overlooking
something somewhere, but I have seen so many people brag about the wonderful
community that is jQuery, and figured I'd give it a whirl.

I am trying to create a simple ajax call.  I've tried a number of code
combinations, but the only version I can get to "work" (e.g. load the
file) is this:

$(document).ready(function() {
$("//[EMAIL PROTECTED]//a").click(
function() {
$("#stand-summary").load("myfile.htm")
return false
}
);
});

In theory, I could write a number of blocks like this - one for each page I
want to load - but that would pretty much defeat the purpose of using
jQuery.  So, there are two things that I'm trying to solve here:

1) Dynamically get at the href attribute's value, and
2) Figure out how to properly use the $.ajax() method

I have tried this code, which appears to be correct, based upon my obviously
limited knowledge of jQuery, but does not provide the desired result.  It
throws no errors in FireBug, but produces an empty string as the result...

$(document).ready(function() {
$("//[EMAIL PROTECTED]//a").click(
function() {
var stuff = $.ajax({
   url: "myfile.htm"
   }).responseText
$("#stand-summary").load(stuff)
return false
}
);
});

Any tips/pointers as to what I'm doing wrong would be tremendously
appreciated.


Thanks,

Matt




[jQuery] Re: jQuery n00b

2007-04-09 Thread Evan

Can't really comment on the AJAX, because it could be a server side
error.

However, to dynamically determine the href, use the following:

$(document).ready(function() {
$("//[EMAIL PROTECTED]//a").click(
function() {
var href = $(this).attr('href'); // in this
case this refers to the anchor DOM element, so wrap it in a $() to
return a JQuery object and get he href
$("#stand-summary").load(href);
return false;
}
);

});

On Apr 9, 3:43 pm, "QuackFuzed" <[EMAIL PROTECTED]> wrote:
> Hello,
>
> After reading lots about jQuery on a number of CF blogs/lists, I've
> finally got a project that I think warrants me jumping into it.  I've
> only started going through the docs, etc a few hours ago, so I'm sure
> I'm overlooking something somewhere, but I have seen so many people
> brag about the wonderful community that is jQuery, and figured I'd
> give it a whirl.
>
> I am trying to create a simple ajax call.  I've tried a number of code
> combinations, but the only version I can get to "work" (e.g. load the
> file) is this:
>
> $(document).ready(function() {
> $("//[EMAIL PROTECTED]//a").click(
> function() {
> $("#stand-summary").load("myfile.htm")
> return false
> }
> );
>
> });
>
> In theory, I could write a number of blocks like this - one for each
> page I want to load - but that would pretty much defeat the purpose of
> using jQuery.  So, there are two things that I'm trying to solve here:
>
> 1) Dynamically get at the href attribute's value, and
> 2) Figure out how to properly use the $.ajax() method
>
> I have tried this code, which appears to be correct, based upon my
> obviously limited knowledge of jQuery, but does not provide the
> desired result.  It throws no errors in FireBug, but produces an empty
> string as the result...
>
> $(document).ready(function() {
> $("//[EMAIL PROTECTED]//a").click(
> function() {
> var stuff = $.ajax({
>url: "myfile.htm"
>}).responseText
> $("#stand-summary").load(stuff)
> return false
> }
> );
>
> });
>
> Any tips/pointers as to what I'm doing wrong would be tremendously
> appreciated.
>
> Thanks,
>
> Matt



  1   2   >