[jQuery] Re: response handler scope

2007-04-06 Thread Ralf S. Engelschall

On Sat, Apr 07, 2007, Diego A. wrote:

> It works, but I think that is a terrible idea.
> You'll have to edit the jQuery source every-time there is new release.
> I take a different approach:
> 1. Load jQuery source.
> 2. Make changes to suit my application.
> [...]

You don't really have to repeat local changes every time a new upstream
version comes out. Just use a an arbitrary version control system like
CVS, Subversion or Monotone and _merge_ your and the upstream version
regularily. I'm doing this with both jQuery and dozend of other upstream
sources I've local modifications for.

As jQuery lives in a public accessible SVN itself, it is even simpler
in this particular case. Just checkout jQuery from its SVN, apply your
local modifications (without committing!) to your working area and then
regularily "svn update" your working area by merging in the upstream
sources. If your changes are really surgical ones you usually will not
even get any conflict on updating your working area. This allows you
to maintain your local modifications easily.

But if your local modifications are worth taken over by the upstream
vendor, please do not forget to at least once submit it to them...

   Ralf S. Engelschall
   [EMAIL PROTECTED]
   www.engelschall.com



[jQuery] Re: Unique parameter in Ajax

2007-04-06 Thread Aaron Heimlich

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


Just curious, what changes about the server's behavior when the x-Method
is specified as Ajax?



By itself, it doesn't do anything. But in your server-side code, you can
look for this (or more accurately, look for an HTTP header named
"X-Requested-With" with the value "XmlHttpRequest") and alter your code's
output accordingly (what "accordingly" means is entirely up to you).

For example, you could have a URL that sends a complete HTML page with your
site's header, footer, navigation, etc when requested normally through the
browser, but when requested through AJAX it only outputs the content it
created (without the header and stuff).

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


[jQuery] Re: problems with the starterkit

2007-04-06 Thread Klaus Hartl


Mike Alsup schrieb:



$("#form").reset() should work if it is a correct form. (We attempt to
trigger the default event wherever possible.)


Huh?  The reset event is not bound by jQuery.  Are you thinking of submit?



No, starting with jQuery 1.1 element events are also triggered. The 
following for example will focus the first input in the page:


$('input:eq(0)').focus();

This is especially cool because you don't have to worry about if the 
element exists.


Before jQuery 1.1 you would have to do:

var inputs = $('input');
if (inputs[0]) {
inputs[0].focus();
}


-- Klaus


[jQuery] Re: Unique parameter in Ajax

2007-04-06 Thread Klaus Hartl


Diego A. schrieb:

I ended up changing my server application to look for the header "x-Method =
Ajax" and it works just fine.



Oh well, jQuery already adds a custom header to each Ajax request:

"X-Requested-With: XmlHttpRequest"



-- Klaus



[jQuery] Re: Traversing the dom selecting ever other dom

2007-04-06 Thread Jeffrey Kretz
D'oh.  I shoulda known that   :-/

 

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Aaron Heimlich
Sent: Friday, April 06, 2007 7:34 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Traversing the dom selecting ever other dom

 

This should do it:

$("div:even").addClass("superCoolClass");

On 4/6/07, Jeffrey Kretz < [EMAIL PROTECTED]
 > wrote:


I'm not 100% sure I follow your question, but you could do this: 

$('div').each(function(i)
{
if (i%2)
{
$(this).addClass('newClass');
}
});

"i" is a variable passed by the each method that starts at 0 and increments 
by one for each element it is handling.

JK

-Original Message-
From: jquery-en@googlegroups.com [mailto: jquery-en@googlegroups.com
 ] On
Behalf Of Tom Shafer
Sent: Friday, April 06, 2007 7:11 PM
To: jQuery (English)
Subject: [jQuery] Traversing the dom selecting ever other dom


I was wondering how I can traverse through the dom and start at a div 
and then select every other div until i want it to stop so that I may
add a class to it.

Any Ideas?

Thanks

Tom






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



[jQuery] Re: Traversing the dom selecting ever other dom

2007-04-06 Thread Aaron Heimlich

This should do it:

$("div:even").addClass("superCoolClass");

On 4/6/07, Jeffrey Kretz <[EMAIL PROTECTED]> wrote:



I'm not 100% sure I follow your question, but you could do this:

$('div').each(function(i)
{
if (i%2)
{
$(this).addClass('newClass');
}
});

"i" is a variable passed by the each method that starts at 0 and
increments
by one for each element it is handling.

JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tom Shafer
Sent: Friday, April 06, 2007 7:11 PM
To: jQuery (English)
Subject: [jQuery] Traversing the dom selecting ever other dom


I was wondering how I can traverse through the dom and start at a div
and then select every other div until i want it to stop so that I may
add a class to it.

Any Ideas?

Thanks

Tom






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


[jQuery] Re: Traversing the dom selecting ever other dom

2007-04-06 Thread Jeffrey Kretz

I'm not 100% sure I follow your question, but you could do this:

$('div').each(function(i)
{
if (i%2)
{
$(this).addClass('newClass');
}
});

"i" is a variable passed by the each method that starts at 0 and increments
by one for each element it is handling.

JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tom Shafer
Sent: Friday, April 06, 2007 7:11 PM
To: jQuery (English)
Subject: [jQuery] Traversing the dom selecting ever other dom


I was wondering how I can traverse through the dom and start at a div
and then select every other div until i want it to stop so that I may
add a class to it.

Any Ideas?

Thanks

Tom




[jQuery] Traversing the dom selecting ever other dom

2007-04-06 Thread Tom Shafer

I was wondering how I can traverse through the dom and start at a div
and then select every other div until i want it to stop so that I may
add a class to it.

Any Ideas?

Thanks

Tom



[jQuery] Re: IE XML parsing problem

2007-04-06 Thread Ariel Jakobovits

Did you contribute this back to the Metadata community?

- Original Message 
From: Diego A. <[EMAIL PROTECTED]>
To: jquery-en@googlegroups.com
Sent: Friday, April 6, 2007 3:54:52 PM
Subject: [jQuery] Re: IE XML parsing problem



I've been fighting with this bug too and I believe I've found the fix.
I can't be 100% sure, but I believe the problem was in the jquery.metaData
plugin.
The fix has worked for me and 2 other people so far...

Here is the fix I posted on my blog, hope it helps. And if it does work for
you, then this is definitely what's been driving so many people crazy!

http://fyneworks.blogspot.com/2007/04/fix-for-jquery-bug-in-ie-working-with.html

= Fix for jQuery bug in IE - Working with XML documents =

It's been driving me crazy and I'm not alone (1, 2). But I've finally
managed to fix the weird jQuery bug in IE when working with XML documents
(or so I hope).

The bug isn't in jQuery itself, it's in the very popular Metadata plug-in,
used to load meta data and settings from elements using the class property.

The Error: Lines 101 - 105 in the Metadata plugin.
 if ( $.meta.single )
this[ $.meta.single ] = data; // Throws error on XML documents in IE
 else
$.extend( this, data ); // Throws error on XML documents in IE
 
 this.metaDone = true; // Throws error on XML documents in IE


The fix: Find lines 75-77 in the Metadata plugin:
 $.fn.setArray = function(){
return setArray.apply( this, arguments ).each(function(){
   if ( this.metaDone ) return;

And make the following change: (add line)
 $.fn.setArray = function(){
return setArray.apply( this, arguments ).each(function(){
   try{ this['meta']=null; }catch(e){ return; } // Detect and trap error
   if ( this.metaDone ) return;

And that's it! This fix will allow Metadata to do what it does on HTML
elements and not throw that obscure "Object doesn't support this property or
method" error in Internet Explorer.


Angelo Sozzi wrote:
> 
> Hi,
> 
> I've managed to finish my first plugin and re-learn javascript at the same
> time. So I'm not quite sure if this is a Javascript or jQuery issue.
> 
> The plugin loads external content from HTML or XML data using an AJAX call
> to the file name generated from the LI element clicked.
> DEMO: http://www.sozzi.cn/jquery/fish.fn.trial3.html
> 
> It works perfectly for the HTML variant but the XML fails in IE throwing a
> " Object doesn't support this property or method" error.
> It seems to happen in the XML call and parse function on the line finding
> the "link" within the XML object:
> 
> (snip)...
> $.get(XMLurl, function(xml){
> $("site", xml).each(function(){  // step through each 
> 'site'
> xml node
> $(this).find("link").each(function(){ // find 'link' insidet the 
> 'site' node and turn it into html
> settings.parsedXML += " "+$(this).text()+" 
> ";
> (snip)
> 
> Any thoughts on what I'm doing wrong?
> 
> 
> 
> js:
> /*
>  * AZlinker 0.4 Beta
>  * By Angelo Sozzi (http://www.sozzi.cn/jQuery)
>  * A jQuery plugin that will load XML or HTML links into divs
>  * by maping the UL>LI element names to filenames 
>  * Demo at http://www.sozzi.cn/jQuery/a_zlink.html
>  */
> 
> $.fn.AZlinker = function(settings) {
>  var settings = $.extend({
> targetID: "#xml_here",
> elemname: "li",
> methodXML: true,
> parsedXML: ""
>  }, settings || {}); // overwrite settings if there are any given in
> the function call
>   // other plugin code
>   $("#busy").hide();
>   var list = $(this).find(settings.elemname)
>   list.hover(
> function(){ $(this).next().addClass("medium");
> $(this).prev().addClass("medium");
> $(this).addClass("large");},
> function(){ $(this).next().removeClass("medium");
> $(this).prev().removeClass("medium");
> $(this).removeClass("large");}
> );
> // make clicked li active, read html and use to retrieve html or xml
> list.click(function(){//Add an OnClick event to all 
> list.removeClass("active");   //OnClick Remove the active class from 
> all
> li  
> $(this).addClass("active"); //Add class=active to clicked li
> if (settings.methodXML){
> var XMLurl = "xml/"+$.trim($(this).text())+".xml";  //Read out 
> text
> from litext li and make filename from it
> loadXML(XMLurl);
> }
> else {
> HTMLurl = "html/"+$.trim($(this).text())+".html"; //read out text from
> litext li and make filename from it
> $(settings.targetID).load(HTMLurl);//trim is used because 
> text leaves
> a space in IE
> }
> });
> // Helper funtions 
> // The Ajax XML call and parsing to html
> function loadXML(XMLurl){
> settings.parsedXML="";
> $.get(XMLurl, function(xml){
> $("site", xml).each(function(){  // step through each 

[jQuery] Re: inserting a DIV in alphabetical order

2007-04-06 Thread Giant Jam Sandwich

JavaScript arrays support a simple sort() method for this task. This
will give you a lexicographically (dictionary) sort from A-Z.

$(function(){
   arrStudents = new Array();
   $(".student").each(function(i){
  arrStudents[i] = $(this).text();
   });
   arrStudents = arrStudents.sort();
   $("#classList").html(""); // clear out your previous records
   for (i = 0; i < arrStudents.length; i++) {
  $("#classList").append("" + arrStudents[i]
+ "");
   }
});

You can also use an XML file, and then use AJAX to grab it and build
out your HTML. Just another way of doing it I guess.


On Apr 6, 6:14 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a DIV (id = "classList") witih many smaller DIVs, each of class
> "student".  The smaller DIV only contains text.  If I want to add a
> new student DIV to the list, but add it in alphabetical order, is
> there a simple, tried and true jQuery way of doing this?
>
> Thanks, - Dave



[jQuery] Re: Unique parameter in Ajax

2007-04-06 Thread Ariel Jakobovits

Just curious, what changes about the server's behavior when the x-Method is 
specified as Ajax?

- Original Message 
From: Diego A. <[EMAIL PROTECTED]>
To: jquery-en@googlegroups.com
Sent: Friday, April 6, 2007 5:48:20 PM
Subject: [jQuery] Re: Unique parameter in Ajax



Thanks for the quick response guys. This message had been pending for a few
days and I've since managed to work around the problem, but I think this
might be a bug.

By doing this...
$.ajaxSetup({ global:true, data:{'ajax':'y'} });
... jQuery should:
1. add 'ajax = y' to the data submitted when I call $.post
2. add 'ajax=y' to the querystring when I call $.get
but it doesn't! I think this is a bug.

I tried to work around using the beforeSend parameter like this...
$.ajaxSetup({ global:true, beforeSend:function(r,o){ /* ADD ajax=y TO CALL
*/ } });
... but this doesn't work because the transport (request object) is already
open by then and url/query string has already been defined and is readOnly.

I can't use the ajaxStart global event because I can't access the individual
call's settings.
I can't use the ajaxSend global event because as beforeSend, the transport
(request object) is already open and by this point the url/query string has
already been defined and is readOnly.

I ended up changing my server application to look for the header "x-Method =
Ajax" and it works just fine.


malsup wrote:
> 
> Ariel and Jörn posted some good ideas on this thread:
> 
> http://groups.google.com/group/jquery-en/browse_thread/thread/5ec973dd2ca45738/3794cc7ced0f3ee0#3794cc7ced0f3ee0
> 
> 
>> I'd like to add a unique parameter to every ajax call jquery makes.
>> I need this to happen on get and post commands (ie.: form submits too).
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Unique-parameter-in-Ajax-tf3440508s15494.html#a9880250
Sent from the JQuery mailing list archive at Nabble.com.






[jQuery] Re: response handler scope

2007-04-06 Thread lagos . tout

thanks a bunch guys!
lagos.tout

On Apr 6, 6:00 pm, "Diego A." <[EMAIL PROTECTED]> wrote:
> It works, but I think that is a terrible idea.
> You'll have to edit the jQuery source every-time there is new release.
> I take a different approach:
> 1. Load jQuery source.
> 2. Make changes to suit my application.
>
> I think the best way to handle  ajax responses is to add another
> function layer:
> $.extend({
>
> // My custom implementation of jQuery's $.post function (in caps)
> POST: function(f, callback, more_paremeters, more_things){
>
> // Call jQuery's built-in  implementation of post
> $.post({
> success: function(response){
> // Do something with parameter: 
> more_paremeters
> // Do something with parameter: more_things
>
> // Invoke a callback function just like 
> jQuery would
> if(callback){ callback(response, status); }
> }
> });
> },
>
> // My custom implementation of jQuery's $.post function (in caps)
> GET: function(f, callback, more_paremeters, more_things){
>
> // Call jQuery's built-in  implementation of post
> $.get({
> success: function(response){
> // Do something with parameter: 
> more_paremeters
> // Do something with parameter: more_things
>
> // Invoke a callback function just like 
> jQuery would
> if(callback){ callback(response, status); }
> }
> });
> }
>
> }); // end extending jQuery
>
> This way:
> 1. You can easily update jQuery when new versions are released
> 2. You don't have lots of little work arounds.
> 3. There's no restrictions to what you can do.
>
> On Apr 6, 12:57 am, Ariel Jakobovits <[EMAIL PROTECTED]> wrote:
>
> > I have edited my jquery.js file to look like this:
>
> > // If a local callback was specified, fire it and pass it the data
> > if ( s.success ) {
> > if ( s.scope ) {
> > s.success.call( s.scope , data , status );
> > }
> > else {
> > s.success( data, status );
> > }
> > }
>
> > - Original Message 
> > From: lagos.tout <[EMAIL PROTECTED]>
> > To: jquery-en@googlegroups.com
> > Sent: Thursday, April 5, 2007 2:39:50 PM
> > Subject: [jQuery] response handler scope
>
> > is it possible to specify the object scope of the
> > method that handles an ajax response?
> > the method defaults to executing in the global scope,
> > i.e. the window.  i'd be grateful for any suggestions
> > on how to change this.
> > thanks.
> > j.



[jQuery] Re: Truncate Plugin v.2.0

2007-04-06 Thread Giant Jam Sandwich

The issue becomes the character count. If I pull the string as HTML,
and use the max length provided, then I would have to use a regular
expression to skip html tags in the count. That part would not be so
hard, but if the truncate needs to happen in the middle of a child
tag, I would have to pull in the close tags. Consider the following:

This is a string to demonstrate a technical issue with this plugin.

If the truncate happens immediately after the word "this", then I have
to add back the  and the . Is this less complicated than I am
making it sound? Any suggestions would be appreciated.

Thanks for everyone's positive feedback so far!


On Apr 5, 9:55 am, "Andy Matthews" <[EMAIL PROTECTED]> wrote:
> Well, I suppose you could search for LAST child tag (of any type) of the
> selected tag, then truncate the  text inside that to make sure you still
> keep your formatting. So given your example:
> This is my string to truncate.
>
> You might end up with this:
> This is my string to tr...
> --
> Starting with this:
> jquery is  the BOMB yo. It makes short
> work of coding
>
> You'd end up with this:
> jquery is  the BOMB yo. It makes short
> w...
> --
> And finally, if there were no child tags:
> I'm plain vanilla HTML and I'll die alone because I have no children
>
> You'd get this:
> I'm plain vanilla HTML and I'll die alone...
>
> Your thoughts?
>
> andy
>
>
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>
> Behalf Of Giant Jam Sandwich
> Sent: Thursday, April 05, 2007 8:25 AM
> To: jQuery (English)
> Subject: [jQuery] Re: Truncate Plugin v.2.0
>
> Hey Andy,
>
> Sorry about that. This was an updated release of an older version (which had
> the description of what the plugin did). If you view the source, you can see
> instructions on how to use the plugin. It is not a newsreader - it is for
> string manipulation. I will probably update the demo to better explain that.
>
> As an aside, this will need a 2.1 update soon enough. Currently, if you were
> to select a parent element, and the string within that element you wanted to
> truncate had HTML (child elements), you would loose that formatting. For
> instance:
>
> 
>This is my string to truncate. 
>
> If you choose the paragraph tag as the element to parse the text, it will
> grab that (sans bold tag), and then append it back to the paragraph tag
> without the bold. I need to rethink how to handle this scenario. Any
> suggestions?
>
> Brian
>
> On Apr 5, 9:11 am, "Andy Matthews" <[EMAIL PROTECTED]> wrote:
> > What's it do? You have an example without explaining it's usage or
> > what exactly it does. You have news headlines on your example page, so
> > is it a newsreader? Your headlines are cut off so does it trim down a
> > string of text to a specified length?
>
> > andy
>
> > -Original Message-
> > From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED]
> > On
>
> > Behalf Of Giant Jam Sandwich
> > Sent: Wednesday, April 04, 2007 6:35 PM
> > To: jQuery (English)
> > Subject: [jQuery] Truncate Plugin v.2.0
>
> > Well, I have vastly improved this script. It was my first plugin for
> > jQuery, and after creating a few others, I decided to go back and make
> > some edits on this one. You can find the demo here:
>
> >http://reindel.com/blog/src/jquery_truncate/
>
> > Feedback is always welcome.
>
> > Brian- Hide quoted text -
>
> - Show quoted text -



[jQuery] Re: response handler scope

2007-04-06 Thread Diego A.

It works, but I think that is a terrible idea.
You'll have to edit the jQuery source every-time there is new release.
I take a different approach:
1. Load jQuery source.
2. Make changes to suit my application.

I think the best way to handle  ajax responses is to add another
function layer:
$.extend({

// My custom implementation of jQuery's $.post function (in caps)
POST: function(f, callback, more_paremeters, more_things){

// Call jQuery's built-in  implementation of post
$.post({
success: function(response){
// Do something with parameter: more_paremeters
// Do something with parameter: more_things

// Invoke a callback function just like jQuery 
would
if(callback){ callback(response, status); }
}
});
},


// My custom implementation of jQuery's $.post function (in caps)
GET: function(f, callback, more_paremeters, more_things){

// Call jQuery's built-in  implementation of post
$.get({
success: function(response){
// Do something with parameter: more_paremeters
// Do something with parameter: more_things

// Invoke a callback function just like jQuery 
would
if(callback){ callback(response, status); }
}
});
}
}); // end extending jQuery

This way:
1. You can easily update jQuery when new versions are released
2. You don't have lots of little work arounds.
3. There's no restrictions to what you can do.

On Apr 6, 12:57 am, Ariel Jakobovits <[EMAIL PROTECTED]> wrote:
> I have edited my jquery.js file to look like this:
>
> // If a local callback was specified, fire it and pass it the data
> if ( s.success ) {
> if ( s.scope ) {
> s.success.call( s.scope , data , status );
> }
> else {
> s.success( data, status );
> }
> }
>
> - Original Message 
> From: lagos.tout <[EMAIL PROTECTED]>
> To: jquery-en@googlegroups.com
> Sent: Thursday, April 5, 2007 2:39:50 PM
> Subject: [jQuery] response handler scope
>
> is it possible to specify the object scope of the
> method that handles an ajax response?
> the method defaults to executing in the global scope,
> i.e. the window.  i'd be grateful for any suggestions
> on how to change this.
> thanks.
> j.



[jQuery] Re: Unique parameter in Ajax

2007-04-06 Thread Diego A.


Thanks for the quick response guys. This message had been pending for a few
days and I've since managed to work around the problem, but I think this
might be a bug.

By doing this...
$.ajaxSetup({ global:true, data:{'ajax':'y'} });
... jQuery should:
1. add 'ajax = y' to the data submitted when I call $.post
2. add 'ajax=y' to the querystring when I call $.get
but it doesn't! I think this is a bug.

I tried to work around using the beforeSend parameter like this...
$.ajaxSetup({ global:true, beforeSend:function(r,o){ /* ADD ajax=y TO CALL
*/ } });
... but this doesn't work because the transport (request object) is already
open by then and url/query string has already been defined and is readOnly.

I can't use the ajaxStart global event because I can't access the individual
call's settings.
I can't use the ajaxSend global event because as beforeSend, the transport
(request object) is already open and by this point the url/query string has
already been defined and is readOnly.

I ended up changing my server application to look for the header "x-Method =
Ajax" and it works just fine.


malsup wrote:
> 
> Ariel and Jörn posted some good ideas on this thread:
> 
> http://groups.google.com/group/jquery-en/browse_thread/thread/5ec973dd2ca45738/3794cc7ced0f3ee0#3794cc7ced0f3ee0
> 
> 
>> I'd like to add a unique parameter to every ajax call jquery makes.
>> I need this to happen on get and post commands (ie.: form submits too).
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Unique-parameter-in-Ajax-tf3440508s15494.html#a9880250
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: Using hoever() to highlight TR, but not thead? Works in FF but not IE.

2007-04-06 Thread Seth

The reason this happens is that  is not a replacement for .
s are supposed to contain s.

See: http://www.w3schools.com/tags/tag_thead.asp

> "Note: The  must have a  tag inside!
>
> Note: If you use the thead, tfoot and tbody elements, you must use every 
> element.
> They should appear in this order: ,  and , so that 
> browsers can render the foot
> before receiving all the data. You must use these tags within the table 
> element."



[jQuery] Re: Unique parameter in Ajax

2007-04-06 Thread Mike Alsup


I did!  Thanks, Klaus.  :-)



I think you meant:
http://groups.google.com/group/jquery-en/browse_thread/thread/68592545316c1e4a/3dcffd978d8d77d5#3dcffd978d8d77d5

;-)


[jQuery] Re: Unique parameter in Ajax

2007-04-06 Thread Klaus Hartl


Mike Alsup schrieb:

Oops, wrong thread, sorry.  Klaus had a nice post on this one:

http://groups.google.com/group/jquery-en/browse_thread/thread/5ec973dd2ca45738/3794cc7ced0f3ee0#3794cc7ced0f3ee0 


I think you meant:
http://groups.google.com/group/jquery-en/browse_thread/thread/68592545316c1e4a/3dcffd978d8d77d5#3dcffd978d8d77d5

;-)


-- Klaus


[jQuery] Re: Unique parameter in Ajax

2007-04-06 Thread Mike Alsup

Oops, wrong thread, sorry.  Klaus had a nice post on this one:

http://groups.google.com/group/jquery-en/browse_thread/thread/5ec973dd2ca45738/3794cc7ced0f3ee0#3794cc7ced0f3ee0


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

Ariel and Jörn posted some good ideas on this thread:

http://groups.google.com/group/jquery-en/browse_thread/thread/5ec973dd2ca45738/3794cc7ced0f3ee0#3794cc7ced0f3ee0


> I'd like to add a unique parameter to every ajax call jquery makes.
> I need this to happen on get and post commands (ie.: form submits too).



[jQuery] Re: Unique parameter in Ajax

2007-04-06 Thread Mike Alsup

Ariel and Jörn posted some good ideas on this thread:

http://groups.google.com/group/jquery-en/browse_thread/thread/5ec973dd2ca45738/3794cc7ced0f3ee0#3794cc7ced0f3ee0



I'd like to add a unique parameter to every ajax call jquery makes.
I need this to happen on get and post commands (ie.: form submits too).


[jQuery] Unique parameter in Ajax

2007-04-06 Thread Diego A.


I'd like to add a unique parameter to every ajax call jquery makes.
I need this to happen on get and post commands (ie.: form submits too).

Does anyone have an idea of how to do this?
-- 
View this message in context: 
http://www.nabble.com/Unique-parameter-in-Ajax-tf3440508s15494.html#a9593357
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] IE XML Bug

2007-04-06 Thread Diego A.


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#a9835861
Sent from the jQuery Developers mailing list archive at Nabble.com.



[jQuery] Re: IE XML parsing problem

2007-04-06 Thread Diego A.


I've been fighting with this bug too and I believe I've found the fix.
I can't be 100% sure, but I believe the problem was in the jquery.metaData
plugin.
The fix has worked for me and 2 other people so far...

Here is the fix I posted on my blog, hope it helps. And if it does work for
you, then this is definitely what's been driving so many people crazy!

http://fyneworks.blogspot.com/2007/04/fix-for-jquery-bug-in-ie-working-with.html

= Fix for jQuery bug in IE - Working with XML documents =

It's been driving me crazy and I'm not alone (1, 2). But I've finally
managed to fix the weird jQuery bug in IE when working with XML documents
(or so I hope).

The bug isn't in jQuery itself, it's in the very popular Metadata plug-in,
used to load meta data and settings from elements using the class property.

The Error: Lines 101 - 105 in the Metadata plugin.
 if ( $.meta.single )
this[ $.meta.single ] = data; // Throws error on XML documents in IE
 else
$.extend( this, data ); // Throws error on XML documents in IE
 
 this.metaDone = true; // Throws error on XML documents in IE


The fix: Find lines 75-77 in the Metadata plugin:
 $.fn.setArray = function(){
return setArray.apply( this, arguments ).each(function(){
   if ( this.metaDone ) return;

And make the following change: (add line)
 $.fn.setArray = function(){
return setArray.apply( this, arguments ).each(function(){
   try{ this['meta']=null; }catch(e){ return; } // Detect and trap error
   if ( this.metaDone ) return;

And that's it! This fix will allow Metadata to do what it does on HTML
elements and not throw that obscure "Object doesn't support this property or
method" error in Internet Explorer.


Angelo Sozzi wrote:
> 
> Hi,
> 
> I've managed to finish my first plugin and re-learn javascript at the same
> time. So I'm not quite sure if this is a Javascript or jQuery issue.
> 
> The plugin loads external content from HTML or XML data using an AJAX call
> to the file name generated from the LI element clicked.
> DEMO: http://www.sozzi.cn/jquery/fish.fn.trial3.html
> 
> It works perfectly for the HTML variant but the XML fails in IE throwing a
> " Object doesn't support this property or method" error.
> It seems to happen in the XML call and parse function on the line finding
> the "link" within the XML object:
> 
> (snip)...
> $.get(XMLurl, function(xml){
>   $("site", xml).each(function(){  // step 
> through each 'site'
> xml node
>   $(this).find("link").each(function(){ // find 'link' 
> insidet the 
> 'site' node and turn it into html
>   settings.parsedXML += " 
> "+$(this).text()+" ";
> (snip)
> 
> Any thoughts on what I'm doing wrong?
> 
> 
> 
> js:
> /*
>  * AZlinker 0.4 Beta
>  * By Angelo Sozzi (http://www.sozzi.cn/jQuery)
>  * A jQuery plugin that will load XML or HTML links into divs
>  * by maping the UL>LI element names to filenames 
>  * Demo at http://www.sozzi.cn/jQuery/a_zlink.html
>  */
> 
> $.fn.AZlinker = function(settings) {
>  var settings = $.extend({
> targetID: "#xml_here",
>   elemname: "li",
>   methodXML: true,
>   parsedXML: ""
>  }, settings || {}); // overwrite settings if there are any given in
> the function call
>   // other plugin code
>   $("#busy").hide();
>   var list = $(this).find(settings.elemname)
>   list.hover(
>   function(){ $(this).next().addClass("medium");
>   $(this).prev().addClass("medium");
>   $(this).addClass("large");},
>   function(){ $(this).next().removeClass("medium");
>   $(this).prev().removeClass("medium");
>   $(this).removeClass("large");}
>   );
>   // make clicked li active, read html and use to retrieve html or xml
>   list.click(function(){//Add an OnClick event to all 
>   list.removeClass("active");   //OnClick Remove the active class 
> from all
> li  
>   $(this).addClass("active"); //Add class=active to clicked li
>   if (settings.methodXML){
>   var XMLurl = "xml/"+$.trim($(this).text())+".xml";  
> //Read out text
> from litext li and make filename from it
>   loadXML(XMLurl);
>   }
>   else {
>   HTMLurl = "html/"+$.trim($(this).text())+".html"; //read out 
> text from
> litext li and make filename from it
>   $(settings.targetID).load(HTMLurl); //trim is used 
> because text leaves
> a space in IE
>   }
>   }); 
> // Helper funtions 
> // The Ajax XML call and parsing to html
>   function loadXML(XMLurl){
>   settings.parsedXML="";
>   $.get(XMLurl, function(xml){
>   $("site", xml).each(function(){ 

[jQuery] Re: inserting a DIV in alphabetical order

2007-04-06 Thread Glen Lipka

Sounds hard.
Have you seen this?  Looks like a sort plugin.
http://dev.jquery.com/browser/jquery/sort/sort.js?rev=1

Maybe append and then immediately sort?

Glen


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



Hi,

I have a DIV (id = "classList") witih many smaller DIVs, each of class
"student".  The smaller DIV only contains text.  If I want to add a
new student DIV to the list, but add it in alphabetical order, is
there a simple, tried and true jQuery way of doing this?

Thanks, - Dave




[jQuery] Re: TableSorter issues: special characters, mixed data

2007-04-06 Thread Christian Bach

I checked in a new version that takes care of all the problems.

I based my test case on your example, located here:
http://lovepeacenukes.com/jquery/tests/tablesorter-mixed-data-types.html

/christian


2007/4/6, Kim Johnson <[EMAIL PROTECTED]>:



Err... I take that back.

-the only way for the page to not have javascript
errors is to put in the ExtractionType line, due to
the special characters in the title.

-however, by doing this, any time you sort any other
field, it still is sorting by title, not the field you
actually clicked.

--- Kim Johnson <[EMAIL PROTECTED]> wrote:

> Super close, but not quite! :)
>
>
http://anime-planet.com/users/reviewindex.php?usersid=1
>
> $("#userreviewtable").tableSorter({
> sortColumn: 'title',
> stripingRowClass: ['alt2','alt'],
>   stripeRowsOnStartUp: true,
>   textExtractionCustom: [
>   [2,'integer']
>   ],
>   textExtractionType: ['title']
> });
>
> ExtractionType fixes the title issue -- those sort
> just fine now. I also changed the date to 4 digits
> and
> that works just fine (it didn't work with the date
> line you had mentioned for 2 digits). However, the
> Custom line still doesn't do anything for sorting
> the
> score field. (I removed the 0's, as normally those
> fields would be BLANK, as opposed to 0). I also
> tried
> changing [2, 'integer'] to 'decimal' or 'double', to
> no avail. Any ideas on this last tiny bit?
>
> thanks again,
> -kim
>
> --- Christian Bach <[EMAIL PROTECTED]>
> wrote:
>
> > I took a look at your example page and this
> snippet
> > will solve your problem:
> >
> > $("#userreviewtable").tableSorter({
> > sortColumn: 'title',
> > stripingRowClass: ['alt2','alt'],
> > stripeRowsOnStartUp: true,
> > textExtractionCustom: [
> > [2,'integer']
> > ],
> > dateFormat: "dd/mm/yy"
> > });
> >
> >
> > What we are doing here is forcing the third column
> > (we start counting at
> > zero) to use the integer parser,
> > since the column is messed up with the auto
> > detection and identified as a
> > text column (hey, no ones perfect).
> >
> > As regarding your date format 01/01/07 i have
> added
> > this to the shortDate
> > parser, however since the year is
> > formatted with two digests the parser will parse
> 07
> > as 1997 since there is
> > no way for it to know that you
> > properly mean 2007. So my suggestion is to change
> > this to a full 4 digit
> > year format.
> >
> > If you do change the the year to a 4 digit format
> > remove the dateFormat
> > property from the tablesorter constructor.
> >
> >
> > The new tablesorter version can be found here:
> >
>

http://dev.jquery.com/browser/trunk/plugins/tablesorter/jquery.tablesorter.js?format=txt
> >
> > Best regards
> > Christian
> >
> >
> > 2007/4/5, Kim Johnson <[EMAIL PROTECTED]>:
> > >
> > >
> > > Thanks Christian!
> > >
> > > I just pasted that in and indeed, now there
> isn't
> > a JS
> > > error and it sorts correctly by title. However,
> > now
> > > something strange is happening and the other
> > fields
> > > don't sort -- they all sort by title! The date
> > > specifically is what I just tried.
> > >
> > > Here are two sample pages:
> > >
> > >
> >
>
http://anime-planet.com/users/reviewindex.php?usersid=19
> > >
> > > ^^this page has always worked, because it has no
> > > special character names
> > >
> > >
> >
>
http://anime-planet.com/users/reviewindex.php?usersid=1
> > > ^^the "problem child" page. The title does now
> > work.
> > >
> > > Also, here's the tablesorter initialization:
> > >
> > > $("#userreviewtable").tableSorter({
> > > sortColumn: 'title',
> > > stripingRowClass: ['alt2','alt'],
> > > stripeRowsOnStartUp: true,
> > > textExtractionType: ['title']
> > > });
> > >
> > > And one other question: is it possible to do
> > multiple
> > > columns for textExtraction (using a comma, two
> > > separate lines for it, etc)? There is one other
> > column
> > > (score) that in theory should be able to have
> > either
> > > nothing, or a number.
> > >
> > > Note: I'm still down with helping you on the
> > > documentation front :)
> > >
> > > thanks!
> > > -kim
> > >
> > > --- Christian Bach <[EMAIL PROTECTED]>
> > > wrote:
> > >
> > > > Kim, is it possible to publish a test page so
> i
> > can
> > > > take a look?
> > > >
> > > >
> > > > A "quick fix" would be to use the new property
> > > > textExtractionType - which in
> > > > true tablesorter spirit is undocumented.
> > > >
> > > >
> > > >
> > > > Here is a example:
> > > >
> > > > This forces the tablesorter to extract data
> out
> > of
> > > > the title attribute,
> > > > allowing a simple way to present mixed data to
> > the
> > > > user
> > > > (string/numbers/etc).
> > > >
> > > > 
> > > > $("table").tableSorter({
> > > > textExtractionType: ['title']
> > > > });
> > > >
> > > > 
> > > > 
> > > > 
> > > > 
> > > > Row
> > > > Number
> > > >
> > > > 
> > > > 
> > > > 
> > > > 
> > >

[jQuery] Re: Body Browser Classes

2007-04-06 Thread Glen Lipka






I think the alternative is for people who want to keep their classes

together even if some of them are browser specific.
For example, in the app I am working on the CSS is enormous.  (dont ask)
And the whole thing is changing pretty rapidly.
And I am going to want to change certain things section-by-section.  In this
scenerio, I really do not want to seperate out an ie6.css.
I just want to comment in my css /* override for blah blah because IE6 sucks
*/.

The benefit of his method is that it doesn't use JS, which I thought was an
interesting implementation and avoids the "depends on JS" issue.

Glen


[jQuery] inserting a DIV in alphabetical order

2007-04-06 Thread [EMAIL PROTECTED]

Hi,

I have a DIV (id = "classList") witih many smaller DIVs, each of class
"student".  The smaller DIV only contains text.  If I want to add a
new student DIV to the list, but add it in alphabetical order, is
there a simple, tried and true jQuery way of doing this?

Thanks, - Dave



[jQuery] Re: I'm going nutz...

2007-04-06 Thread Smith, Allex

Thanks,

I don't know why I tried to switch and use attr().

Previously I had been using css()

Everything is perfect now.

Allex

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Friday, April 06, 2007 2:56 PM
To: jQuery (English)
Subject: [jQuery] Re: I'm going nutz...



No, IE doesn't treat styles as simple text, the way FF does (just like
$(' h1 {color: black}') works in FF but not in IE. The
style object is read-only and you can only set its members. You should
use $(...).css(...)

Danny Wachsstock

On Apr 6, 3:27 pm, "Smith, Allex" <[EMAIL PROTECTED]> wrote:
> It's not applying the style... I'm using the dump() plugin as well as 
> simply alerting it to the screen.
>
> Allex
>
> -Original Message-
> From: jquery-en@googlegroups.com
>
> [mailto:[EMAIL PROTECTED] On Behalf Of Andy Matthews
> Sent: Friday, April 06, 2007 12:25 PM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: I'm going nutz...
>
> Are you talking about viewing source in IE vs FF? Because if 
> you perform an action with jQuery, then view source in IE,  you'll 
> NEVER see the changes in the code. However, using the "View Generated 
> Source" option in FF's developer toolbar allows you to see changes 
> made using javascript.
>
> Or are you saying that it's not even applying the style?
>
> 
>
> From: jquery-en@googlegroups.com 
> [mailto:[EMAIL PROTECTED] On Behalf Of Smith, Allex
> Sent: Friday, April 06, 2007 1:57 PM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] I'm going nutz...
>
> Test
>
> $('#mytest').attr({style:"width:200px;"});
>
> returns
>
> Test in FF2
>
> Test in IE6
>
> I must be going mad.
>
> Any suggestions as to where I might be going wrong?



[jQuery] Re: Body Browser Classes

2007-04-06 Thread Klaus Hartl


[EMAIL PROTECTED] schrieb:

There is an easier  way that is not jQuery-or-Javascript-dependent,
since mostly we just want to know is the browser IE  or not. Use
conditional comments around the BODY tag. See 
http://www.puidokas.com/updating-my-css-for-ie7/
. I use :
  
  
  
  
  
  

  

Danny Wachsstock


To me this looks really ugly. Why not simply:




-- Klaus


[jQuery] Re: I'm going nutz...

2007-04-06 Thread d . wachss

No, IE doesn't treat styles as simple text, the way FF does (just like
$(' h1 {color: black}') works in FF but not in IE.
The style object is read-only and you can only set its members.
You should use $(...).css(...)

Danny Wachsstock

On Apr 6, 3:27 pm, "Smith, Allex" <[EMAIL PROTECTED]> wrote:
> It's not applying the style... I'm using the dump() plugin as well as
> simply alerting it to the screen.
>
> Allex
>
> -Original Message-
> From: jquery-en@googlegroups.com
>
> [mailto:[EMAIL PROTECTED] On Behalf Of Andy Matthews
> Sent: Friday, April 06, 2007 12:25 PM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: I'm going nutz...
>
> Are you talking about viewing source in IE vs FF? Because if you
> perform an action with jQuery, then view source in IE,  you'll NEVER see
> the changes in the code. However, using the "View Generated Source"
> option in FF's developer toolbar allows you to see changes made using
> javascript.
>
> Or are you saying that it's not even applying the style?
>
> 
>
> From: jquery-en@googlegroups.com
> [mailto:[EMAIL PROTECTED] On Behalf Of Smith, Allex
> Sent: Friday, April 06, 2007 1:57 PM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] I'm going nutz...
>
> Test
>
> $('#mytest').attr({style:"width:200px;"});
>
> returns
>
> Test in FF2
>
> Test in IE6
>
> I must be going mad.
>
> Any suggestions as to where I might be going wrong?



[jQuery] Re: Stop pending AJAX processes?

2007-04-06 Thread Andy Matthews
Hrm...not a bad idea. I'll look into that.

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Kristinn Sigmundsson
Sent: Friday, April 06, 2007 4:24 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Stop pending AJAX processes?


hmm how about then making a single ajaxcall when opening a accordation menu
and splitting the returning result (using xml, json or whatever) and then
put it on the right place? That would make the request quite few and still
make the initial page load fast. 

//Kristinn




On 4/6/07, Andy Matthews <[EMAIL PROTECTED]> wrote: 

Dan...
 
The catch is that I'm not loading "all" of the info at once. It's
technically still an on demand process. The user is initiating it by opening
an accordion section. There's quite a lot of code coming back and the whole
enchilada might take longer than we would like. So I think this is a good
middle ground. It's more proof of concept anyway but I'm interested to see
how it might work.

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dan G. Switzer, II
Sent: Friday, April 06, 2007 9:41 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Stop pending AJAX processes?


Andy,

 

If you want all the information to just be there, then include it in the
original HTML and just hide it. The core benefit you gain by loading content
"on demand" is you only send the data that's necessary. If you ended up
doing a bunch of AJAX calls to load all the data, all you've done is made
the code harder to manage and inundated your server with a bunch of requests
instead of one single request (remember, each AJAX call is a separate HTTP
request-depending on your page and the number of users you could really
flood your server w/requests.)

 

Also, there is no way to "stop" a request once it's started. Once you
initiate the HTTP request, the server will start processing it. You can stop
listening for the result you get back from the server, but the server is
still going to attempt to complete the request.

 

-Dan

 

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Andy Matthews
Sent: Friday, April 06, 2007 9:56 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Stop pending AJAX processes?

 

First a small walk-through of what I've got now:

http://www.commadelimited.com/uploads/psychic
 

 

Right now, if you click any of the black images, it triggers an AJAX call
which places it's response in a hidden div. That's easy enough and already
works. In an effort to make this work as speedily as possible, I'd like to
do following:

 

1) When ANY "session" first opens, every row that has more data (indicated
by the black image which has a class of "nav") should make it's associated
AJAX call and return it's information. I would like this to happen with no
action from the user.

 

2) If the user switches to a new accordion section, ideally I'd like to
cancel all pending AJAX calls, then trigger new calls for the current
accordion section.

 

So, that's my question...is this possible, and if so, how would I do it? The
thought is that the user will spend at least a few seconds looking at the
basic interface before clicking into any of the details. It would be awesome
if, when the user clicks any details image, that the data was already there
and the details would just slide open.

 

Anyone have any ideas how to accomplish this, if it's even possible?



 

Andy Matthews
Senior Coldfusion Developer

Office:  877.707.5467 x747
Direct:  615.627.9747
Fax:  615.467.6249

[EMAIL PROTECTED]
www.dealerskins.com  

 




image001.gif
Description: GIF image


[jQuery] Re: Small Interface website update

2007-04-06 Thread Yehuda Katz

Now all we need is a hierarchical D&D tree and resizable layouts (with
content panes), and Interface beats Ext any day of the week in my book.

-- Yehuda

On 4/6/07, Yehuda Katz <[EMAIL PROTECTED]> wrote:


Hey!

Props to you guys; I've been waiting for this for the longest time; it
definitely makes Interface development easier.

-- Yehuda

On 4/6/07, Marshall Salinger <[EMAIL PROTECTED]> wrote:
>
>
> Rey Bango wrote:
> >
> > Agreed. Interface is EXTREMELY important to the jQuery project. More
> > so than any 3rd party library. Keep up the great work Stefan & Paul!
> >
> > Rey...
> >
> > Jeffrey Kretz wrote:
> >> This is FANTASTIC!
> >>
> >> I was worried that with Ext you might not want to continue
> >> development.  I
> >> personally prefer Interface, and my project would suffer greatly
> >> without it.
> >>
> >> Thanks for your continued work on this project.
> >> JK
> >>
> >> -Original Message-
> >> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED]
> On
> >> Behalf Of [EMAIL PROTECTED]
> >> Sent: Friday, April 06, 2007 12:50 AM
> >> To: jQuery (English)
> >> Subject: [jQuery] Small Interface website update
> >>
> >>
> >> Hi guys,
> >>
> >> Long time no see.
> >>
> >> http://interface.eyecon.ro/dependencies useful to check dependencies
> .
> >>
> >> Starting next week I will have some free time again and me and Paul
> >> will continue working on Interface 2. I hope this month we will
> >> release it.
> >>
> >> Take care.
> >>
> >>
> >>
> >
> I hate to flood the list with kudos, but seeing the capabilities of
> Interface was a huge factor for me when I decided to start using jQuery.
>
> I am still in awe over that screencast that was posted here. I look
> forward to Interface 2.0! Thanks Stefan and Paul.
>
>


--
Yehuda Katz
Web Developer | Wycats Designs
(ph)  718.877.1325





--
Yehuda Katz
Web Developer | Wycats Designs
(ph)  718.877.1325


[jQuery] Re: Small Interface website update

2007-04-06 Thread Yehuda Katz

Hey!

Props to you guys; I've been waiting for this for the longest time; it
definitely makes Interface development easier.

-- Yehuda

On 4/6/07, Marshall Salinger <[EMAIL PROTECTED]> wrote:



Rey Bango wrote:
>
> Agreed. Interface is EXTREMELY important to the jQuery project. More
> so than any 3rd party library. Keep up the great work Stefan & Paul!
>
> Rey...
>
> Jeffrey Kretz wrote:
>> This is FANTASTIC!
>>
>> I was worried that with Ext you might not want to continue
>> development.  I
>> personally prefer Interface, and my project would suffer greatly
>> without it.
>>
>> Thanks for your continued work on this project.
>> JK
>>
>> -Original Message-
>> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>> Behalf Of [EMAIL PROTECTED]
>> Sent: Friday, April 06, 2007 12:50 AM
>> To: jQuery (English)
>> Subject: [jQuery] Small Interface website update
>>
>>
>> Hi guys,
>>
>> Long time no see.
>>
>> http://interface.eyecon.ro/dependencies useful to check dependencies .
>>
>> Starting next week I will have some free time again and me and Paul
>> will continue working on Interface 2. I hope this month we will
>> release it.
>>
>> Take care.
>>
>>
>>
>
I hate to flood the list with kudos, but seeing the capabilities of
Interface was a huge factor for me when I decided to start using jQuery.
I am still in awe over that screencast that was posted here. I look
forward to Interface 2.0! Thanks Stefan and Paul.





--
Yehuda Katz
Web Developer | Wycats Designs
(ph)  718.877.1325


[jQuery] Re: Stop pending AJAX processes?

2007-04-06 Thread Kristinn Sigmundsson

hmm how about then making a single ajaxcall when opening a accordation menu
and splitting the returning result (using xml, json or whatever) and then
put it on the right place? That would make the request quite few and still
make the initial page load fast.

//Kristinn



On 4/6/07, Andy Matthews <[EMAIL PROTECTED]> wrote:


 Dan...

The catch is that I'm not loading "all" of the info at once. It's
technically still an on demand process. The user is initiating it by opening
an accordion section. There's quite a lot of code coming back and the whole
enchilada might take longer than we would like. So I think this is a good
middle ground. It's more proof of concept anyway but I'm interested to see
how it might work.

 --
*From:* jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Dan G. Switzer, II
*Sent:* Friday, April 06, 2007 9:41 AM
*To:* jquery-en@googlegroups.com
*Subject:* [jQuery] Re: Stop pending AJAX processes?

 Andy,



If you want all the information to just be there, then include it in the
original HTML and just hide it. The core benefit you gain by loading content
"on demand" is you only send the data that's necessary. If you ended up
doing a bunch of AJAX calls to load all the data, all you've done is made
the code harder to manage and inundated your server with a bunch of requests
instead of one single request (remember, each AJAX call is a separate HTTP
request—depending on your page and the number of users you could really
flood your server w/requests.)



Also, there is no way to "stop" a request once it's started. Once you
initiate the HTTP request, the server will start processing it. You can stop
listening for the result you get back from the server, but the server is
still going to attempt to complete the request.



-Dan


  --

*From:* jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Andy Matthews
*Sent:* Friday, April 06, 2007 9:56 AM
*To:* jquery-en@googlegroups.com
*Subject:* [jQuery] Stop pending AJAX processes?



First a small walk-through of what I've got now:

http://www.commadelimited.com/uploads/psychic



Right now, if you click any of the black images, it triggers an AJAX call
which places it's response in a hidden div. That's easy enough and already
works. In an effort to make this work as speedily as possible, I'd like to
do following:



1) When ANY "session" first opens, every row that has more data (indicated
by the black image which has a class of "nav") should make it's associated
AJAX call and return it's information. I would like this to happen with no
action from the user.



2) If the user switches to a new accordion section, ideally I'd like to
cancel all pending AJAX calls, then trigger new calls for the current
accordion section.



So, that's my question...is this possible, and if so, how would I do it?
The thought is that the user will spend at least a few seconds looking at
the basic interface before clicking into any of the details. It would be
awesome if, when the user clicks any details image, that the data was
already there and the details would just slide open.



Anyone have any ideas how to accomplish this, if it's even possible?

****

* *

*Andy Matthews
*Senior Coldfusion Developer

Office:  877.707.5467 x747
Direct:  615.627.9747
Fax:  615.467.6249

[EMAIL PROTECTED]
www.dealerskins.com






[jQuery] Re: Body Browser Classes

2007-04-06 Thread d . wachss



On Apr 4, 10:48 pm, "Glen Lipka" <[EMAIL PROTECTED]> wrote:
> Feedback desired:
>
 > Lately, I have been developing CSS
and HTML for a deep Web 2.0 complex app.
> Usually, I avoid CSS hacks like the plague.  But recently, I have had to
> resort to the Holly Hack or the StarHTML Hack.  But then it occured to me
> that jQuery provides a better way.
>
> A simple plugin could be written (has this already been written?) that tags
> the BODY (or other node) with a "browser class" resulting in:
>  or  or  or whatever.
> Then your CSS would be:
>
> body.ie6 div.troublesome {height: 100%} rather than
> * html div.troublesome etc
>
> This makes your CSS avoid bizarre invalid hacks and use normal "conditional"
> classes that are self-documenting.  Everyone knows that body.IE6 means you
> are adjusting for browser differences.  And jQuery is much better at
> detection than crazy hacks.
>
There is an easier  way that is not jQuery-or-Javascript-dependent,
since mostly we just want to know is the browser IE  or not. Use
conditional comments around the BODY tag. See 
http://www.puidokas.com/updating-my-css-for-ie7/
. I use :
  
  
  
  
  
  

  

Danny Wachsstock



[jQuery] Re: Bizarre IE Troubles

2007-04-06 Thread Alex Ezell

I got rid of the password hoping someone might be able to help. I'm
thinking maybe it's some conflict between Google Maps and jQuery, but
because of the IE weirdness, I can't even see the page to see if there
is an error.

Thanks!

/alex

On Apr 4, 2:11 pm, "Alex Ezell" <[EMAIL PROTECTED]> wrote:
> I'm not 100% sure that jQuery is causing this issue, but I can't even
> figure out what the error is, so I ask you kind people for help. This
> has been a thorn in my side for a week now.
>
> Whenever anyone executes a search on this page, IE gives an error
> about "Webpage has expired." It works fine in the other browsers I
> have tested. It might be the Google maps, but I think it's a jquery
> issue with the search filtering.
>
> If anyone can just point me to what might be causing the issue, I can
> work on fixing it. The page is behind a password for now because it's
> still a WIP. Sorry to make you jump through hoops.
>
> http://strtest.alexezell.com/search/
>
> user: jquerylist
> pass: jqrocks
>
> Thanks!
>
> /alex



[jQuery] Re: I'm going nutz...

2007-04-06 Thread Smith, Allex
Sorry... fat fingered your name Glen.
 
Allex

-Original Message-
From: jquery-en@googlegroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Smith, Allex
Sent: Friday, April 06, 2007 12:19 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: I'm going nutz...


Thanks Glin...
 
I'll give it a whirl.
 
Allex

-Original Message-
From: jquery-en@googlegroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Glen Lipka
Sent: Friday, April 06, 2007 12:07 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: I'm going nutz...


On 4/6/07, Smith, Allex <[EMAIL PROTECTED]>
wrote: 

 
Test
 $('#mytest').attr({style:"width:200px;"});
 returns 
 Test in FF2
 Test in IE6
 I must be going mad.
 Any suggestions as to where I might be going
wrong?


 
or if you need multiple:
$("#mytest'").css({ color: "red", width: "200px" });



[jQuery] Re: I'm going nutz...

2007-04-06 Thread Smith, Allex
It's not applying the style... I'm using the dump() plugin as well as
simply alerting it to the screen.
 
Allex

-Original Message-
From: jquery-en@googlegroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Andy Matthews
Sent: Friday, April 06, 2007 12:25 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: I'm going nutz...


Are you talking about viewing source in IE vs FF? Because if you
perform an action with jQuery, then view source in IE,  you'll NEVER see
the changes in the code. However, using the "View Generated Source"
option in FF's developer toolbar allows you to see changes made using
javascript.
 
Or are you saying that it's not even applying the style?



From: jquery-en@googlegroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Smith, Allex
Sent: Friday, April 06, 2007 1:57 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] I'm going nutz...


 
Test
 
$('#mytest').attr({style:"width:200px;"});
 
returns 
 
Test in FF2
 
Test in IE6
 
I must be going mad.
 
Any suggestions as to where I might be going wrong?



[jQuery] help with resetting a slider (Interface plugin)

2007-04-06 Thread [EMAIL PROTECTED]

I'm working on a page that uses the Slider from interface.eyecon.ro.
Works perfectly the first time Slider is initialized.

However, re-initializing the slider *without a page load* is
problematic.

Here's what I'm currently using (it works):
// get rid of any existing indicators and reset the slider by nulling
slider object vars
$('#timeSlider').empty();
$('#timeSlider').get(0).slideCfg = '';
$('#timeSlider').get(0).isSlider = '';
$('#timeSlider').get(0).dragElem = '';

Does anyone else have any suggestions for a more elegant way to handle
it?



[jQuery] Re: Permission denied to call method XMLHttpRequest.open

2007-04-06 Thread Ⓙⓐⓚⓔ

#!/usr/bin/perl
use LWP::UserAgent;
use CGI;
$ua = LWP::UserAgent->new;
$ua->agent("NuBrowser/10.7 ");
$res = $ua->request(HTTP::Request->new(GET =>  $ENV{QUERY_STRING};
$q = CGI->new;
print $q->header($res->headers->{'Content-Type'}),$res->content;

does it for me! real simple, classic perl cgi, and now I can use jquery to
read other's rss feeds (or anything else)!


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


SnapShot wrote:
> More important... is there a way around it that is transparent to the
> reader of the site?
>

If you have access to server-side java/cgi/php whatever, you
can proxy the URL you want to load.  Look up "ajax proxy" for
a rundown of the issue.

--
paulw





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


[jQuery] Re: Getting all labels

2007-04-06 Thread Buzzterrier

Thanks to you both. Both approaches work. I appreciate the tips.


On Apr 6, 12:33 pm, "Andy Matthews" <[EMAIL PROTECTED]> wrote:
> Make that:
>
> $(document).ready( function() {
>
> var myArr = [];
> alert(myArr);
> $('label').each( function() {
> myArr.push($(this).attr('for'));
> });
> alert(myArr);
>
> });
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>
> Behalf Of Andy Matthews
> Sent: Friday, April 06, 2007 2:27 PM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: Getting all labels
>
> Maybe
>
> Var myArr = [];
> $('label').each(
> myArr.push($(this).attr('for'));
> );
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Buzzterrier
> Sent: Friday, April 06, 2007 2:13 PM
> To: jQuery (English)
> Subject: [jQuery] Getting all labels
>
> I want to get all labels in a form, and then access their "for"
> attribute to link it to the field.
>
> I thought that $("label") would give me an array of all label elements that
> I could loop through and get the "for" value. But this does not work and I
> know I am missing something fundamental to Jquery.
>
> If I do:
>
> $("label").attr("for");
>
> It gives me the first label in the fieldset, which is confusing.



[jQuery] Re: Getting all labels

2007-04-06 Thread Andy Matthews

Make that:

$(document).ready( function() {

var myArr = [];
alert(myArr);
$('label').each( function() {
myArr.push($(this).attr('for'));
});
alert(myArr);

});

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Andy Matthews
Sent: Friday, April 06, 2007 2:27 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Getting all labels


Maybe

Var myArr = [];
$('label').each(
myArr.push($(this).attr('for'));
);



-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Buzzterrier
Sent: Friday, April 06, 2007 2:13 PM
To: jQuery (English)
Subject: [jQuery] Getting all labels


I want to get all labels in a form, and then access their "for"
attribute to link it to the field.

I thought that $("label") would give me an array of all label elements that
I could loop through and get the "for" value. But this does not work and I
know I am missing something fundamental to Jquery.

If I do:

$("label").attr("for");

It gives me the first label in the fieldset, which is confusing.





[jQuery] Re: Getting all labels

2007-04-06 Thread Andy Matthews

Maybe

Var myArr = [];
$('label').each(
myArr.push($(this).attr('for'));
);



-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Buzzterrier
Sent: Friday, April 06, 2007 2:13 PM
To: jQuery (English)
Subject: [jQuery] Getting all labels


I want to get all labels in a form, and then access their "for"
attribute to link it to the field.

I thought that $("label") would give me an array of all label elements that
I could loop through and get the "for" value. But this does not work and I
know I am missing something fundamental to Jquery.

If I do:

$("label").attr("for");

It gives me the first label in the fieldset, which is confusing.




[jQuery] Re: I'm going nutz...

2007-04-06 Thread Andy Matthews
Are you talking about viewing source in IE vs FF? Because if you perform an
action with jQuery, then view source in IE,  you'll NEVER see the changes in
the code. However, using the "View Generated Source" option in FF's
developer toolbar allows you to see changes made using javascript.
 
Or are you saying that it's not even applying the style?

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Smith, Allex
Sent: Friday, April 06, 2007 1:57 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] I'm going nutz...


 
Test
 
$('#mytest').attr({style:"width:200px;"});
 
returns 
 
Test in FF2
 
Test in IE6
 
I must be going mad.
 
Any suggestions as to where I might be going wrong?


[jQuery] Re: Getting all labels

2007-04-06 Thread Roman Weich


Buzzterrier schrieb:

I want to get all labels in a form, and then access their "for"
attribute to link it to the field.

I thought that $("label") would give me an array of all label elements
that I could loop through and get the "for" value. But this does not
work and I know I am missing something fundamental to Jquery.

If I do:

$("label").attr("for");

It gives me the first label in the fieldset, which is confusing.



But just doing $("label") should give you the array.
You probably have to do it like this (as .attr() just returns the value 
of the attribute):


$("label").each(function(){
foo = $(this).attr("for");
});

Cheers,
/rw


[jQuery] Re: I'm going nutz...

2007-04-06 Thread Smith, Allex
Thanks Glin...
 
I'll give it a whirl.
 
Allex

-Original Message-
From: jquery-en@googlegroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Glen Lipka
Sent: Friday, April 06, 2007 12:07 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: I'm going nutz...


On 4/6/07, Smith, Allex <[EMAIL PROTECTED]> wrote: 

 
Test
 $('#mytest').attr({style:"width:200px;"});
 returns 
 Test in
FF2
 Test in IE6
 I must be going mad.
 Any suggestions as to where I might be going wrong?


 
or if you need multiple:
$("#mytest'").css({ color: "red", width: "200px" });



[jQuery] Re: I'm going nutz...

2007-04-06 Thread Glen Lipka

On 4/6/07, Steve Blades <[EMAIL PROTECTED]> wrote:


I thought it was

$('#mytest').css({width:"200px"});

to set a style attribute?



The curly braces depend on if you want to set an array or a single one.
Check in www.jquery.com/api under CSS.
Its got a bunch of good examples.

Glen


[jQuery] Getting all labels

2007-04-06 Thread Buzzterrier

I want to get all labels in a form, and then access their "for"
attribute to link it to the field.

I thought that $("label") would give me an array of all label elements
that I could loop through and get the "for" value. But this does not
work and I know I am missing something fundamental to Jquery.

If I do:

$("label").attr("for");

It gives me the first label in the fieldset, which is confusing.



[jQuery] Re: checking for multiple selects with the same value

2007-04-06 Thread Roman Weich


Roman Weich schrieb:


RwL schrieb:



maybe something like this:

$('select').change(function(){
if ( $('[EMAIL PROTECTED]' + this.value + ']').not(this).length )
{
$('.formTip').show();
}
else
{
$('.formTip').hide();
}

});


Just to make sure I understand why this works... is this a correct
explanation for why ".length" is in there?

If we've found a matching value in another select element, ".length"
returns 1 or greater, so the condition is executed. If no matches, it
returns 0, so the Else condition is executed.

Thanks again,
Rob


If no element is found it returns an empty array, which (at least in 
Firefox) is not false.



aw, I should read more carefully.

Yes, you're right of course. That was just the explanation why not using 
length would be bad. :)


[jQuery] Re: I'm going nutz...

2007-04-06 Thread Steve Blades

I thought it was

$('#mytest').css({width:"200px"});

to set a style attribute?

--

Steve "Cutter" Blades
Adobe Certified Professional
Advanced Macromedia ColdFusion MX 7 Developer
_
http://blog.cutterscrossing.com

---
The Past is a Memory
The Future a Dream
But Today is a Gift
That's why they call it
The Present


[jQuery] I'm going nutz...

2007-04-06 Thread Smith, Allex
 
Test
 
$('#mytest').attr({style:"width:200px;"});
 
returns 
 
Test in FF2
 
Test in IE6
 
I must be going mad.
 
Any suggestions as to where I might be going wrong?


[jQuery] Re: I'm going nutz...

2007-04-06 Thread Glen Lipka

On 4/6/07, Smith, Allex <[EMAIL PROTECTED]> wrote:



Test
 $('#mytest').attr({style:"width:200px;"});
 returns
 Test in FF2
 Test in IE6
 I must be going mad.
 Any suggestions as to where I might be going wrong?




or if you need multiple:
$("#mytest'").css({ color: "red", width: "200px" });


[jQuery] Re: I'm going nutz...

2007-04-06 Thread Glen Lipka

On 4/6/07, Smith, Allex <[EMAIL PROTECTED]> wrote:



Test
$('#mytest').attr({style:"width:200px;"});

returns
Test in FF2
Test in IE6

I must be going mad.
Any suggestions as to where I might be going wrong?




Why not do
$("#mytest").css("width","200px");

Glen


[jQuery] Re: checking for multiple selects with the same value

2007-04-06 Thread Roman Weich


RwL schrieb:



maybe something like this:

$('select').change(function(){
if ( $('[EMAIL PROTECTED]' + this.value + ']').not(this).length )
{
$('.formTip').show();
}
else
{
$('.formTip').hide();
}

});


Just to make sure I understand why this works... is this a correct
explanation for why ".length" is in there?

If we've found a matching value in another select element, ".length"
returns 1 or greater, so the condition is executed. If no matches, it
returns 0, so the Else condition is executed.

Thanks again,
Rob


If no element is found it returns an empty array, which (at least in 
Firefox) is not false.


[jQuery] Re: checking for multiple selects with the same value

2007-04-06 Thread RwL


> maybe something like this:
>
> $('select').change(function(){
> if ( $('[EMAIL PROTECTED]' + this.value + ']').not(this).length )
> {
> $('.formTip').show();
> }
> else
> {
> $('.formTip').hide();
> }
>
> });

Just to make sure I understand why this works... is this a correct
explanation for why ".length" is in there?

If we've found a matching value in another select element, ".length"
returns 1 or greater, so the condition is executed. If no matches, it
returns 0, so the Else condition is executed.

Thanks again,
Rob



[jQuery] Re: checking for multiple selects with the same value

2007-04-06 Thread RwL

Thanks, Roman, this seems to do exactly what I need it to -- that's
twice in two days you've saved me from banging my head against a
wall.  :)




On Apr 6, 1:29 pm, Roman Weich <[EMAIL PROTECTED]> wrote:
> RwL schrieb:
>
> > I'd like to extend this simple function but don't know what to do
> > next:
>
> > $('select').change(function(){
> >$('.formTip').show();
> > });
>
> > What I really want this to do, is:
>
> > On the change event, check to see if any value of any  element
> > on the page matches the value of any other  on the page -- if
> > so, show .formTip. If they've made a change so that two values no
> > longer match, hide it again.
>
> > I'm still wrapping my brain around all the ways jQuery can select and
> > extend the selection; can't figure this one out.
>
> > Thanks,
> > Rob
>
> Hi Rob,
>
> maybe something like this:
>
> $('select').change(function(){
> if ( $('[EMAIL PROTECTED]' + this.value + ']').not(this).length )
> {
> $('.formTip').show();
> }
> else
> {
> $('.formTip').hide();
> }
>
> });
>
> Cheers,
> /rw



[jQuery] Re: checking for multiple selects with the same value

2007-04-06 Thread Roman Weich


RwL schrieb:

I'd like to extend this simple function but don't know what to do
next:

$('select').change(function(){
$('.formTip').show();
});

What I really want this to do, is:

On the change event, check to see if any value of any  element
on the page matches the value of any other  on the page -- if
so, show .formTip. If they've made a change so that two values no
longer match, hide it again.

I'm still wrapping my brain around all the ways jQuery can select and
extend the selection; can't figure this one out.

Thanks,
Rob



Hi Rob,

maybe something like this:

$('select').change(function(){
if ( $('[EMAIL PROTECTED]' + this.value + ']').not(this).length )
{
$('.formTip').show();
}
else
{
$('.formTip').hide();
}
});

Cheers,
/rw


[jQuery] Re: Small Interface website update

2007-04-06 Thread Marshall Salinger


Rey Bango wrote:


Agreed. Interface is EXTREMELY important to the jQuery project. More 
so than any 3rd party library. Keep up the great work Stefan & Paul!


Rey...

Jeffrey Kretz wrote:

This is FANTASTIC!

I was worried that with Ext you might not want to continue 
development.  I
personally prefer Interface, and my project would suffer greatly 
without it.


Thanks for your continued work on this project.
JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Friday, April 06, 2007 12:50 AM
To: jQuery (English)
Subject: [jQuery] Small Interface website update


Hi guys,

Long time no see.

http://interface.eyecon.ro/dependencies useful to check dependencies .

Starting next week I will have some free time again and me and Paul
will continue working on Interface 2. I hope this month we will
release it.

Take care.





I hate to flood the list with kudos, but seeing the capabilities of 
Interface was a huge factor for me when I decided to start using jQuery. 
I am still in awe over that screencast that was posted here. I look 
forward to Interface 2.0! Thanks Stefan and Paul.




[jQuery] Re: Small Interface website update

2007-04-06 Thread Rey Bango


Agreed. Interface is EXTREMELY important to the jQuery project. More so 
than any 3rd party library. Keep up the great work Stefan & Paul!


Rey...

Jeffrey Kretz wrote:

This is FANTASTIC!

I was worried that with Ext you might not want to continue development.  I
personally prefer Interface, and my project would suffer greatly without it.

Thanks for your continued work on this project.
JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Friday, April 06, 2007 12:50 AM
To: jQuery (English)
Subject: [jQuery] Small Interface website update


Hi guys,

Long time no see.

http://interface.eyecon.ro/dependencies useful to check dependencies .

Starting next week I will have some free time again and me and Paul
will continue working on Interface 2. I hope this month we will
release it.

Take care.





--
BrightLight Development, LLC.
954-775- (o)
954-600-2726 (c)
[EMAIL PROTECTED]
http://www.iambright.com


[jQuery] Re: jquery form plugin

2007-04-06 Thread Buzzterrier

Hi Mike,

Still new to all of this, but I used this:

$('#myAnchor').click(function() {
('#myForm').submit();
});

With the thought that the anchor would now fire the form's submit
event, which should be no different than a submit button. This seems
to work fine, but I am not an expert.

On Feb 19, 8:21 am, [EMAIL PROTECTED] (Mike Alsup) wrote:
> >  Thank you very much Mike, ill try that later. One last thing, if i want the
> > form to be submitted by an html link rather than a submit button how do i do
> > that ?
>
> Tim,
>
> That's a case when you would use ajaxSubmit instead of ajaxForm
> because you want to submit the form in response to the anchor's click
> event (instead of the form's submit event).
>
> $('#myAnchor').click(function() {
> ('#myForm').ajaxSubmit();
> return false;
>
> });
>
> In general, that's not a great idea because it won't degrade gracefully.
>
> Mike



[jQuery] Re: Permission denied to call method XMLHttpRequest.open

2007-04-06 Thread listreader


SnapShot wrote:

More important... is there a way around it that is transparent to the
reader of the site?



If you have access to server-side java/cgi/php whatever, you
can proxy the URL you want to load.  Look up "ajax proxy" for
a rundown of the issue.

--
paulw



[jQuery] table paging and sorting together

2007-04-06 Thread Paul
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] checking for multiple selects with the same value

2007-04-06 Thread RwL

I'd like to extend this simple function but don't know what to do
next:

$('select').change(function(){
$('.formTip').show();
});

What I really want this to do, is:

On the change event, check to see if any value of any  element
on the page matches the value of any other  on the page -- if
so, show .formTip. If they've made a change so that two values no
longer match, hide it again.

I'm still wrapping my brain around all the ways jQuery can select and
extend the selection; can't figure this one out.

Thanks,
Rob



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

2007-04-06 Thread Glen Lipka

Congratulatgions Karl!  I am pre-ordering.  (All the cool kids are doing
it.)
500 Pages!  I hope there are alot of pictures. :)

Exciting times.

Glen



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


Thanks for the plug, Rey! :-)

As you might have gathered from the URL (
http://www.packtpub.com/jQuery/book), the book is being published by PACKT
Publishing, based in Manchester, UK. They're a relative newcomer to the
publishing world, but already they've managed to put together a pretty
impressive group of books, many of which explore open-source software
projects.


Here is a little more detail on our book:


Full Title:
Learning jQuery: Better Interaction Design and Web Development with Simple
JavaScript Techniques
** Special thanks to Glen Lipka for his help with the subtitle!


Publication Date:
Expected July 2007

Cover Price:
$39.99


Pre-order Price:
$31.99 (20% discount)


Number of Pages:
The publisher's site says 250, but that was the initial estimate. It's
looking like it'll be closer to 500.


Working Outline:
  Part I: Introducing jQuery
1: Getting Started


  Part II: Exploring jQuery
2: Selectors, or How to Get Anything You Want
3: Events, or How to Pull the Trigger
4: Effects, or How to Add Flair to Your Actions
5: DOM Manipulation, or How to Change Your Page on Command
6: AJAX, or How to Make Your Site Buzzword Compliant


  Part III: Using jQuery
7: Table Manipulation
8: Forms with Function
9: Shufflers and Rotators


  Part IV: Examining jQuery
10: Selector Expressions
11: DOM Traversal Methods
12: DOM Manipulation Methods
13: Event Methods
14: Effect Methods
15: AJAX Methods
16: Miscellaneous Methods
17: Plug-ins


  Appendices
Appendix A: Online Resources
Appendix B: Development Tools
Appendix C: JavaScript Closures




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




 On Apr 6, 2007, at 11:14 AM, Rey Bango wrote:



I'm VERY proud to announce that the first jQuery book, Learning jQuery, is
now available for pre-order! jQuery Project Team member Karl Swedberg &
Jonathan Chaffer have produced a solid book that will get you up and running
with jQuery in no time.


To quote:


"This book begins with a tutorial to jQuery, followed by an examination of
common, real-world client-side problems, and solutions for each of them. A
detailed reference rounds off the book, making it an invaluable resource for
answers to all your jQuery questions."


I'm placing my order today and I recommend every serious jQuery developer
to pick this up.


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


Rey.///
--
BrightLight Development, LLC.
954-775- (o)
954-600-2726 (c)
[EMAIL PROTECTED]
http://www.iambright.com





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

2007-04-06 Thread Karl Swedberg

Thanks for the plug, Rey! :-)

As you might have gathered from the URL (http://www.packtpub.com/ 
jQuery/book), the book is being published by PACKT Publishing, based  
in Manchester, UK. They're a relative newcomer to the publishing  
world, but already they've managed to put together a pretty  
impressive group of books, many of which explore open-source software  
projects.


Here is a little more detail on our book:

Full Title:
	Learning jQuery: Better Interaction Design and Web Development with  
Simple JavaScript Techniques

** Special thanks to Glen Lipka for his help with the subtitle!

Publication Date:
Expected July 2007

Cover Price:
$39.99

Pre-order Price:
$31.99 (20% discount)

Number of Pages:
	The publisher's site says 250, but that was the initial estimate.  
It's looking like it'll be closer to 500.


Working Outline:
  Part I: Introducing jQuery
1: Getting Started

  Part II: Exploring jQuery
2: Selectors, or How to Get Anything You Want
3: Events, or How to Pull the Trigger
4: Effects, or How to Add Flair to Your Actions
5: DOM Manipulation, or How to Change Your Page on Command
6: AJAX, or How to Make Your Site Buzzword Compliant

  Part III: Using jQuery
7: Table Manipulation
8: Forms with Function
9: Shufflers and Rotators

  Part IV: Examining jQuery
10: Selector Expressions
11: DOM Traversal Methods
12: DOM Manipulation Methods
13: Event Methods
14: Effect Methods
15: AJAX Methods
16: Miscellaneous Methods
17: Plug-ins

  Appendices
Appendix A: Online Resources
Appendix B: Development Tools
Appendix C: JavaScript Closures


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



On Apr 6, 2007, at 11:14 AM, Rey Bango wrote:



I'm VERY proud to announce that the first jQuery book, Learning  
jQuery, is now available for pre-order! jQuery Project Team member  
Karl Swedberg & Jonathan Chaffer have produced a solid book that  
will get you up and running with jQuery in no time.


To quote:

"This book begins with a tutorial to jQuery, followed by an  
examination of common, real-world client-side problems, and  
solutions for each of them. A detailed reference rounds off the  
book, making it an invaluable resource for answers to all your  
jQuery questions."


I'm placing my order today and I recommend every serious jQuery  
developer to pick this up.


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

Rey.///
--
BrightLight Development, LLC.
954-775- (o)
954-600-2726 (c)
[EMAIL PROTECTED]
http://www.iambright.com




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

2007-04-06 Thread Aaron Heimlich

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

On 4/6/07, Rey Bango <[EMAIL PROTECTED]> wrote:



I'm VERY proud to announce that the first jQuery book, Learning jQuery,
is now available for pre-order! jQuery Project Team member Karl Swedberg
& Jonathan Chaffer have produced a solid book that will get you up and
running with jQuery in no time.

To quote:

"This book begins with a tutorial to jQuery, followed by an examination
of common, real-world client-side problems, and solutions for each of
them. A detailed reference rounds off the book, making it an invaluable
resource for answers to all your jQuery questions."

I'm placing my order today and I recommend every serious jQuery
developer to pick this up.

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

Rey.///
--
BrightLight Development, LLC.
954-775- (o)
954-600-2726 (c)
[EMAIL PROTECTED]
http://www.iambright.com





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


[jQuery] Re: toggle radio sets with a checkbox

2007-04-06 Thread phplord

thanks Glen,it works great

On Apr 6, 9:30 am, "Glen Lipka" <[EMAIL PROTECTED]> wrote:
> On 4/6/07, phpLord <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi;
>
> > I have been trying to enable/disable 4 group of radio sets by checking
> > and unchecking a checkbox.
>
> As a general rule of thumb, if you have a "for" loop, then you probably
> could find those things with a selector.
> Like
>
> $("[EMAIL PROTECTED],[EMAIL PROTECTED],").attr("disabled","disabled")
> Using the comma you can find the groups you want.
>
> But you really want to toggle.  So like:
>
> $("p").toggle(function(){
>   $("[EMAIL PROTECTED],[EMAIL PROTECTED],").attr("disabled","disabled")
>
> },function(){
>
>   $("[EMAIL PROTECTED],[EMAIL PROTECTED],").removeAttr("disabled")
>
> });
>
> Or something like that.
> Hope this helps a little.
>
> Glen



[jQuery] Permission denied to call method XMLHttpRequest.open

2007-04-06 Thread SnapShot

The exception 'Permission denied to call method XMLHttpRequest.open'
apparently gets thrown if you attempt to load content from JavaScript
from another domain.  Is this correct?

I'm trying to write a simple script to load an RSS feed to display on
my web site.  What I thought would be a 5 minute task using $.get() to
get the XML is turning into a major CF.  I know that this is not a
JQuery specific issue.

Is this exception new with FF2 and IE7?

More important... is there a way around it that is transparent to the
reader of the site?



[jQuery] Iterating over returned XML

2007-04-06 Thread Paul Caton


I wonder if someone can point me to a tutorial or some examples that 
show me how to do the following. I am querying an XML db with a jQuery 
form (copied from the official form plugin). The form data goes to a PHP 
handler which then sends a POST method request to the db; the db returns 
an XML fragment something like this (assuming I'm asking for all  
elements):



  apple 
  orange 
  banana 


I know the query is working OK, because if I don't specify the result 
type as XML I do see the correct content, ie:


apple orange banana


but what I want to do is get the XML, iterate over the  elements 
and wrap each one in some HTML of my choice, so that I can format the 
results nicely, add links, etc.


The form plugin page does show how to assign the text value of one 
result node to a variable, but as a newbie in Javascript I'm not sure 
how to extend this into looping through ALL the results (and at each 
pass through the loop, making the variable into the content of, say, a 
span). I have looked through the tutorials on the jQuery site, but could 
not find what I want. Is there a good example out there somewhere?


Thanks,

Paul Caton.



[jQuery] Re: toggle radio sets with a checkbox

2007-04-06 Thread Glen Lipka

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



Hi;

I have been trying to enable/disable 4 group of radio sets by checking
and unchecking a checkbox.




As a general rule of thumb, if you have a "for" loop, then you probably
could find those things with a selector.
Like

$("[EMAIL PROTECTED],[EMAIL PROTECTED],").attr("disabled","disabled")
Using the comma you can find the groups you want.

But you really want to toggle.  So like:

$("p").toggle(function(){
 $("[EMAIL PROTECTED],[EMAIL PROTECTED],").attr("disabled","disabled")

},function(){
 $("[EMAIL PROTECTED],[EMAIL PROTECTED],").removeAttr("disabled")

});

Or something like that.
Hope this helps a little.

Glen


[jQuery] Re: jQuery post with blockUI-plugin, no refresh...

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

phutte,

>Thanks Dan and Kristinn, happy coding.
>$.post acts like ajax? $.ajax the same way like $.post, but for XML?
>I only want to post it, and i thought i could have the message 'Remote
>call in progress...', only cause it looks nice. But OK, i have to
>settle for submitting not through jQuery. This was mostly for
>educational purpose, like most of my clumsy coding are... it's like my
>father doing the Crosswords all day long, i'm hooked into programming
>(autistic?).

$.post() is an AJAX operation. Also, you can still have the "Remote call in
progress..." type message if you want. If you look at the example I sent you
in the last page, you'll notice it's just a standard FORM post that displays
a message once you submit the form to the server.

-Dan



[jQuery] Re: Small Interface website update

2007-04-06 Thread Jeffrey Kretz

This is FANTASTIC!

I was worried that with Ext you might not want to continue development.  I
personally prefer Interface, and my project would suffer greatly without it.

Thanks for your continued work on this project.
JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Friday, April 06, 2007 12:50 AM
To: jQuery (English)
Subject: [jQuery] Small Interface website update


Hi guys,

Long time no see.

http://interface.eyecon.ro/dependencies useful to check dependencies .

Starting next week I will have some free time again and me and Paul
will continue working on Interface 2. I hope this month we will
release it.

Take care.




[jQuery] Re: dragging from an iframe?

2007-04-06 Thread Jeffrey Kretz

You are going to have problems with Internet Explorer on this one.

There are security issues with creating an element under one context and
moving it to another one.

Prior to 1.1.3, the following code would fail in IE:

$('Hello world').appendTo(iframe.contentWindow.document.body);

This is due to the fact that the div would be created under the parent
document context, and IE wouldn't allow node manipulation to the iframe
document.  (Since fixed in latest version of jQuery).

One solution would be to capture the drop event, and instead of using DOM
manipulation, duplicate the div element by creating a copy under the parent
document, then appending it to the drop zone, then removing it from the
iframe.

Note that this problem doesn't occur in FF/Opera/Safari, just IE.

JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Friday, April 06, 2007 6:49 AM
To: jQuery (English)
Subject: [jQuery] dragging from an iframe?


Hi,

How would I go about dragging a DIV from an iframe on my page to the
main page itself?  If anyone has any examples of how this is done, I
am most grateful.

Thanks, - Dave




[jQuery] Re: jQuery post with blockUI-plugin, no refresh...

2007-04-06 Thread phutte

Thanks Dan and Kristinn, happy coding.
$.post acts like ajax? $.ajax the same way like $.post, but for XML?
I only want to post it, and i thought i could have the message 'Remote
call in progress...', only cause it looks nice. But OK, i have to
settle for submitting not through jQuery. This was mostly for
educational purpose, like most of my clumsy coding are... it's like my
father doing the Crosswords all day long, i'm hooked into programming
(autistic?).

../Ha det gött allihopa!
END-OF-THREAD. maybe!?



[jQuery] toggle radio sets with a checkbox

2007-04-06 Thread phpLord


Hi;

I have been trying to enable/disable 4 group of radio sets by checking 
and unchecking a checkbox.


My function is like below, what's wrong with that, or any suggestions 
for this?


var points=new Array("creativity","composition","aesthetic","technic");
   for (j in points )
   {
   var x=document.getElementsByName(points[j]);
   for (i=0;i<=x.length-1;i++ )
   {
   x[i].disabled = $("#nopoint").checked ? true : false;

   }   
   }   

Note: As you see,I am newbie in jQuery, ready for any type for 
suggestions, thanks...


[jQuery] Re: jQuery post with blockUI-plugin, no refresh...

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

phutte,

>A little testsite for any interested:
>http://socken.se/temporary.jquery.googlegroups/
>the files index.php + ./myexlauncher/secretmenu.php is probably the
>files of interest. There is no folders hidden in this temporary
>version, and no security what-so-ever, so please handle with care.
>Click on the strawberry for the blockUI-form, which is going to become
>an loginform (hopefully)
>../peace ya'll (<--hip hop)

If you really won't to "reload" the page, then just use a normal form post.
There's no reason to even use AJAX in this case.

Just do a normal form post and then use the following to remove the blockUI:

// add an event to run when the page unloads
$(window).unload(
function (){
// remove the UI block, so that pressing the BACK button
// will allow you to use the page again
$.unblockUI();
}
);

For what you're attempting to do, AJAX is overkill. 

For example of posting to a form that block's the UI and then unblocks the
UI when the next page is loaded, check out this example:

http://www.pengoworks.com/workshop/jquery_demo/ex6.1_blockui.cfm

This simulates a search that takes 5 seconds to respond (I think that's the
amount of time I wait before I return the page results.) 

-Dan



[jQuery] Re: ***DHSPAM*** [jQuery] Re: is child of...

2007-04-06 Thread Karl Swedberg

On Apr 6, 2007, at 8:53 AM, bmckenzie wrote:

 $("#someParent").children().index(someElement)  !=  -1 ;


Cool, Bruce!

you could also come at it from the other direction:

if ( $('#someChild').parent('someElement').length ) {
  //do something
};





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






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

2007-04-06 Thread Rey Bango


I'm VERY proud to announce that the first jQuery book, Learning jQuery, 
is now available for pre-order! jQuery Project Team member Karl Swedberg 
& Jonathan Chaffer have produced a solid book that will get you up and 
running with jQuery in no time.


To quote:

"This book begins with a tutorial to jQuery, followed by an examination 
of common, real-world client-side problems, and solutions for each of 
them. A detailed reference rounds off the book, making it an invaluable 
resource for answers to all your jQuery questions."


I'm placing my order today and I recommend every serious jQuery 
developer to pick this up.


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

Rey.///
--
BrightLight Development, LLC.
954-775- (o)
954-600-2726 (c)
[EMAIL PROTECTED]
http://www.iambright.com


[jQuery] Re: jQuery post with blockUI-plugin, no refresh...

2007-04-06 Thread Kristinn Sigmundsson


What I did on a page I was working on was just simply make a page
refresh after the ajax was finished, didn't really go with the whole
update thing, but the ajax call was still great so the page doesnt
need refreshing if I input a faulty password.

If this is ok then you could just do a
function(data) {
 if (data.indexOf("_ERROR_") == -1){
   window.location = window.location;
 } else {
  //display error info
 }
}

So if the loginpage returns a "_ERROR_" the page doesn't refresh.
I did it this way because it would be ALOT of changes everywhere, and
this way was just alot easier.

If you only want a admin menu or something, just load in the menu in
the callback
function(data) {
 if (data.indexOf("_ERROR_") == -1){
   $("adminmenu").load("the_admin_controls.php");
 } else {
  //display error info
 }
}

Just make sure that the menu can't be loaded if the session isn't set
or whatever authentication you're using (SERVER-SIDE!).

Hope this helps you, oh and why I chose to do window.location =
window.location insted of window.refresh(), is just because some forms
don't submit with ajax, and if a visitor tried to login after
submiting a entry to the guestbook the entry would be resubmitted on a
successful login.

(btw, none of this is tested so there might be typos here and there,
but you get the idea)
// Kristinn
On 4/6/07, phutte <[EMAIL PROTECTED]> wrote:


..also, it looks like shit in Internet Explorer, please favor Firefox!




[jQuery] Re: Stop pending AJAX processes?

2007-04-06 Thread Andy Matthews
Kristinn...
 
I was already planning on checking to make sure the hidden div wasn't empty.
That's def on the list...no need to do the call twice.
 
And thanks for mentioning the parent() thing. I hate doing that, but I tried
a few other things like directly referencing a specific parent and it didn't
seem to work. I'll go back and try it again.
 
 
andy

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Kristinn Sigmundsson
Sent: Friday, April 06, 2007 9:51 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Stop pending AJAX processes?


I think I've seen something like this for stopping ajax calls:
var ajaxcall = $.ajax()
ajaxcall.abort();

As I said, I _think_ I've seen it, could be worth testing if it works.

As for calling all the ajax calls, maybe a .each() might do the work? 

and btw, I noticed that you are making the call everytime I click a button,
wouldn't it be better to check if it has already fetched the info and just
display it? Unless of course if its changing all the time, even then a
update button might be better. Using something like: 

if (childRow.html() == "")
do the call
else
   just slide it down

Instead of making a whole lot of .parent() you might want to do something
like .parents(".row").attr("id") 

Hope that some of my rambling makes any sense and helps you out :P

//Kristinn


On 4/6/07, Andy Matthews <  
[EMAIL PROTECTED]> wrote: 

First a small walk-through of what I've got now:
http://www.commadelimited.com/uploads/psychic 
 
Right now, if you click any of the black images, it triggers an AJAX call
which places it's response in a hidden div. That's easy enough and already
works. In an effort to make this work as speedily as possible, I'd like to
do following:
 
1) When ANY "session" first opens, every row that has more data (indicated
by the black image which has a class of "nav") should make it's associated
AJAX call and return it's information. I would like this to happen with no
action from the user.
 
2) If the user switches to a new accordion section, ideally I'd like to
cancel all pending AJAX calls, then trigger new calls for the current
accordion section.
 
So, that's my question...is this possible, and if so, how would I do it? The
thought is that the user will spend at least a few seconds looking at the
basic interface before clicking into any of the details. It would be awesome
if, when the user clicks any details image, that the data was already there
and the details would just slide open.
 
Anyone have any ideas how to accomplish this, if it's even possible?


 
Andy Matthews
Senior Coldfusion Developer

Office:  877.707.5467 x747
Direct:  615.627.9747
Fax:  615.467.6249
[EMAIL PROTECTED]
www.dealerskins.com  
 




dealerskinslogo.bmp
Description: Windows bitmap


[jQuery] Re: Stop pending AJAX processes?

2007-04-06 Thread Andy Matthews
Dan...
 
The catch is that I'm not loading "all" of the info at once. It's
technically still an on demand process. The user is initiating it by opening
an accordion section. There's quite a lot of code coming back and the whole
enchilada might take longer than we would like. So I think this is a good
middle ground. It's more proof of concept anyway but I'm interested to see
how it might work.

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dan G. Switzer, II
Sent: Friday, April 06, 2007 9:41 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Stop pending AJAX processes?



Andy,

 

If you want all the information to just be there, then include it in the
original HTML and just hide it. The core benefit you gain by loading content
"on demand" is you only send the data that's necessary. If you ended up
doing a bunch of AJAX calls to load all the data, all you've done is made
the code harder to manage and inundated your server with a bunch of requests
instead of one single request (remember, each AJAX call is a separate HTTP
request-depending on your page and the number of users you could really
flood your server w/requests.)

 

Also, there is no way to "stop" a request once it's started. Once you
initiate the HTTP request, the server will start processing it. You can stop
listening for the result you get back from the server, but the server is
still going to attempt to complete the request.

 

-Dan

 

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Andy Matthews
Sent: Friday, April 06, 2007 9:56 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Stop pending AJAX processes?

 

First a small walk-through of what I've got now:

http://www.commadelimited.com/uploads/psychic

 

Right now, if you click any of the black images, it triggers an AJAX call
which places it's response in a hidden div. That's easy enough and already
works. In an effort to make this work as speedily as possible, I'd like to
do following:

 

1) When ANY "session" first opens, every row that has more data (indicated
by the black image which has a class of "nav") should make it's associated
AJAX call and return it's information. I would like this to happen with no
action from the user.

 

2) If the user switches to a new accordion section, ideally I'd like to
cancel all pending AJAX calls, then trigger new calls for the current
accordion section.

 

So, that's my question...is this possible, and if so, how would I do it? The
thought is that the user will spend at least a few seconds looking at the
basic interface before clicking into any of the details. It would be awesome
if, when the user clicks any details image, that the data was already there
and the details would just slide open.

 

Anyone have any ideas how to accomplish this, if it's even possible?



 

Andy Matthews
Senior Coldfusion Developer

Office:  877.707.5467 x747
Direct:  615.627.9747
Fax:  615.467.6249

[EMAIL PROTECTED]
www.dealerskins.com  

 



image001.gif
Description: GIF image


[jQuery] Re: Stop pending AJAX processes?

2007-04-06 Thread Kristinn Sigmundsson

I think I've seen something like this for stopping ajax calls:
var ajaxcall = $.ajax()
ajaxcall.abort();

As I said, I _think_ I've seen it, could be worth testing if it works.

As for calling all the ajax calls, maybe a .each() might do the work?

and btw, I noticed that you are making the call everytime I click a button,
wouldn't it be better to check if it has already fetched the info and just
display it? Unless of course if its changing all the time, even then a
update button might be better. Using something like:

if (childRow.html() == "")
   do the call
else
  just slide it down

Instead of making a whole lot of .parent() you might want to do something
like .parents(".row").attr("id")

Hope that some of my rambling makes any sense and helps you out :P

//Kristinn

On 4/6/07, Andy Matthews <[EMAIL PROTECTED]> wrote:


 First a small walk-through of what I've got now:
http://www.commadelimited.com/uploads/psychic

Right now, if you click any of the black images, it triggers an AJAX call
which places it's response in a hidden div. That's easy enough and already
works. In an effort to make this work as speedily as possible, I'd like to
do following:

1) When ANY "session" first opens, every row that has more data (indicated
by the black image which has a class of "nav") should make it's associated
AJAX call and return it's information. I would like this to happen with no
action from the user.

2) If the user switches to a new accordion section, ideally I'd like to
cancel all pending AJAX calls, then trigger new calls for the current
accordion section.

So, that's my question...is this possible, and if so, how would I do it?
The thought is that the user will spend at least a few seconds looking at
the basic interface before clicking into any of the details. It would be
awesome if, when the user clicks any details image, that the data was
already there and the details would just slide open.

Anyone have any ideas how to accomplish this, if it's even possible?
* 

Andy Matthews
*Senior Coldfusion Developer

Office:  877.707.5467 x747
Direct:  615.627.9747
Fax:  615.467.6249
[EMAIL PROTECTED]
www.dealerskins.com





[jQuery] Re: UNfocus() ?

2007-04-06 Thread Kenneth

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



I was only suggesting a small simplification of your code.




Ok, I gotcha now. Thanks Jörn!


[jQuery] Re: Stop pending AJAX processes?

2007-04-06 Thread Dan G. Switzer, II
Andy,

 

If you want all the information to just be there, then include it in the
original HTML and just hide it. The core benefit you gain by loading content
"on demand" is you only send the data that's necessary. If you ended up
doing a bunch of AJAX calls to load all the data, all you've done is made
the code harder to manage and inundated your server with a bunch of requests
instead of one single request (remember, each AJAX call is a separate HTTP
request-depending on your page and the number of users you could really
flood your server w/requests.)

 

Also, there is no way to "stop" a request once it's started. Once you
initiate the HTTP request, the server will start processing it. You can stop
listening for the result you get back from the server, but the server is
still going to attempt to complete the request.

 

-Dan

 

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Andy Matthews
Sent: Friday, April 06, 2007 9:56 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Stop pending AJAX processes?

 

First a small walk-through of what I've got now:

http://www.commadelimited.com/uploads/psychic

 

Right now, if you click any of the black images, it triggers an AJAX call
which places it's response in a hidden div. That's easy enough and already
works. In an effort to make this work as speedily as possible, I'd like to
do following:

 

1) When ANY "session" first opens, every row that has more data (indicated
by the black image which has a class of "nav") should make it's associated
AJAX call and return it's information. I would like this to happen with no
action from the user.

 

2) If the user switches to a new accordion section, ideally I'd like to
cancel all pending AJAX calls, then trigger new calls for the current
accordion section.

 

So, that's my question...is this possible, and if so, how would I do it? The
thought is that the user will spend at least a few seconds looking at the
basic interface before clicking into any of the details. It would be awesome
if, when the user clicks any details image, that the data was already there
and the details would just slide open.

 

Anyone have any ideas how to accomplish this, if it's even possible?



 

Andy Matthews
Senior Coldfusion Developer

Office:  877.707.5467 x747
Direct:  615.627.9747
Fax:  615.467.6249

[EMAIL PROTECTED]
www.dealerskins.com  

 



image001.gif
Description: GIF image


[jQuery] Re: jQuery post with blockUI-plugin, no refresh...

2007-04-06 Thread phutte

..also, it looks like shit in Internet Explorer, please favor Firefox!



[jQuery] Re: jQuery post with blockUI-plugin, no refresh...

2007-04-06 Thread phutte

A little testsite for any interested: 
http://socken.se/temporary.jquery.googlegroups/
the files index.php + ./myexlauncher/secretmenu.php is probably the
files of interest. There is no folders hidden in this temporary
version, and no security what-so-ever, so please handle with care.
Click on the strawberry for the blockUI-form, which is going to become
an loginform (hopefully)
../peace ya'll (<--hip hop)



[jQuery] Re: xpath question

2007-04-06 Thread Benjamin Sterling

Thanks Jörn.

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



Benjamin Sterling schrieb:
> right now I am doing something like:
>
>
$('/modules/module:eq('+currentModule+')/groups/group:eq('+currentGroup+')')
>
> And that is working, should I change that to something like:
>
>
$('/modules/module:nth-child('+currentModule+')/groups/group:nth-child('+currentGroup+')')
>
>
> What would be the difference if you don't mind explaining?
You should stick with your version until that feature is released. It
turned out that there was missing something, see
http://dev.jquery.com/ticket/995

--
Jörn Zaefferer

http://bassistance.de





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


[jQuery] Re: xpath question

2007-04-06 Thread Jörn Zaefferer


Benjamin Sterling schrieb:

right now I am doing something like:

$('/modules/module:eq('+currentModule+')/groups/group:eq('+currentGroup+')')

And that is working, should I change that to something like:

$('/modules/module:nth-child('+currentModule+')/groups/group:nth-child('+currentGroup+')') 



What would be the difference if you don't mind explaining?
You should stick with your version until that feature is released. It 
turned out that there was missing something, see 
http://dev.jquery.com/ticket/995


--
Jörn Zaefferer

http://bassistance.de



[jQuery] Re: UNfocus() ?

2007-04-06 Thread Jörn Zaefferer


Kenneth schrieb:
I don't think I understand. The code I originally posted will indeed 
add the .focus class to the element(s), however once focus is lost the 
.focus class remains.

I was only suggesting a small simplification of your code.

$inputs.focus(function(){
$(this).addClass('focus');
}).blur(function() {
$(this).removeClass('focus');
});

--
Jörn Zaefferer

http://bassistance.de



[jQuery] Re: problems with the starterkit

2007-04-06 Thread Jörn Zaefferer


John Resig schrieb:


$("#form").reset() should work if it is a correct form. (We attempt to
trigger the default event wherever possible.)

O wow, I just opened up the starterfile zip - it uses a
version of jQuery that's pre-dates jQuery 1.0! Yikes. No wonder the
code was acting strange for you.
Ooops, fixed! I've update both the startkit and the tutorial to reflect 
the change: The starterkit doesn't include jQuery itself nor plugins, so 
there is no risk of providing a slightly outdated version.


Let me know if anything doesn't work as expected.

--
Jörn Zaefferer

http://bassistance.de



[jQuery] Re: Small Interface website update

2007-04-06 Thread Rey Bango


Excellent work Stefan! This was a much needed feature and extremely helpful.

I can't wait to see how Interface 2 turns out! I'm sure its going to be 
awesome and I especially like the fact that we continue to have a nice, 
tight & lightweight library for our effects and UI controls. Excellent!


Rey...

[EMAIL PROTECTED] wrote:

Hi guys,

Long time no see.

http://interface.eyecon.ro/dependencies useful to check dependencies .

Starting next week I will have some free time again and me and Paul
will continue working on Interface 2. I hope this month we will
release it.

Take care.




--
BrightLight Development, LLC.
954-775- (o)
954-600-2726 (c)
[EMAIL PROTECTED]
http://www.iambright.com


[jQuery] Re: Using hoever() to highlight TR, but not thead? Works in FF but not IE.

2007-04-06 Thread Andy Matthews
That did the trick and only added two code elements. Thanks MichaL!

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of MichaL Sanger
Sent: Friday, April 06, 2007 8:44 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Using hoever() to highlight TR, but not thead? Works
in FF but not IE.


What about add tbody tag around table rows that are not in thead and then
make this selector:
$('#myTable tbody tr')

MichaL


2007/4/6, Andy Matthews <[EMAIL PROTECTED]>: 

I've got a table which looks like this:

 
  Name
  Position
  Salary
  Seniority
 
 
  aaron
  systems
  40,077
  4 months
 
 
  matt
  support
  44,184
  11 months
 
[[ lots more data goes here ]]

 
I have jQ code which looks like this:
$('#myTable tr').hover(function(){
$(this).addClass('on');
},function(){
$(this).removeClass('on');
});
 
The goal being to highlight only TR tags on hover. Firefox displays this
behavior perfectly, but IE also highlights the thead row (which I do not
want). Apparently IE considers the thead row to be a TR with extra built in
properties? Without adding any additional code to my table, is there a way
to filter out the thead row? I tried using a not('thead' but that didn't
seem to work, but maybe I had it in the wrong place?
 
Anyone have any ideas?


 
Andy Matthews
Senior Coldfusion Developer

Office:  877.707.5467 x747
Direct:  615.627.9747
Fax:  615.467.6249
[EMAIL PROTECTED]
www.dealerskins.com  
 




attf2f26.bmp
Description: Windows bitmap


[jQuery] Re: xpath question

2007-04-06 Thread Benjamin Sterling

right now I am doing something like:

$('/modules/module:eq('+currentModule+')/groups/group:eq('+currentGroup+')')

And that is working, should I change that to something like:

$('/modules/module:nth-child('+currentModule+')/groups/group:nth-child('+currentGroup+')')

What would be the difference if you don't mind explaining?


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


[jQuery] Re: Using hoever() to highlight TR, but not thead? Works in FF but not IE.

2007-04-06 Thread Andy Matthews
Oh...can you do that? That would make perfect sense. I just didn't want to
have to add a class to each TR unnecessarily.

  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of MichaL Sanger
Sent: Friday, April 06, 2007 8:44 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Using hoever() to highlight TR, but not thead? Works
in FF but not IE.


What about add tbody tag around table rows that are not in thead and then
make this selector:
$('#myTable tbody tr')

MichaL


2007/4/6, Andy Matthews <[EMAIL PROTECTED]>: 

I've got a table which looks like this:

 
  Name
  Position
  Salary
  Seniority
 
 
  aaron
  systems
  40,077
  4 months
 
 
  matt
  support
  44,184
  11 months
 
[[ lots more data goes here ]]

 
I have jQ code which looks like this:
$('#myTable tr').hover(function(){
$(this).addClass('on');
},function(){
$(this).removeClass('on');
});
 
The goal being to highlight only TR tags on hover. Firefox displays this
behavior perfectly, but IE also highlights the thead row (which I do not
want). Apparently IE considers the thead row to be a TR with extra built in
properties? Without adding any additional code to my table, is there a way
to filter out the thead row? I tried using a not('thead' but that didn't
seem to work, but maybe I had it in the wrong place?
 
Anyone have any ideas?


 
Andy Matthews
Senior Coldfusion Developer

Office:  877.707.5467 x747
Direct:  615.627.9747
Fax:  615.467.6249
[EMAIL PROTECTED]
www.dealerskins.com  
 




attf2f26.bmp
Description: Windows bitmap


[jQuery] Re: UNfocus() ?

2007-04-06 Thread Kenneth

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



Kenneth schrieb:
> Excuse me while I talk to myselfit looks like I could just use
> .blur(fn)nothing to see here, move along ;)
You don't even need that each call, focus does that for you.

--
Jörn Zaefferer

http://bassistance.de




I don't think I understand. The code I originally posted will indeed add the
.focus class to the element(s), however once focus is lost the .focus class
remains.


[jQuery] Re: jQuery post with blockUI-plugin, no refresh...

2007-04-06 Thread phutte

Dan the man!
If i understand you right, i have to 'DIV' the whole BODY so that the
whole page is updated? If i submit it without jQuery $.post, just
submitting it to the 'index.php?dir=hastbilder' (also the same
location where i'm at when submitting) as i have always submitted
forms before, and grabbing/handling the submitted vars through $_POST
in php before rendering the rest of the page, the script works just
fine.
But when submitting through jQuery $.post, it seems like (my temporary
alert()) recieves and handles the post just fine, but my page isn't
reloaded as it is during submission via .
So when submitting it to jQuery i have to .append or .insert the data
recieved to some #id?



[jQuery] Stop pending AJAX processes?

2007-04-06 Thread Andy Matthews
First a small walk-through of what I've got now:
http://www.commadelimited.com/uploads/psychic
 
Right now, if you click any of the black images, it triggers an AJAX call
which places it's response in a hidden div. That's easy enough and already
works. In an effort to make this work as speedily as possible, I'd like to
do following:
 
1) When ANY "session" first opens, every row that has more data (indicated
by the black image which has a class of "nav") should make it's associated
AJAX call and return it's information. I would like this to happen with no
action from the user.
 
2) If the user switches to a new accordion section, ideally I'd like to
cancel all pending AJAX calls, then trigger new calls for the current
accordion section.
 
So, that's my question...is this possible, and if so, how would I do it? The
thought is that the user will spend at least a few seconds looking at the
basic interface before clicking into any of the details. It would be awesome
if, when the user clicks any details image, that the data was already there
and the details would just slide open.
 
Anyone have any ideas how to accomplish this, if it's even possible?

 
Andy Matthews
Senior Coldfusion Developer

Office:  877.707.5467 x747
Direct:  615.627.9747
Fax:  615.467.6249
[EMAIL PROTECTED]
www.dealerskins.com  
 


dealerskinslogo.bmp
Description: Windows bitmap


[jQuery] dragging from an iframe?

2007-04-06 Thread [EMAIL PROTECTED]

Hi,

How would I go about dragging a DIV from an iframe on my page to the
main page itself?  If anyone has any examples of how this is done, I
am most grateful.

Thanks, - Dave



[jQuery] Re: Using hoever() to highlight TR, but not thead? Works in FF but not IE.

2007-04-06 Thread MichaL Sanger

What about add tbody tag around table rows that are not in thead and then
make this selector:
$('#myTable tbody tr')

MichaL

2007/4/6, Andy Matthews <[EMAIL PROTECTED]>:


 I've got a table which looks like this:

 
  Name
  Position
  Salary
  Seniority
 
 
  aaron
  systems
  40,077
  4 months
 
 
  matt
  support
  44,184
  11 months
 
[[ lots more data goes here ]]


I have jQ code which looks like this:
$('#myTable tr').hover(function(){
$(this).addClass('on');
},function(){
$(this).removeClass('on');
});

The goal being to highlight only TR tags on hover. Firefox displays this
behavior perfectly, but IE also highlights the thead row (which I do not
want). Apparently IE considers the thead row to be a TR with extra built in
properties? Without adding any additional code to my table, is there a way
to filter out the thead row? I tried using a not('thead' but that didn't
seem to work, but maybe I had it in the wrong place?

Anyone have any ideas?
* ***
*** *
*Andy Matthews
*Senior Coldfusion Developer

Office:  877.707.5467 x747
Direct:  615.627.9747
Fax:  615.467.6249
[EMAIL PROTECTED]
www.dealerskins.com





[jQuery] Re: Changing hidden form value based on select

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

Opus,

>I have a form that I'm building in Drupal, that takes user input and
>crafts a support request email. I'm using a drop down box to list
>types of software that a client would need support with. I'd like to
>pull the result of the select and put it into a hidden text field so I
>can tailor the subject line of the email so that all emails to our
>support center don't all look the same.

The Form Plug-in has a method called fieldValue() which you can you to grab
the value of the select element in an array. You can then use the val()
method to set the value of the hidden form field.

Form Plug-in
http://www.malsup.com/jquery/form/

val()
http://docs.jquery.com/DOM/Attributes#val.28_val_.29

Example:
var oSelectVal = $("select").fieldValue();
$("input:hidden").val(oSelectVal.join(","));

Then there's also the Field Plug-in I'm working on:
http://pengoworks.com/workshop/jquery/field.plugin.htm

Example:
$("input:hidden").setValue( $("select").getValue() );

-Dan



  1   2   >