[jQuery] Re: Multiple Load Callback

2008-05-19 Thread Michael Geary

You can bundle up that logic in a clean way with code like this:

function multiLoad( arglist, callback ) {
var results = [], n = arglist.length;
$.each( arglist, function( i, arg ) {
$( arg[0] ).load( arg[1], arg[2], function() {
results[i] = arguments;
if( ! --n ) callback( results );
});
});
}

Call it like this (I assume your { VAR: var } objects are placeholders for
actual argument objects):

multiLoad(
[
[ '#div1', 'scripts/generateA.php', { VAR: var } ],
[ '#div2', 'scripts/generateB.php', { VAR: var } ],
[ '#div3', 'scripts/generateC.php', { VAR: var } ],
[ '#div4', 'scripts/generateD.php', { VAR: var } ]
],
function( results ) {
// all done - results is an array of the argument arrays
// from the original callbacks, in the same order as they
// are listed in this multiLoad call
}
);

That does a little more than you need, since you don't care about the
callback function arguments, but it only adds one line of code in
multiLoad() to support those arguments anyway.

This is untested code, but it's almost identical to working code I've used
for the same purpose in other situations - so barring typos it has a fair
chance of working.

-Mike

> -Original Message-
> From: jquery-en@googlegroups.com 
> [mailto:[EMAIL PROTECTED] On Behalf Of FreeKill
> Sent: Monday, May 19, 2008 2:07 PM
> To: jQuery (English)
> Subject: [jQuery] Re: Multiple Load Callback
> 
> 
> That would chain them all together though right, rather than 
> fire them all off at the same time?
> 
> I was thinking of doing something maybe like this...
> 
> var processesCompleted = 0;
> var processesTotal = 4;
> 
> $("#div1").load( "scripts/generateA.php", {VAR: var}, function( ) {
>  processesCompleted++;
>  performFinal( processesCompleted, processesTotal ); });
> 
> $("#div2").load( "scripts/generateB.php", {VAR: var}, function( ) {
>  processesCompleted++;
>  performFinal( processesCompleted, processesTotal ); });
> 
> etc etc
> 
> function performFinal( completed, total ) {
>  if( completed == total ) {
>  // Do Final Work
>  }
> }
> 
> I know it's kind of nasty, but I think it might work. It 
> would be nice if there was some kind of queue structure that 
> could be passed 4 calls and have a callback that waits for 
> all 4 to finish...
> 
> On May 19, 4:52 pm, "Alexandre Plennevaux" <[EMAIL PROTECTED]>
> wrote:
> > here is how i would try it, simply using the load() 
> function built-in 
> > callback parameter
> >
> > $("#div1").load( "scripts/generateA.php", {VAR: var} ,function(){ 
> > $("#div2").load( "scripts/generateB.php", {VAR: var}, function(){ 
> > $("#div3").load( "scripts/generateC.php", {VAR: var}, function(){ 
> > $("#div4").load( "scripts/generateD.php", {VAR: var} );
> >
> >
> >
> > } );
> > }
> >  );
> > });
> > On Mon, May 19, 2008 at 10:39 PM, FreeKill 
> <[EMAIL PROTECTED]> wrote:
> >
> > > Hi,
> >
> > > I'm thinking there is something I'm just overlooking, but I hope 
> > > someone can help...
> >
> > > I have a set of load calls that are each made at document load:
> >
> > > $("#div1").load( "scripts/generateA.php", {VAR: var} ); 
> > > $("#div2").load( "scripts/generateB.php", {VAR: var} ); 
> > > $("#div3").load( "scripts/generateC.php", {VAR: var} ); 
> > > $("#div4").load( "scripts/generateD.php", {VAR: var} );
> >
> > > What I want to do is make a 5th load call, but only once the 
> > > previous
> > > 4 are completed. Is there a way to wrap a block of calls in a way 
> > > that a Callback function is called when they call complete?
> >
> > > I can think of some other, less optimal ways of getting this 
> > > accomplished, but I'm hoping someone might know how to do 
> it the way 
> > > I've got it going now.
> >
> > > Any suggestions? Your help is appreciated...
> >
> > --
> > Alexandre Plennevaux
> > LAb[au]
> >
> > http://www.lab-au.com
> 



[jQuery] Re: OT: Firefox 3 RC1 for Mac

2008-05-19 Thread Klaus Hartl

To starting the profile manager, open terminal and enter:

/Applications/Firefox.app/Contents/MacOS/firefox -P

Or start with a profile immediately:

/Applications/Firefox.app/Contents/MacOS/firefox -P "firefox2"

Replace "Firefox.app" with what you called the bundle for FF2.

--Klaus


On May 19, 11:39 pm, Collin Allen <[EMAIL PROTECTED]> wrote:
> Firefox 2 and 3 can co-exist so long as their app bundles are in
> separate places (or even just named differently in the same place).
> For example, I have FF 2.0 in /Applications, and FF 3.0rc1 in ~/
> Applications/, my user's apps folder.  They share the same profile, so
> you'll be doing a lot of extension-update-checking between launches,
> but you might even be able to make a new profile for one or the other,
> then use the -P command line switch to force each to use separate
> profiles.  I'm not sure how to do that last bit on the Mac, though --
> should be in Mozilla documentation somewhere...
>
> HTH
>
> ~ Collin
>
> On May 19, 2:18 pm, Shelane <[EMAIL PROTECTED]> wrote:
>
> > Is there a way to install Firefox 3 RC1 without affecting FF2 on a
> > Mac.
>
> > The release notes have this message: Please note that installing
> > Firefox 3 will overwrite your existing installation of Firefox on Mac
> > OS X and Linux.
>
> > I'm guessing that's if you simply install it into the Applications
> > folder.  If I install it in another folder within the Applications
> > folder, will it be ok?  If it's using this same directory for it's
> > support files (~/Library/Application Support/Firefox) can it still
> > affect FF2?
>
> > I have to keep FF2 because it's the "officially" supported browser at
> > work.  But I would love to install FF3 to start testing on my apps.


[jQuery] Re: JQuery Tablesorter can't sort number in Coldfusion

2008-05-19 Thread Hamish Campbell
H... CF might be causing the problem, but you'll still be able to
see it in the generated code.

Can you compare the output with and without  - the
difference should give you a clue as to why it isn't working.

On May 19, 11:59 pm, Bettina <[EMAIL PROTECTED]> wrote:
> Hi
>
> Yeah of course. Here i posted a picture how the table looks 
> like:http://www.onebyte.ch/tablesorter.jpg
>
> But it must be a Problem with ColdFusion because wenn i leave the
>  away, and write the table and content by hand, the problem
> ist gone and its working. Its really weard.
>
> And the code from the site looks like this:
> http://192.168.88.5/
> OneTool4/site/scripte/tablesorter/themes/blue/style.css">
>
> http://192.168.88.5/OneTool4/site/
> scripte/tablesorter/jquery.tablesorter.js">
>
> 
> $(document).ready(function() {
>                 // extend the default setting to always include the zebra 
> widget.
>     $.tablesorter.defaults.widgets = ['zebra'];
>
>                 // extend the default setting to always sort on the second 
> column
>     $.tablesorter.defaults.sortList = [[3,1]];
>
>     $("table").tablesorter({
>         // pass the headers argument and assing a object
>         headers: {
>             // assign the fourth column (we start counting zero)
>             5: {
>                 // disable it by setting the property sorter to false
>                 sorter: false
>             }
>         }
>     });});
>
> 
>
> 
>
>         
>                 
>                          
>
>                         Datum
>
>                         Titel
>
>                         Gefahrene Kilometer
>
>                                 Kategorie
>
>                          
>
>                 
>         
>
>                 
>                                 
>                                         
>                                                          href="act_change_param.cfm?param=status&value=0&id=78"> src="../images/status_aktiv.gif" alt="aktiv, sichtbar" title="aktiv,
> sichtbar" border="0" />
>                                         
>
>                                         13.02.2008
>
>                                          href="index.cfm?incl=dsp_reise_auto_edit&edit=78">Superman
> 2
>
>                                         0
>
>                                         Schweiz
>
>                                         
>                                                  href="act_reise_auto_del.cfm?del=78"
> onClick="javascript:return confirm('Wollen Sie diesen Eintrag wirklich
> löschen?');" >
>                                                          src="../images/del.gif" width="17" height="20" border="0"
> alt="Eintrag löschen" title="Eintrag löschen">
>                                                 
>                                         
>
>                                 
>
>                                         
>                                                  href="act_change_param.cfm?param=status&value=0&id=85"> src="../images/status_aktiv.gif" alt="aktiv, sichtbar" title="aktiv,
> sichtbar" border="0" />
>                                         
>
>                                         01.01.2008
>
>                                         Abschiebsparty
>
>                                         0
>
>                                         Schweiz
>
>                                         
>                                                  href="act_reise_auto_del.cfm?del=85"
> onClick="javascript:return confirm('Wollen Sie diesen Eintrag wirklich
> löschen?');" >
>                                                          src="../images/del.gif" width="17" height="20" border="0"
> alt="Eintrag löschen" title="Eintrag löschen">
>                                                 
>                                         
>                                 
>
>                                 
>                                         
>                                                  href="act_change_param.cfm?param=status&value=0&id=87"> src="../images/status_aktiv.gif" alt="aktiv, sichtbar" title="aktiv,
> sichtbar" border="0" />
>                                         
>
>                                         24.04.2008
>
>                                          href="index.cfm?incl=dsp_reise_auto_edit&edit=87">Ahorn a>
>
>                                         0
>
>                                         Italien
>
>                                         
>                                                  href="act_reise_auto_del.cfm?del=87"
> onClick="javascript:return confirm('Wollen Sie diesen Eintrag wirklich
> löschen?');" >
>                                                          src="../images/del.gif" width="17" height="20" border="0"
> alt="Eintrag löschen" title="Eintrag löschen">
>                                                 
>                                         
>                                 
>
>        

[jQuery] Re: Fade out the whole page before loading next page

2008-05-19 Thread Hamish Campbell

You have to intercept clicks on links, store the href while the page
fades then redirect to that address:

$(document).ready(function(){
$('a').click(function() {
var target = $(this).attr('href');
$('body').fadeOut('slow', function() {
window.location = target;
});
return false
});
});

Tested IE7, seems to work fine :)

On May 20, 11:57 am, Anabelle <[EMAIL PROTECTED]> wrote:
> I need to add a simple effect to my website but I've been searching
> all afternoon with no luck, hope someone can help me.
>
> I need to add a Fade out effect to the entire page whe the user clicks
> a link leaving the current page.
>
> How can I do it?


[jQuery] Re: Multiple Load Callback

2008-05-19 Thread Hamish Campbell

If you use the 'data' object, you can keep this stuff attached to the
relevant objects and out of the global namespace.

On May 20, 9:07 am, FreeKill <[EMAIL PROTECTED]> wrote:
> That would chain them all together though right, rather than fire them
> all off at the same time?
>
> I was thinking of doing something maybe like this...
>
> var processesCompleted = 0;
> var processesTotal = 4;
>
> $("#div1").load( "scripts/generateA.php", {VAR: var}, function( ) {
>      processesCompleted++;
>      performFinal( processesCompleted, processesTotal );
>
> });
>
> $("#div2").load( "scripts/generateB.php", {VAR: var}, function( ) {
>      processesCompleted++;
>      performFinal( processesCompleted, processesTotal );
>
> });
>
> etc etc
>
> function performFinal( completed, total ) {
>      if( completed == total ) {
>          // Do Final Work
>      }
>
> }
>
> I know it's kind of nasty, but I think it might work. It would be nice
> if there was some kind of queue structure that could be passed 4 calls
> and have a callback that waits for all 4 to finish...
>
> On May 19, 4:52 pm, "Alexandre Plennevaux" <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > here is how i would try it, simply using the load() function built-in
> > callback parameter
>
> > $("#div1").load( "scripts/generateA.php", {VAR: var} ,function(){
> > $("#div2").load( "scripts/generateB.php", {VAR: var},
> > function(){
> > $("#div3").load( "scripts/generateC.php", {VAR: var}, function(){
> > $("#div4").load( "scripts/generateD.php", {VAR: var} );
>
> > } );
> > }
> >  );
> > });
> > On Mon, May 19, 2008 at 10:39 PM, FreeKill <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
>
> > > I'm thinking there is something I'm just overlooking, but I hope
> > > someone can help...
>
> > > I have a set of load calls that are each made at document load:
>
> > > $("#div1").load( "scripts/generateA.php", {VAR: var} );
> > > $("#div2").load( "scripts/generateB.php", {VAR: var} );
> > > $("#div3").load( "scripts/generateC.php", {VAR: var} );
> > > $("#div4").load( "scripts/generateD.php", {VAR: var} );
>
> > > What I want to do is make a 5th load call, but only once the previous
> > > 4 are completed. Is there a way to wrap a block of calls in a way that
> > > a Callback function is called when they call complete?
>
> > > I can think of some other, less optimal ways of getting this
> > > accomplished, but I'm hoping someone might know how to do it the way
> > > I've got it going now.
>
> > > Any suggestions? Your help is appreciated...
>
> > --
> > Alexandre Plennevaux
> > LAb[au]
>
> >http://www.lab-au.com- Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: Fake ajax load

2008-05-19 Thread hubbs

This looks interesting.  But the reason I need to use an iframe, is to
get a wysiwyg to work.  Wouldn't this defeat this purpose, as it is
still loading it through ajax?

On May 19, 8:45 pm, "Karl Rudd" <[EMAIL PROTECTED]> wrote:
> Try the frameready pluginhttp://ideamill.synaptrixgroup.com/?p=6
>
> Karl Rudd
>
> On Tue, May 20, 2008 at 1:32 PM, hubbs <[EMAIL PROTECTED]> wrote:
>
> > I need to load a page into an iframe, but I would like to have jquery
> > show a loading gif while the data is loading into the iframe.  Is it
> > possible, similar to loading ajax, that I can load the gif, only until
> > the page is loaded, then hide it?


[jQuery] Re: Fake ajax load

2008-05-19 Thread Karl Rudd

Try the frameready plugin http://ideamill.synaptrixgroup.com/?p=6

Karl Rudd

On Tue, May 20, 2008 at 1:32 PM, hubbs <[EMAIL PROTECTED]> wrote:
>
> I need to load a page into an iframe, but I would like to have jquery
> show a loading gif while the data is loading into the iframe.  Is it
> possible, similar to loading ajax, that I can load the gif, only until
> the page is loaded, then hide it?
>


[jQuery] Fake ajax load

2008-05-19 Thread hubbs

I need to load a page into an iframe, but I would like to have jquery
show a loading gif while the data is loading into the iframe.  Is it
possible, similar to loading ajax, that I can load the gif, only until
the page is loaded, then hide it?


[jQuery] jQuery Column Filters Plugin Help

2008-05-19 Thread hubbs

I just found the really great Column Filters Plugin:
http://plugins.jquery.com/project/ColumnFilters

Right now, you can only use it with tables, and, the tern you are
filter with, has to be the first thing within the , so, if you
wanted to use a  inside, or a link this won't work.  I am
interested in modifying it so that I can use it with lists, rather
than tables, and also allot other markup to be with in the  tag.
Has anyone used this plugin before?

Here is an example from the code, that I would like to modify:

function runFilters(event) {
$('input._filterText', obj).each(
function(iColCount) {
var wildCardPatt = new
RegExp(regexEscape(settings.wildCard),'g'),
sFilterTxt = 
(!settings.wildCard) ? regexEscape(this.value) :
regexEscape(this.value, settings.wildCard).replace(wildCardPatt,
'.*'),
bMatch = true;

if (settings.notCharacter &&
sFilterTxt.indexOf(regexEscape(settings.notCharacter)) === 0) {
sFilterTxt =
sFilterTxt.substr(regexEscape(settings.notCharacter).length,sFilterTxt.length);
if (sFilterTxt.length > 
0) { bMatch = false; }
}
if (sFilterTxt.length < 
settings.minSearchCharacters) {
sFilterTxt = '';
}
sFilterTxt = sFilterTxt || '.*';
sFilterTxt = '^' + sFilterTxt + 
'.*';

$('tbody:first tr', obj).each(
function() {
$('td', 
this).each(

function(iCellCount) {

if (iCellCount === iColCount) {

var filterPatt = (settings.caseSensitive) ? new
RegExp(sFilterTxt) : new RegExp(sFilterTxt,"i");


$(this).removeClass('_match');

if (filterPatt.test($(this).text()) === bMatch) {

$(this).addClass('_match');

}

}
}
);
}
);
}
);


[jQuery] Re: tooltip data?

2008-05-19 Thread Karl Swedberg


Hi Chris,

I just updated the clueTip plugin to allow you to display data from a  
javascript function (or a string). It's not in a packaged release yet,  
but you can grab the file from the svn here:


http://jqueryjs.googlecode.com/svn/trunk/plugins/cluetip/jquery.cluetip.js

So, now you can do something like this if you want:

$('a.mytooltip').cluetip('Hello. This will appear in the clueTip  
contents.');


And you can still include other options. For example:

$('a.mytooltip2').cluetip('Hello. This will appear in the clueTip  
contents.', {sticky: true});


And you can do something like this:

function moreStuff() {
return 'more stuff!';
}

$('a.mytooltip3').cluetip( moreStuff() );


My testing was pretty cursory, so if you run into any problems with  
it, let me know and I'll try to fix them asap.


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



On May 19, 2008, at 3:21 PM, Chris Hall wrote:



Does anyone know if a plugin exists that can display a tooltip from
information received via ajax or from the output of a javascript
function?

I see a few that use ajax but I'm unable to modify them to also
display tooltip data from a javascript function.

Many thanks for the help.




[jQuery] Re: Checking a radio button

2008-05-19 Thread Karl Rudd

Remember to be careful how you mix the various quotes ' and ". The
following should work.

$('#Demo[value="hello there"]').attr('checked', true);

Karl Rudd

On Tue, May 20, 2008 at 11:33 AM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
> I may have spoken a little too soon.  Karl, that was a great solution,
> but what if the part of the value clause has a space in it?  This
> isn't working for me ...
>
> $('#Demo[value=hello there]').attr('checked', true);
>
> nor is this ...
>
> $('#Demo[value="hello there"]').attr('checked', true);
>
> Any suggestions are greatly appreciated, - Dave
>
>
> On May 19, 7:56 pm, "Karl Rudd" <[EMAIL PROTECTED]> wrote:
>> Assuming the following:
>>
>>   
>>
>> The following will "check" the radio button:
>>
>>   $('#Demo').attr('checked', true);
>>
>> If you _really_ need to ONLY check the radio button if it's got an
>> id="Demo" AND value="hello":
>>
>>   $('#Demo[value=hello]')
>>
>> Karl Rudd
>>
>> On Tue, May 20, 2008 at 8:47 AM, [EMAIL PROTECTED]
>>
>>
>>
>> <[EMAIL PROTECTED]> wrote:
>>
>> > Hi,
>>
>> > When my page loads, I'd like to check a radio button whose ids are
>> > "Demo" and whose value is "hello".  How do I do this with JQuery?
>>
>> > Thanks, - Dave- Hide quoted text -
>>
>> - Show quoted text -
>


[jQuery] Re: Checking a radio button

2008-05-19 Thread [EMAIL PROTECTED]

I may have spoken a little too soon.  Karl, that was a great solution,
but what if the part of the value clause has a space in it?  This
isn't working for me ...

$('#Demo[value=hello there]').attr('checked', true);

nor is this ...

$('#Demo[value="hello there"]').attr('checked', true);

Any suggestions are greatly appreciated, - Dave


On May 19, 7:56 pm, "Karl Rudd" <[EMAIL PROTECTED]> wrote:
> Assuming the following:
>
>   
>
> The following will "check" the radio button:
>
>   $('#Demo').attr('checked', true);
>
> If you _really_ need to ONLY check the radio button if it's got an
> id="Demo" AND value="hello":
>
>   $('#Demo[value=hello]')
>
> Karl Rudd
>
> On Tue, May 20, 2008 at 8:47 AM, [EMAIL PROTECTED]
>
>
>
> <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > When my page loads, I'd like to check a radio button whose ids are
> > "Demo" and whose value is "hello".  How do I do this with JQuery?
>
> > Thanks, - Dave- Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: Checking a radio button

2008-05-19 Thread Karl Rudd

Just remember that you shouldn't have more than one element on the
page with the same id. For example is something that will cause
problems:





Karl Rudd

On Tue, May 20, 2008 at 11:16 AM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
> Thanks, Karl.  Your second solution was the one I was looking for. -
> Dave
>
> On May 19, 7:56 pm, "Karl Rudd" <[EMAIL PROTECTED]> wrote:
>> Assuming the following:
>>
>>   
>>
>> The following will "check" the radio button:
>>
>>   $('#Demo').attr('checked', true);
>>
>> If you _really_ need to ONLY check the radio button if it's got an
>> id="Demo" AND value="hello":
>>
>>   $('#Demo[value=hello]')
>>
>> Karl Rudd
>>
>> On Tue, May 20, 2008 at 8:47 AM, [EMAIL PROTECTED]
>>
>>
>>
>> <[EMAIL PROTECTED]> wrote:
>>
>> > Hi,
>>
>> > When my page loads, I'd like to check a radio button whose ids are
>> > "Demo" and whose value is "hello".  How do I do this with JQuery?
>>
>> > Thanks, - Dave- Hide quoted text -
>>
>> - Show quoted text -
>


[jQuery] Re: Checking a radio button

2008-05-19 Thread [EMAIL PROTECTED]

Thanks, Karl.  Your second solution was the one I was looking for. -
Dave

On May 19, 7:56 pm, "Karl Rudd" <[EMAIL PROTECTED]> wrote:
> Assuming the following:
>
>   
>
> The following will "check" the radio button:
>
>   $('#Demo').attr('checked', true);
>
> If you _really_ need to ONLY check the radio button if it's got an
> id="Demo" AND value="hello":
>
>   $('#Demo[value=hello]')
>
> Karl Rudd
>
> On Tue, May 20, 2008 at 8:47 AM, [EMAIL PROTECTED]
>
>
>
> <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > When my page loads, I'd like to check a radio button whose ids are
> > "Demo" and whose value is "hello".  How do I do this with JQuery?
>
> > Thanks, - Dave- Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: Checking a radio button

2008-05-19 Thread Karl Rudd

Assuming the following:

  

The following will "check" the radio button:

  $('#Demo').attr('checked', true);

If you _really_ need to ONLY check the radio button if it's got an
id="Demo" AND value="hello":

  $('#Demo[value=hello]')

Karl Rudd

On Tue, May 20, 2008 at 8:47 AM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> When my page loads, I'd like to check a radio button whose ids are
> "Demo" and whose value is "hello".  How do I do this with JQuery?
>
> Thanks, - Dave
>


[jQuery] Re: Checking a radio button

2008-05-19 Thread Jarques

Radio buttons can be checked by
document.getElementById("Demo").checked = true;

So I believe you can do the following on page load:

$check = document.getElementById("Demo");
if ($check.checked == true) {
   Do what you want to do here.
}

On May 19, 3:47 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> When my page loads, I'd like to check a radio button whose ids are
> "Demo" and whose value is "hello".  How do I do this with JQuery?
>
> Thanks, - Dave


[jQuery] Fade out the whole page before loading next page

2008-05-19 Thread Anabelle

I need to add a simple effect to my website but I've been searching
all afternoon with no luck, hope someone can help me.

I need to add a Fade out effect to the entire page whe the user clicks
a link leaving the current page.

How can I do it?


[jQuery] Re: submit although validation fails

2008-05-19 Thread juro

Ok, found the error. I had the validation before the ajaxForm - this
does not work.

On May 19, 10:15 pm, juro <[EMAIL PROTECTED]> wrote:
> Hi,
> I am still struggeling with the my problem with the form although the
> validation fails. I believe that this is because I have the action
> attribute defined in the form.
> Can this cause the form to be submitted although not validated?


[jQuery] JQuery issue with sessions

2008-05-19 Thread mjs

I have a PHP form in which a session variable is set when the form is
loaded.  I use the jquery form plugin to handle the submit button.  It
works great if I disable javascript and submit the form, but if it is
enabled, the session (and all variables set within it) is cleared.  I
looked for jquery code that may be closing the connection after the
submit, but did not find any and also searched the mailing list
archives with no success.

Any help would be greatly appreciated,
Steve


[jQuery] Re: Multiple Load Callback

2008-05-19 Thread FreeKill

That would chain them all together though right, rather than fire them
all off at the same time?

I was thinking of doing something maybe like this...

var processesCompleted = 0;
var processesTotal = 4;

$("#div1").load( "scripts/generateA.php", {VAR: var}, function( ) {
 processesCompleted++;
 performFinal( processesCompleted, processesTotal );
});

$("#div2").load( "scripts/generateB.php", {VAR: var}, function( ) {
 processesCompleted++;
 performFinal( processesCompleted, processesTotal );
});

etc etc

function performFinal( completed, total ) {
 if( completed == total ) {
 // Do Final Work
 }
}

I know it's kind of nasty, but I think it might work. It would be nice
if there was some kind of queue structure that could be passed 4 calls
and have a callback that waits for all 4 to finish...

On May 19, 4:52 pm, "Alexandre Plennevaux" <[EMAIL PROTECTED]>
wrote:
> here is how i would try it, simply using the load() function built-in
> callback parameter
>
> $("#div1").load( "scripts/generateA.php", {VAR: var} ,function(){
> $("#div2").load( "scripts/generateB.php", {VAR: var},
> function(){
> $("#div3").load( "scripts/generateC.php", {VAR: var}, function(){
> $("#div4").load( "scripts/generateD.php", {VAR: var} );
>
>
>
> } );
> }
>  );
> });
> On Mon, May 19, 2008 at 10:39 PM, FreeKill <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I'm thinking there is something I'm just overlooking, but I hope
> > someone can help...
>
> > I have a set of load calls that are each made at document load:
>
> > $("#div1").load( "scripts/generateA.php", {VAR: var} );
> > $("#div2").load( "scripts/generateB.php", {VAR: var} );
> > $("#div3").load( "scripts/generateC.php", {VAR: var} );
> > $("#div4").load( "scripts/generateD.php", {VAR: var} );
>
> > What I want to do is make a 5th load call, but only once the previous
> > 4 are completed. Is there a way to wrap a block of calls in a way that
> > a Callback function is called when they call complete?
>
> > I can think of some other, less optimal ways of getting this
> > accomplished, but I'm hoping someone might know how to do it the way
> > I've got it going now.
>
> > Any suggestions? Your help is appreciated...
>
> --
> Alexandre Plennevaux
> LAb[au]
>
> http://www.lab-au.com


[jQuery] Checking a radio button

2008-05-19 Thread [EMAIL PROTECTED]

Hi,

When my page loads, I'd like to check a radio button whose ids are
"Demo" and whose value is "hello".  How do I do this with JQuery?

Thanks, - Dave


[jQuery] Re: add a link after page load?

2008-05-19 Thread thekman

sorry, that last bit of code has
append not add in the line below.
however i'm still stuck, the link does nothing when clicked on until a
page reload...

$('#hiddenleft').append(''+boxName+'');



On May 19, 11:07 pm, thekman <[EMAIL PROTECTED]> wrote:
> Hi all,
> I am trying to add links to a div when another div is clicked.
> The links get added fine, but they do not work when clicked. However i
> am also saving the value to a cookie & display them on page refresh,
> at this stage they do work as expected.
> Any ideas on how I can get the links to work just after they are added
> to the div without a page refresh. Code used below.
>
> $('.closeleft').click(function() {
>   var $this = $(this);
>   var boxName = $this.parents(".leftBoxContainer").attr("id");
>   $(this).parents(".leftBoxContainer").hide();
>
> $.cookieJar('leftBoxClosed').set($this.parents(".leftBoxContainer").attr("id"),
> 'hidden');
>   $('#hiddencontent').show();
>   $('#hiddenleft').add(''+boxName+' a>');
>   return false;
>
> });


[jQuery] Re: resetForm() behaviour in IE differs from FF and Opera regarding hidden fields

2008-05-19 Thread Mike

> Using jQuery 1.2.3 and the form plugin 2.08 (I'm pretty sure 2.10 will
> behave the same way), I notice that under IE (6 and 7), resetForm()
> reset every field with their initial state including hidden fields.
> Under FF 2.0.0.14 and opera 9.27 & 9.5 the hidden fields aren't reset.
>
> Is it a bug or a feature ? Maybe it's a behaviour from the navigator
> which differ one from another, but I think the form plugin should
> abstract this to make it consistent.

Interesting, I never noticed that before.  If you look at the plugin
code it doesn't really do anything interesting other than call the
native reset method on the form object.  It's not saving off the
original values anywhere.  So the behavior you get is the same as that
of the native reset button.  Bug or feature?  I don't know.


[jQuery] Re: bind click event equal to mouseover

2008-05-19 Thread Wizzud

One way is to make the LI's mouseover add a class, the mouseout remove
that class, then set css to do what you want to the A element...

$('li').hover( function(){ $(this).addClass('x') }
   , function(){ $(this).removeClass('x') } );

style...
li.x a {color:#ff9900;}

On May 19, 1:34 pm, paragasu <[EMAIL PROTECTED]> wrote:
> is it possible i make one event equal to another event
> for example, if i put a mouseover on a  tags. automaticly,
> the a mouseover activated?
>
> so if i have a tags like link here 
> the link will be highlighted regardless of user put a mouserover on a
> tags or li tags?


[jQuery] add a link after page load?

2008-05-19 Thread thekman

Hi all,
I am trying to add links to a div when another div is clicked.
The links get added fine, but they do not work when clicked. However i
am also saving the value to a cookie & display them on page refresh,
at this stage they do work as expected.
Any ideas on how I can get the links to work just after they are added
to the div without a page refresh. Code used below.

$('.closeleft').click(function() {
  var $this = $(this);
  var boxName = $this.parents(".leftBoxContainer").attr("id");
  $(this).parents(".leftBoxContainer").hide();
 
$.cookieJar('leftBoxClosed').set($this.parents(".leftBoxContainer").attr("id"),
'hidden');
  $('#hiddencontent').show();
  $('#hiddenleft').add(''+boxName+'');
  return false;
});


[jQuery] Re: jqDock can embed flash/video object?

2008-05-19 Thread Wizzud

Not at present ... and to be honest it hasn't been considered.

On May 19, 4:53 am, Davis <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Beside img object, is it possible to embed a flash/video object? eg
> swf or youtube video ?
>
> Thanks/Davis.


[jQuery] Re: [validate] submit although validation fails

2008-05-19 Thread Jörn Zaefferer

If the form is submitted then most likely some error occurs during
validation which prevents the submit to be prevented.

You can set the debug-option to true to always prevent the form submit.

Otherwise: Please post a testpage.

Jörn

On Mon, May 19, 2008 at 10:15 PM, juro <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I am still struggeling with the my problem with the form although the
> validation fails. I believe that this is because I have the action
> attribute defined in the form.
> Can this cause the form to be submitted although not validated?
>


[jQuery] Re: Tooltip IE area map Patch

2008-05-19 Thread Jörn Zaefferer

I think I finally found a fix for the issue. Please give the latest
revision a try: http://dev.jquery.com/view/trunk/plugins/tooltip/

Once I got a confirmation that the issue is really gone, I'll create a
new release.

Jörn

On Mon, May 19, 2008 at 4:21 AM, ferdjuan <[EMAIL PROTECTED]> wrote:
>
> I see there's a patch to get IE to work with tooltip and an image map
> area, does anyone know how to implement it? When i ran into this
> problem I tried using cluetip instead but I had problems with it's
> ajax features, and also it didn't have the iePNGfix like tooltip does,
> anyone use tooltip in IE?
>


[jQuery] Re: Release: jQuery Validation plugin 1.3

2008-05-19 Thread Jörn Zaefferer

Okay, that won't work as focusInvalid gets the wrong state when called
via success-option.

Its not a great solution, but could work better: Replace
validator.focusInvalid with $("#fteste").valid();
That validates the whole form and should trigger focusInvalid with the
appropiate state.

Jörn

On Mon, May 19, 2008 at 6:18 PM, Alexsandro_xpt <[EMAIL PROTECTED]> wrote:
>
> Hi Jörn Zaefferer
>
> I'm again..
>
> Take a look
> http://blog.alexsandro.com.br/aa.htm
>
> I do it what you tell me but, It dont work, I dont know what more I
> do.
>
> validator.focusInvalid() like's, dont fire very well.
>
> What more do?
>
>
> Thanks in advance
>
>
> On 13 maio, 14:26, "Jörn Zaefferer" <[EMAIL PROTECTED]>
> wrote:
>> Try this:
>>
>> var validator = $("#fteste").validate({
>>  rules:{
>>  T1:{ required: true, email:true },
>>  S1:{ required: true }
>>  }, messages:{
>>  T1: { required: "Enter a e-mail!", email: "Enter a valid e-mail!" },
>>  S1: { required: "Provide a text" }
>>  },
>>  errorPlacement:function(error, element){
>>  error.appendTo( $('> div>').appendTo(element.parent("p")) );
>>  },
>>  success: function() {
>>validator.focusInvalid();
>>console.log(validator);
>>  }
>>
>> });
>> On Tue, May 13, 2008 at 2:47 PM, Alexsandro_xpt <[EMAIL PROTECTED]> wrote:
>>
>> >  Hi Jörn Zaefferer,
>>
>> >  I again!
>>
>> >  I Try like you tell me, but don't work. take a look.
>>
>> >  $("#fteste").validate({
>> >   rules:{
>> >   T1:{ required: true, email:true },
>> >   S1:{ required: true }
>> >   }, messages:{
>> >   T1: { required: "Enter a e-mail!", email: "Enter a valid e-mail!" },
>> >   S1: { required: "Provide a text" }
>> >   },
>> >   errorPlacement:function(error, element){
>> >   error.appendTo( $('> >  div>').appendTo(element.parent("p")) );
>> >   },
>> >   success: function() {
>> > $("#fteste").focusInvalid();
>> > console.log(validator);
>> >   }
>> >  });
>>
>> >  And I tried put a console.log(validator); to trace sucess event but
>> >  event dont fire while enter valid e-mail on first input.
>>
>> >  Can you help me?
>>
>> >  Thz
>>
>> >  On 12 maio, 17:08, "Jörn Zaefferer" <[EMAIL PROTECTED]>
>> >  wrote:
>>
>> > > You could use the success-option, passing a callback, as a hook to
>> >  > trigger validator.focusInvalid(). Something like this:
>>
>> >  > var validator = $("...").validate({
>> >  >   // other options
>> >  >   ...,
>> >  >   success: function() {
>> >  > validator.focusInvalid();
>> >  >   }
>>
>> >  > });
>>
>> >  > Jörn
>>
>> > > On Mon, May 12, 2008 at 5:23 PM, Alexsandro_xpt <[EMAIL PROTECTED]> 
>> > > wrote:
>>
>> >  > >  Hi Jörn Zaefferer,
>>
>> >  > >  I try to use your plugin in this way, take a look:
>> >  > >  http://blog.alexsandro.com.br/aa.htm
>>
>> >  > >  And I try any way to validate inputs on cascate.
>>
>> >  > >  Eg.:
>> >  > >  open this urlhttp://blog.alexsandro.com.br/aa.htmclickin submit.
>>
>> >  > >  Look!, the ballon start on first input, but if you enter a valid e-
>> >  > >  mail on input, the ideal is the ballon jumps on the last textarea
>> >  > >  input automatic.
>> >  > >  Did you know?
>>
>> >  > >  Did have idea to fix it to handle in this way behavior?
>>
>> >  > >  Thz!
>>
>> >  > >  On 12 maio, 08:31, "Jörn Zaefferer" <[EMAIL PROTECTED]>
>> >  > >  wrote:
>>
>> >  > > > A new release of the validation plugin
>> >  > >  > (http://bassistance.de/jquery-plugins/jquery-plugin-validation/) is
>> >  > >  > done, now at version 1.3. This release adds five more localizations
>> >  > >  > and fixes a few bugs, eg. "asdf" is not a valid creditcard number
>> >  > >  > anymore.
>>
>> >  > >  > Major improvements went into validating a form without triggering 
>> > UI
>> >  > >  > feedback (http://dev.jquery.com/ticket/2215) and batch adding and
>> >  > >  > removing of rules.
>>
>> >  > >  > The complete list of changes:
>>
>> >  > >  > 
>> >  > >  > Fixed invalid-form event, now only triggered when form is 
>> > invalid
>> >  > >  > Added spanish (es), russian (ru), portuguese brazilian (ptbr),
>> >  > >  > turkish (tr), and polish (pl) localization
>> >  > >  > Added removeAttrs plugin to facilate adding and removing 
>> > multiple
>> >  > >  > attributes
>> >  > >  > Added groups option to display a single message for multiple
>> >  > >  > elements, via groups: { arbitraryGroupName: "fieldName1 
>> > fieldName2[,
>> >  > >  > fieldNameN" }
>> >  > >  > Enhanced rules() for adding and removing (static) rules:
>> >  > >  > rules("add", "method1[, methodN]"/{method1:param[, 
>> > method_n:param]})
>> >  > >  > and rules("remove"[, "method1[, method_n]") 
>> >  > >  > Enhanced rules-option, accepts space-seperated string-list of
>> >  > >  > methods, eg. {birthdate: "required date"}  
>> >  > >  > Fixed checkbox group validation with inline rules: As long as 
>> > the
>> >  > >  > rules are specified on the first element, the group is now properly
>> >  > >  > validated on click
>> >  > >  > Fixed #2473, ignoring all rules with an explicit 

[jQuery] Re: Easy way to filter and sort a list

2008-05-19 Thread hubbs

I need something that will filter a list that is already displayed.
So, if I had a list of 100 names, I would type in the input box, and
my list would start to be filtered from the list that is already
there, so that I can quickly see the item(s) that match what I typed.

On May 17, 1:55 am, Eric Ongerth <[EMAIL PROTECTED]> wrote:
> Have you looked athttp://plugins.jquery.com/project/autocompletex?
>
> On May 16, 11:09 pm, hubbs <[EMAIL PROTECTED]> wrote:
>
> > Would i use .filter() for this?
>
> > On May 16, 11:42 am, hubbs <[EMAIL PROTECTED]> wrote:
>
> > > I am looking for a way to easily filter, and short a list.  I found
> > > the tableFilter plugin, but it is an overkill for what I need, and I
> > > don't want to use tables.  I want to be able to filter a list of
> > > items, and also sort this list by ABC.  I love the idea of the
> > > filtering being linked to an input box, so when you start typing
> > > something, it will filter the list, find what you are looking for, and
> > > remove the rest.
>
> > > Any suggestions on what I could use?


[jQuery] Re: OT: Firefox 3 RC1 for Mac

2008-05-19 Thread Collin Allen

Firefox 2 and 3 can co-exist so long as their app bundles are in
separate places (or even just named differently in the same place).
For example, I have FF 2.0 in /Applications, and FF 3.0rc1 in ~/
Applications/, my user's apps folder.  They share the same profile, so
you'll be doing a lot of extension-update-checking between launches,
but you might even be able to make a new profile for one or the other,
then use the -P command line switch to force each to use separate
profiles.  I'm not sure how to do that last bit on the Mac, though --
should be in Mozilla documentation somewhere...

HTH

~ Collin


On May 19, 2:18 pm, Shelane <[EMAIL PROTECTED]> wrote:
> Is there a way to install Firefox 3 RC1 without affecting FF2 on a
> Mac.
>
> The release notes have this message: Please note that installing
> Firefox 3 will overwrite your existing installation of Firefox on Mac
> OS X and Linux.
>
> I'm guessing that's if you simply install it into the Applications
> folder.  If I install it in another folder within the Applications
> folder, will it be ok?  If it's using this same directory for it's
> support files (~/Library/Application Support/Firefox) can it still
> affect FF2?
>
> I have to keep FF2 because it's the "officially" supported browser at
> work.  But I would love to install FF3 to start testing on my apps.


[jQuery] Re: Tooltips

2008-05-19 Thread Jörn Zaefferer

Actually the code is already here:
http://dev.jquery.com/view/trunk/plugins/tooltip/jquery.formtip.js
with ugly css: 
http://dev.jquery.com/view/trunk/plugins/tooltip/jquery.formtip.css

Requires the delegate plugin:
http://dev.jquery.com/view/trunk/plugins/delegate/jquery.delegate.js

Jörn

On Mon, May 19, 2008 at 11:26 PM, Jörn Zaefferer
<[EMAIL PROTECTED]> wrote:
> I've have something similar as a plugin on a project. Its not polished
> at all, but already works with keyboard events (reacts to focus/blur
> instead of click).
>
> If interested, I'll upload the current version to give you a starting point.
>
> Jörn
>
> On Sun, May 18, 2008 at 11:37 AM, MartinS <[EMAIL PROTECTED]> wrote:
>>
>> Can jquery or a plugin do this:
>>
>> On http://www.ns.nl -> click on the inputfield next to 'station'. A
>> text balloon shows up and disappears when you click somewhere on the
>> page. It would be great if you could change the text in the balloon
>> for each input field.
>>
>>
>


[jQuery] Re: [AutoComplete]

2008-05-19 Thread Jörn Zaefferer

Rather undocumented: The formatItem-option can be used as a filter. If
it returns false for a value (instead of the formatted value), the
value isn't displayed.

Jörn

On Sun, May 18, 2008 at 9:36 PM, ChrisLongden <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I am using the brilliant autocomplete functionality available here
> (http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/)
>
> I am using the 'Multiple Birds (remote)' version from the demo. I
> can't see anything in the documentation about removing items that the
> user has already selected from the autocomplete list. Is this
> something I need to do manually, or is there a setting that I can
> tweak?
>
> Many thanks,
> Chris.
>


[jQuery] Re: Tooltips

2008-05-19 Thread Jörn Zaefferer

I've have something similar as a plugin on a project. Its not polished
at all, but already works with keyboard events (reacts to focus/blur
instead of click).

If interested, I'll upload the current version to give you a starting point.

Jörn

On Sun, May 18, 2008 at 11:37 AM, MartinS <[EMAIL PROTECTED]> wrote:
>
> Can jquery or a plugin do this:
>
> On http://www.ns.nl -> click on the inputfield next to 'station'. A
> text balloon shows up and disappears when you click somewhere on the
> page. It would be great if you could change the text in the balloon
> for each input field.
>
>


[jQuery] Re: Multiple Load Callback

2008-05-19 Thread Hamish Campbell

This has come up a few times - pretty sure there isn't a super clean
way of doing it, but I'd probably prefer something like this:

$("#div1").load( "scripts/generateA.php", {VAR: var}, checkLoaded );
$("#div2").load( "scripts/generateB.php", {VAR: var}, checkLoaded );
$("#div3").load( "scripts/generateC.php", {VAR: var}, checkLoaded );
$("#div4").load( "scripts/generateD.php", {VAR: var}, checkLoaded );

checkLoaded = function() {
   $(this).data(loaded: true);
   if ( $('#div1').data('loaded') && $('#div2').data('loaded') && ...
etc ) {
  // some final call.
   }
}

On May 20, 8:52 am, "Alexandre Plennevaux" <[EMAIL PROTECTED]>
wrote:
> here is how i would try it, simply using the load() function built-in
> callback parameter
>
> $("#div1").load( "scripts/generateA.php", {VAR: var} ,function(){
> $("#div2").load( "scripts/generateB.php", {VAR: var},
> function(){
> $("#div3").load( "scripts/generateC.php", {VAR: var}, function(){
> $("#div4").load( "scripts/generateD.php", {VAR: var} );
>
>
>
>
>
> } );
> }
>  );
> });
> On Mon, May 19, 2008 at 10:39 PM, FreeKill <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I'm thinking there is something I'm just overlooking, but I hope
> > someone can help...
>
> > I have a set of load calls that are each made at document load:
>
> > $("#div1").load( "scripts/generateA.php", {VAR: var} );
> > $("#div2").load( "scripts/generateB.php", {VAR: var} );
> > $("#div3").load( "scripts/generateC.php", {VAR: var} );
> > $("#div4").load( "scripts/generateD.php", {VAR: var} );
>
> > What I want to do is make a 5th load call, but only once the previous
> > 4 are completed. Is there a way to wrap a block of calls in a way that
> > a Callback function is called when they call complete?
>
> > I can think of some other, less optimal ways of getting this
> > accomplished, but I'm hoping someone might know how to do it the way
> > I've got it going now.
>
> > Any suggestions? Your help is appreciated...
>
> --
> Alexandre Plennevaux
> LAb[au]
>
> http://www.lab-au.com- Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: Modal overlay for specific page section

2008-05-19 Thread Alexandre Plennevaux
well Jake, even the greatest jquery plugins need real-world examples to
advocate their usefulness, so that other users like you can be aware of it.
If at all possible, return the favour, and make sure to send Mike a URL of
your real world use of his plugin can be found.

Cheers,

a.

On Mon, May 19, 2008 at 10:53 PM, Jake McGraw <[EMAIL PROTECTED]> wrote:

>
> Gawd, I am one lazy developer, Mike goes through the trouble of
> creating a well laid out site with plenty of tutorials and I totally
> miss "Element Blocking".
>
> Thanks Alexandre + Mike!
>
> - jake
>
> On Mon, May 19, 2008 at 4:49 PM, Alexandre Plennevaux
> <[EMAIL PROTECTED]> wrote:
> > sure jake, there is the excellent blockUI plugin
> >
> > http://www.malsup.com/jquery/block/
> >
> > On Mon, May 19, 2008 at 10:45 PM, Jake McGraw <[EMAIL PROTECTED]>
> wrote:
> >>
> >> Hello all,
> >>
> >> I'd like to know if a jQuery plugin exists that allows for creating a
> >> modal overlay for a specific element of a page (say a DIV). The
> >> overlay would completely cover the section and prevent click-throughs
> >> or any other interaction with the elements within the section. Note:
> >> I've seen the modal plugins that cover the entire screen, I need one
> >> that correctly positions and sizes itself for a given section (not the
> >> whole screen).
> >>
> >> - jake
> >
> >
> >
> > --
> > Alexandre Plennevaux
> > LAb[au]
> >
> > http://www.lab-au.com
>



-- 
Alexandre Plennevaux
LAb[au]

http://www.lab-au.com


[jQuery] Re: Modal overlay for specific page section

2008-05-19 Thread Jake McGraw

Gawd, I am one lazy developer, Mike goes through the trouble of
creating a well laid out site with plenty of tutorials and I totally
miss "Element Blocking".

Thanks Alexandre + Mike!

- jake

On Mon, May 19, 2008 at 4:49 PM, Alexandre Plennevaux
<[EMAIL PROTECTED]> wrote:
> sure jake, there is the excellent blockUI plugin
>
> http://www.malsup.com/jquery/block/
>
> On Mon, May 19, 2008 at 10:45 PM, Jake McGraw <[EMAIL PROTECTED]> wrote:
>>
>> Hello all,
>>
>> I'd like to know if a jQuery plugin exists that allows for creating a
>> modal overlay for a specific element of a page (say a DIV). The
>> overlay would completely cover the section and prevent click-throughs
>> or any other interaction with the elements within the section. Note:
>> I've seen the modal plugins that cover the entire screen, I need one
>> that correctly positions and sizes itself for a given section (not the
>> whole screen).
>>
>> - jake
>
>
>
> --
> Alexandre Plennevaux
> LAb[au]
>
> http://www.lab-au.com


[jQuery] Re: Multiple Load Callback

2008-05-19 Thread Alexandre Plennevaux
here is how i would try it, simply using the load() function built-in
callback parameter

$("#div1").load( "scripts/generateA.php", {VAR: var} ,function(){
$("#div2").load( "scripts/generateB.php", {VAR: var},
function(){
$("#div3").load( "scripts/generateC.php", {VAR: var}, function(){
$("#div4").load( "scripts/generateD.php", {VAR: var} );
} );
}
 );
});



On Mon, May 19, 2008 at 10:39 PM, FreeKill <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> I'm thinking there is something I'm just overlooking, but I hope
> someone can help...
>
> I have a set of load calls that are each made at document load:
>
> $("#div1").load( "scripts/generateA.php", {VAR: var} );
> $("#div2").load( "scripts/generateB.php", {VAR: var} );
> $("#div3").load( "scripts/generateC.php", {VAR: var} );
> $("#div4").load( "scripts/generateD.php", {VAR: var} );
>
> What I want to do is make a 5th load call, but only once the previous
> 4 are completed. Is there a way to wrap a block of calls in a way that
> a Callback function is called when they call complete?
>
> I can think of some other, less optimal ways of getting this
> accomplished, but I'm hoping someone might know how to do it the way
> I've got it going now.
>
> Any suggestions? Your help is appreciated...
>



-- 
Alexandre Plennevaux
LAb[au]

http://www.lab-au.com


[jQuery] Re: Modal overlay for specific page section

2008-05-19 Thread Alexandre Plennevaux
sure jake, there is the excellent blockUI plugin

http://www.malsup.com/jquery/block/

On Mon, May 19, 2008 at 10:45 PM, Jake McGraw <[EMAIL PROTECTED]> wrote:

>
> Hello all,
>
> I'd like to know if a jQuery plugin exists that allows for creating a
> modal overlay for a specific element of a page (say a DIV). The
> overlay would completely cover the section and prevent click-throughs
> or any other interaction with the elements within the section. Note:
> I've seen the modal plugins that cover the entire screen, I need one
> that correctly positions and sizes itself for a given section (not the
> whole screen).
>
> - jake
>



-- 
Alexandre Plennevaux
LAb[au]

http://www.lab-au.com


[jQuery] Multiple Load Callback

2008-05-19 Thread FreeKill

Hi,

I'm thinking there is something I'm just overlooking, but I hope
someone can help...

I have a set of load calls that are each made at document load:

$("#div1").load( "scripts/generateA.php", {VAR: var} );
$("#div2").load( "scripts/generateB.php", {VAR: var} );
$("#div3").load( "scripts/generateC.php", {VAR: var} );
$("#div4").load( "scripts/generateD.php", {VAR: var} );

What I want to do is make a 5th load call, but only once the previous
4 are completed. Is there a way to wrap a block of calls in a way that
a Callback function is called when they call complete?

I can think of some other, less optimal ways of getting this
accomplished, but I'm hoping someone might know how to do it the way
I've got it going now.

Any suggestions? Your help is appreciated...


[jQuery] Modal overlay for specific page section

2008-05-19 Thread Jake McGraw

Hello all,

I'd like to know if a jQuery plugin exists that allows for creating a
modal overlay for a specific element of a page (say a DIV). The
overlay would completely cover the section and prevent click-throughs
or any other interaction with the elements within the section. Note:
I've seen the modal plugins that cover the entire screen, I need one
that correctly positions and sizes itself for a given section (not the
whole screen).

- jake


[jQuery] [form plugin] resetForm() behaviour in IE differs from FF and Opera regarding hidden fields

2008-05-19 Thread Nicolas Tostin

Hi,
Using jQuery 1.2.3 and the form plugin 2.08 (I'm pretty sure 2.10 will
behave the same way), I notice that under IE (6 and 7), resetForm()
reset every field with their initial state including hidden fields.
Under FF 2.0.0.14 and opera 9.27 & 9.5 the hidden fields aren't reset.

Is it a bug or a feature ? Maybe it's a behaviour from the navigator
which differ one from another, but I think the form plugin should
abstract this to make it consistent.

Any thought ?


[jQuery] [validate] submit although validation fails

2008-05-19 Thread juro

Hi,
I am still struggeling with the my problem with the form although the
validation fails. I believe that this is because I have the action
attribute defined in the form.
Can this cause the form to be submitted although not validated?


[jQuery] Re: Autocomplete - is bgiframe required?

2008-05-19 Thread Jörn Zaefferer

Fixed in http://dev.jquery.com/changeset/5633

Jörn

On Mon, May 19, 2008 at 9:08 PM, Jörn Zaefferer
<[EMAIL PROTECTED]> wrote:
> Thanks for the ticket Aaron, gonna fix that asap.
>
> Jörn
>
> On Sat, May 17, 2008 at 4:24 PM, Aaron Barker <[EMAIL PROTECTED]> wrote:
>>
>> I just submitted a bug on this a few days ago, which also contains a
>> fix for it
>>
>> http://dev.jquery.com/ticket/2866
>>
>> Copied here for posterity
>>
>> Line 634 is currently:
>>
>> list.bgiframe();
>>
>> and should be
>>
>> if($.fn.bgIframe) list.bgiframe();
>>
>> On May 16, 12:28 pm, rolfsf <[EMAIL PROTECTED]> wrote:
>>> I'm getting a javascript error in Firefox (list.bgiframe is not a
>>> function) with the autocomplete plugin if I don't include bgiframe,
>>> but the documentation seems to imply that bgiframe is optional.
>>>
>>> Is bgiframe required?
>>
>


[jQuery] Re: OT: Firefox 3 RC1 for Mac

2008-05-19 Thread Jake McGraw

Check out http://ejohn.org/blog/sexy-firefox-3/

- jake

On Mon, May 19, 2008 at 4:18 PM, Shelane <[EMAIL PROTECTED]> wrote:
>
> Is there a way to install Firefox 3 RC1 without affecting FF2 on a
> Mac.
>
> The release notes have this message: Please note that installing
> Firefox 3 will overwrite your existing installation of Firefox on Mac
> OS X and Linux.
>
> I'm guessing that's if you simply install it into the Applications
> folder.  If I install it in another folder within the Applications
> folder, will it be ok?  If it's using this same directory for it's
> support files (~/Library/Application Support/Firefox) can it still
> affect FF2?
>
> I have to keep FF2 because it's the "officially" supported browser at
> work.  But I would love to install FF3 to start testing on my apps.
>


[jQuery] OT: Firefox 3 RC1 for Mac

2008-05-19 Thread Shelane

Is there a way to install Firefox 3 RC1 without affecting FF2 on a
Mac.

The release notes have this message: Please note that installing
Firefox 3 will overwrite your existing installation of Firefox on Mac
OS X and Linux.

I'm guessing that's if you simply install it into the Applications
folder.  If I install it in another folder within the Applications
folder, will it be ok?  If it's using this same directory for it's
support files (~/Library/Application Support/Firefox) can it still
affect FF2?

I have to keep FF2 because it's the "officially" supported browser at
work.  But I would love to install FF3 to start testing on my apps.


[jQuery] Re: submit event confusion

2008-05-19 Thread August Lilleaas

Thanks a lot mister, that event was exactly what I needed, everything
works smoothly now =)

On May 19, 7:01 pm, Mike <[EMAIL PROTECTED]> wrote:
> > > $(this).submit(function(){
> > >     $(this).find(":input.unclicked").each(function(){
> > >        this.value = "";
> > >     });
> > >     $.post(this.action, $(this).serialize());
> > >     return false; // <-- stop native browser submit
>
> > > });
>
> > Ah, didn't know you could post forms 'by hand' like that, thanks!
> > *reads the entire API 5 times*
>
> You can also do this using the form plugin if that's what your page is
> using now.  You just need to bind the 'form-pre-serialize' event.
> This page shows how to do that (view source):
>
> http://www.malsup.com/jquery/form/event-test.html
>
> Mike


[jQuery] atributes of picture.

2008-05-19 Thread [EMAIL PROTECTED]

Hi, I would like to know how to capture atributes of a picture using
jquery? (Atributes of picture and no of tag)
Atributes like width and height

Thanks...


[jQuery] Atribute of picutre

2008-05-19 Thread Bruno Eustáquio F. Andrade
Hi, I would like to know how to capture atributes of a picture using
jquery? (Atributes of picture no of tag)
Atributes like width and height..

Thanks


[jQuery] Atribute of picutre

2008-05-19 Thread [EMAIL PROTECTED]

Hi, I would like to know how to capture atributes of a picture using
jquery? (Atributes of picture no of tag)
Atributes like width and height..

Thanks


[jQuery] tooltip data?

2008-05-19 Thread Chris Hall

Does anyone know if a plugin exists that can display a tooltip from
information received via ajax or from the output of a javascript
function?

I see a few that use ajax but I'm unable to modify them to also
display tooltip data from a javascript function.

Many thanks for the help.


[jQuery] Re: jCarousel - Has anyone implemented link anchors?

2008-05-19 Thread Ariel Flesler

You can do that by combining LocalScroll[1] and SerialScroll[2]

[1]http://flesler.blogspot.com/2007/10/jquerylocalscroll-10.html
[2]http://flesler.blogspot.com/2008/02/jqueryserialscroll.html

Note that changing the address bar will scroll the window, unless the
id/name doesn't exist.

--
Ariel Flesler
http://flesler.blogspot.com

On 19 mayo, 13:42, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Hello
>
> I'd love to be able to link to specific pages in a slideshow using
> anchors?
>
> For example:
>  http://www.example.com/slideshow.html#3 - show third page
>
> Also, it would be great if the browser address bar reflected the slide
> being displayed.
>
> Has anyone implemented this?  I haven't found any in my searches which
> surprised me.
>
> cheers, Oliver


[jQuery] Re: Very basic animation of an image is jerky (not smooth). Am I doing something wrong?

2008-05-19 Thread ripple
FYI.
   
  Fails to execute in IE 6.
   
  

Ariel Barreiro <[EMAIL PROTECTED]> wrote:
  
I am new to jquery but an experience developer.

Here's the code actually running:

http://guilespi.dyndns.org/jquery/bounceimage/

CSS: http://guilespi.dyndns.org/jquery/bounceimage/bounce.css
JS: http://guilespi.dyndns.org/jquery/bounceimage/bounce.js

The first vector is generally very jerky. Sometimes it stops and then
jumps 40px at once. Is there anything I am missing. HTML, CSS and
javascript is very basic. Javascript has a bunch of math coding to
calculate the time needed for each vector so it appears to be the same
speed along each vector.

Thank you very much, I am new to jquery and I don't think this is a
problem of jquery, but rather something I am missing.

Thanks,
a.=


   

[jQuery] Re: Autocomplete - is bgiframe required?

2008-05-19 Thread Jörn Zaefferer

Thanks for the ticket Aaron, gonna fix that asap.

Jörn

On Sat, May 17, 2008 at 4:24 PM, Aaron Barker <[EMAIL PROTECTED]> wrote:
>
> I just submitted a bug on this a few days ago, which also contains a
> fix for it
>
> http://dev.jquery.com/ticket/2866
>
> Copied here for posterity
>
> Line 634 is currently:
>
> list.bgiframe();
>
> and should be
>
> if($.fn.bgIframe) list.bgiframe();
>
> On May 16, 12:28 pm, rolfsf <[EMAIL PROTECTED]> wrote:
>> I'm getting a javascript error in Firefox (list.bgiframe is not a
>> function) with the autocomplete plugin if I don't include bgiframe,
>> but the documentation seems to imply that bgiframe is optional.
>>
>> Is bgiframe required?
>


[jQuery] Re: jscrollPane scroll to can't find first element

2008-05-19 Thread pedalpete

Thanks Ariel,

I forgot to mention, but I had also tried the [0].scrollTo, and that
didn't work either.

I've also just tried
[code]
var firstList = $('#holder .list:first');
$("#holder").jScrollPane(function(response){
 
("#holder").scrollTo(firstList);
})
[/code]
 and with the [0].scrollTo, but no luck.

The scroll bar adjusts in size to fit the newly loaded ajax list, but
it doesn't go to the top. of that list.

On May 19, 8:05 am, Ariel Flesler <[EMAIL PROTECTED]> wrote:
> I THINK you need to do:
>
> $("#holder")[0].scrollTo(firstList);
>
> If you can't solve that part, you could check ScrollTo:
>  http://flesler.blogspot.com/2007/10/jqueryscrollto.html
>
> Cheers
>
> --
> Ariel Fleslerhttp://flesler.blogspot.com/
>
> On 18 mayo, 20:06, pedalpete <[EMAIL PROTECTED]> wrote:
>
> > Hey,
>
> > I'm using Kevin Luck's jScrollPane on an ajax retrieved list.
>
> > The first time I call the page, it works no problem, but when I reload
> > the ajax content, if the user has scrolled down, the scroll doesn't
> > return to the top.
>
> > I call the jScrollPane again on each ajax reload so that the scroller
> > adjusts to the length of content on the page.
> > But the scroller does not return to the top of the sroller.
>
> > So i've tried adding the .scrollTo function but can't seem to get that
> > to work.
>
> > I've tried .scrollTo(2) , thinking it would scroll to 2px from the
> > top.
> > I've also tried calling the first item in the returned list,  and
> > scrolling to that, but that isn't working either.
>
> > Any ideas?
>
> > [code]
> > var firstList = $(response+' .list:first');
> > $("#holder").jScrollPane(function(response){
> > 
> > ("#holder").scrollTo(firstList);
> > })
> > [/code];


[jQuery] Tablesorter plugin problems with zebra stripes

2008-05-19 Thread asle

Hi
The tablesorter 2.0 plugin is very nice and works great but I don´t
really get how the zebra widget works. I do not get alternate colors
on the table. I have a style for ".odd" and ".even" in CSS. I looked
at the demos and it seems that the TRs are assigned "odd" and "even"
but that does not happen for me. What am I missing? I try this:

$("#tablesorter-demo").tablesorter({10: { sorter: false}, widgets:
['zebra']});

/asle


[jQuery] Very basic animation of an image is jerky (not smooth). Am I doing something wrong?

2008-05-19 Thread Ariel Barreiro

I am new to jquery but an experience developer.

Here's the code actually running:

http://guilespi.dyndns.org/jquery/bounceimage/

CSS: http://guilespi.dyndns.org/jquery/bounceimage/bounce.css
JS: http://guilespi.dyndns.org/jquery/bounceimage/bounce.js

The first vector is generally very jerky. Sometimes it stops and then
jumps 40px at once. Is there anything I am missing. HTML, CSS and
javascript is very basic. Javascript has a bunch of math coding to
calculate the time needed for each vector so it appears to be the same
speed along each vector.

Thank you very much, I am new to jquery and I don't think this is a
problem of jquery, but rather something I am missing.

Thanks,
a.=


[jQuery] Re: cluetip plugin and IE6

2008-05-19 Thread Theodore Ni
Include the bgiframe plugin in your  section:

http://plugins.jquery.com/project/bgiframe

On Mon, May 19, 2008 at 2:13 PM, cfdvlpr <[EMAIL PROTECTED]> wrote:

>
> Has anyone else noticed that in IE6, select menus show up in front of
> the cluetip?  Is there a fix for this?
>



-- 
Ted


[jQuery] Re: Autocomplete - access to events

2008-05-19 Thread Jörn Zaefferer

Ok, that makes sense. Well, the same code is responsible for creating
and managing that list.

Optimizing that isn't trivial, as it wouldn't have much use when you
have a few autocompletes on one page where the data has no overlap.

Jörn

On Mon, May 19, 2008 at 8:22 PM, rolfsf <[EMAIL PROTECTED]> wrote:
>
> Thanks Jörn,
>
> I'll pass this info on...
>
> We tend to run into performance issues with this because we might
> typically get over 20 autocompletes on the same page, and they're
> pulling from a list of about a thousand items. A lot is happening on
> the page (in the background) so we look for ways to optimize whenever
> possible.
>
>
>
> On May 19, 11:03 am, "Jörn Zaefferer" <[EMAIL PROTECTED]>
> wrote:
>> None of that is trivial out-of-the-box. The last point sounds like an
>> optimization that isn't really necessary unless you experienced an
>> actual performance hit.
>>
>> The second one isn't too hard to implement: Take a look at the source,
>> around this 
>> line:http://dev.jquery.com/browser/trunk/plugins/autocomplete/jquery.autoc...
>> Thats where the list is created and where you'd need to check its
>> height and page position, and set a custom position relative to the
>> input.
>>
>> I'm not sure about the first one. The autocomplete reacts to the
>> keydown event 
>> (http://dev.jquery.com/browser/trunk/plugins/autocomplete/jquery.autoc...),
>> so if you need to override it: Bind a keypress event before the
>> autocomplete and prevent bubbling in case of a paste event - maybe
>> that isn't even necessary, as long as you change the content of the
>> field before the autocomplete-event-handler sees it.
>>
>> Regards
>> Jörn
>>
>> On Sat, May 17, 2008 at 12:33 AM, rolfsf <[EMAIL PROTECTED]> wrote:
>>
>> > One of our developers was working with the jquery Autocomplete plugin
>> > and asked about a couple things that I don't know of:
>>
>> > Is there a way to hook into the event that sets the value of the
>> > textbox?
>> > Basically what I need to do is override the method that sets the
>> > textbox value with one of our own that calls our copy/paste setValue
>> > method so the autocomplete plays nicely with copy/paste.
>>
>> > Also, is there a way to detect the bottom of the screen and reposition
>> > the list above the textbox?
>>
>> > Finally ;-) is it possible to have a single, list container called by
>> > multiple textboxes? I notice that autocomplete appears to create a new
>> > list for each instance. We have multiple autocompletes on the same
>> > page that all pull the exact same data. It would be sweet to have a
>> > div set up for that purpose on pageload and reuse it, like we do with
>> > many of our modal dialogs.
>>
>> > Thanks as always
>


[jQuery] Re: Autocomplete - access to events

2008-05-19 Thread rolfsf

Thanks Jörn,

I'll pass this info on...

We tend to run into performance issues with this because we might
typically get over 20 autocompletes on the same page, and they're
pulling from a list of about a thousand items. A lot is happening on
the page (in the background) so we look for ways to optimize whenever
possible.



On May 19, 11:03 am, "Jörn Zaefferer" <[EMAIL PROTECTED]>
wrote:
> None of that is trivial out-of-the-box. The last point sounds like an
> optimization that isn't really necessary unless you experienced an
> actual performance hit.
>
> The second one isn't too hard to implement: Take a look at the source,
> around this 
> line:http://dev.jquery.com/browser/trunk/plugins/autocomplete/jquery.autoc...
> Thats where the list is created and where you'd need to check its
> height and page position, and set a custom position relative to the
> input.
>
> I'm not sure about the first one. The autocomplete reacts to the
> keydown event 
> (http://dev.jquery.com/browser/trunk/plugins/autocomplete/jquery.autoc...),
> so if you need to override it: Bind a keypress event before the
> autocomplete and prevent bubbling in case of a paste event - maybe
> that isn't even necessary, as long as you change the content of the
> field before the autocomplete-event-handler sees it.
>
> Regards
> Jörn
>
> On Sat, May 17, 2008 at 12:33 AM, rolfsf <[EMAIL PROTECTED]> wrote:
>
> > One of our developers was working with the jquery Autocomplete plugin
> > and asked about a couple things that I don't know of:
>
> > Is there a way to hook into the event that sets the value of the
> > textbox?
> > Basically what I need to do is override the method that sets the
> > textbox value with one of our own that calls our copy/paste setValue
> > method so the autocomplete plays nicely with copy/paste.
>
> > Also, is there a way to detect the bottom of the screen and reposition
> > the list above the textbox?
>
> > Finally ;-) is it possible to have a single, list container called by
> > multiple textboxes? I notice that autocomplete appears to create a new
> > list for each instance. We have multiple autocompletes on the same
> > page that all pull the exact same data. It would be sweet to have a
> > div set up for that purpose on pageload and reuse it, like we do with
> > many of our modal dialogs.
>
> > Thanks as always


[jQuery] Re: I have a nice text accordion menu, but I just need a little assistance.

2008-05-19 Thread tegansnyder

Resolved.

What I had to do is:

jQuery('#theMenu').activate(0);
 jQuery('#xtraMenu').activate(0);

Activate the first top level first
Then activate the sublevel.

Thanks for your help.

On May 19, 11:58 am, ripple <[EMAIL PROTECTED]> wrote:
> Ok so your accordion's are being set on 3 seperate id's
>
>   #theMenu
>   #xtraMenu
>   #xtraMenu2
>
>   Did you try something like this?
>
>  jQuery('#xtraMenu').activate(0);
>
> tegansnyder <[EMAIL PROTECTED]> wrote:
>
> ripple,
>
> First I would like to say thanks for the quick response.
>
> I have tried your suggestions. It works for the top level menus
> perfectly, but I wanted to activate the sub-level - nested menus?
>
> On May 19, 11:42 am, ripple wrote:
>
> > Did you try?
>
> > jQuery('#theMenu').activate(0);
> > jQuery('#theMenu').activate(1);
>
> > Treat the accordions as elements in an array. 0 = 1st, 1 = 2nd etc...
>
> > tegansnyder wrote:
>
> > Hello Everyone,
>
> > I have a built a nice accordion style menu and need a little
> > assistance.
>
> > You can see it in action athttp://www.tegdesign.com/menu/
>
> > Currently I’m having it open the first element by placing the
> > following code in the jQuery ready function:
>
> > jQuery('#theMenu').activate(0);
>
> > What I want to be able to do is activate an element of a sublevel. For
> > instance say I wanted to have the (Commercial – Solutions) activate
> > and open to show all children in Solutions.
>
> > In the JS folder there is the accordion.js file. If you open it up it
> > does have a little documentation about this:
>
> > * Activate a content part of the Accordion programmatically at the
> > given zero-based index.
> > *
> > * If the index is not specified, it defaults to zero, if it is an
> > invalid index, eg. a string,
> > * nothing happens.
> > *
> > * @example jQuery('#accordion').activate(1);
> > * @desc Activate the second content of the Accordion contained in
> > .
> > *
> > * @example jQuery('#nav').activate();
> > * @desc Activate the first content of the Accordion contained in id="nav">.
> > *
> > * @param Number index (optional) An Integer specifying the zero-based
> > index of the content to be
> > *
> > activated. Default: 0
>
> > I also have a zip file containing all the needed 
> > files:http://www.tegdesign.com/menu/menu.zip
>
> > Just wanted to see if anyone could put a fresh pair of eyes on this.
> > Anything would be helpful.


[jQuery] cluetip plugin and IE6

2008-05-19 Thread cfdvlpr

Has anyone else noticed that in IE6, select menus show up in front of
the cluetip?  Is there a fix for this?


[jQuery] Re: Autocomplete - access to events

2008-05-19 Thread Jörn Zaefferer

None of that is trivial out-of-the-box. The last point sounds like an
optimization that isn't really necessary unless you experienced an
actual performance hit.

The second one isn't too hard to implement: Take a look at the source,
around this line:
http://dev.jquery.com/browser/trunk/plugins/autocomplete/jquery.autocomplete.js#L553
Thats where the list is created and where you'd need to check its
height and page position, and set a custom position relative to the
input.

I'm not sure about the first one. The autocomplete reacts to the
keydown event 
(http://dev.jquery.com/browser/trunk/plugins/autocomplete/jquery.autocomplete.js#L81),
so if you need to override it: Bind a keypress event before the
autocomplete and prevent bubbling in case of a paste event - maybe
that isn't even necessary, as long as you change the content of the
field before the autocomplete-event-handler sees it.

Regards
Jörn

On Sat, May 17, 2008 at 12:33 AM, rolfsf <[EMAIL PROTECTED]> wrote:
>
> One of our developers was working with the jquery Autocomplete plugin
> and asked about a couple things that I don't know of:
>
> Is there a way to hook into the event that sets the value of the
> textbox?
> Basically what I need to do is override the method that sets the
> textbox value with one of our own that calls our copy/paste setValue
> method so the autocomplete plays nicely with copy/paste.
>
> Also, is there a way to detect the bottom of the screen and reposition
> the list above the textbox?
>
> Finally ;-) is it possible to have a single, list container called by
> multiple textboxes? I notice that autocomplete appears to create a new
> list for each instance. We have multiple autocompletes on the same
> page that all pull the exact same data. It would be sweet to have a
> div set up for that purpose on pageload and reuse it, like we do with
> many of our modal dialogs.
>
> Thanks as always
>


[jQuery] Re: Validate Plugin - Message customization with metadata

2008-05-19 Thread Jörn Zaefferer

Just use "messages" for embedding messages as metadata. The odds of
adding a method "messages" are extremely low, and once its released,
I'll update the docs accordingly.

Jörn

On Fri, May 16, 2008 at 7:05 PM, Dane <[EMAIL PROTECTED]> wrote:
>
> -> "Avoiding the conflict between a method "messages" and those actual
> messages should be easy enough. "
>
> Should we plan on supporting a simulatanious "message" method and
> custom messages in metadata?
>
> As stated, I'm still climbing the learning curve :). Before I
> implement this I just want to make sure your not envisioning a better
> way. The strait forward check I'm planning on is to see if validator
> has any "message" methods defined, if it does it will treat "messages"
> in meta as a rule method, else it will treat it as a custom message
> object. This check, however, means a dev can't simultaneously have a
> method named "message" and still use custom messages  in metadata. A
> minor, but strange requirement. Is this ok?
>
> I was trying to figure out a way to compare the message object in meta
> to the "message" rule signature. If the method sig matches it will be
> treated as rule metadata, else custom message metadata. Don't know if
> we can guarantee repeatable results with that since rule method sigs
> can match the custom message object in rare cases. Leaving us with an
> even more rare, but stranger requirement.
>
> I'm probably missing something so i figured I'd just ask what you had
> in mind that was "easy enough".
>
> Thanks
>
>
>
> On May 16, 9:33 am, Dane <[EMAIL PROTECTED]> wrote:
>> Ah, agreed. I'll make these changes and send in a ticket.
>>
>> On May 15, 4:20 pm, "Jörn Zaefferer" <[EMAIL PROTECTED]>
>> wrote:
>>
>> > How about this?
>>
>> > meta: default
>> > class="{required:true,minlength:2,messages:{required:'Enter
>> > this!',minlength:'Way to short'}}"
>>
>> > meta: "validation"
>> > class="{validation:{required:true,minlength:2,messages:{required:'Enter
>> > this!',minlength:'Way to short'}}}"
>>
>> > No need to change the meta-option that way. The code reading the
>> > messages just checks for a messages-property within the metadata.
>> > Avoiding the conflict between a method "messages" and those actual
>> > messages should be easy enough.
>>
>> > Contributions are welcome in any format, a ticket on dev.jquery.com
>> > with a diff attached is the preferred way.
>>
>> > Jörn
>>
>> > On Thu, May 15, 2008 at 5:23 PM, Dane <[EMAIL PROTECTED]> wrote:
>>
>> > > Ok I have a first cut done. elements can now have metadata like:
>> > > 
>>
>> > > Quick question though. Which do you prefer?
>>
>> > > 1)$("#Form").validate({meta:"rules", metaMessages:"messages"});
>> > > 2)$("#Form").validate({meta:{rules:"rules", messages:"messages"}});
>>
>> > > I like 2, but it changes the existing API.
>>
>> > > How do you want the changes?
>>
>> > > On May 14, 1:04 pm, Dane <[EMAIL PROTECTED]> wrote:
>> > >> Thanks for the help on getting started. I'd already started wading
>> > >> through the source so you definitely saved me some time. I'm not
>> > >> totally comfortable with Jquery yet but I'm getting there :). I'll
>> > >> give this a go and see what happens. Should I just reply to this
>> > >> thread to contribute/ask questions? or is there a better way?
>>
>> > >> On May 14, 12:07 pm, "Jörn Zaefferer" <[EMAIL PROTECTED]>
>> > >> wrote:
>>
>> > >> > It isn'T supported, yet. You could help getting it into the plugin by
>> > >> > trying to implement it yourself, and contributing it back.
>>
>> > >> > To get started, take a look at the defaultMessage-method. Currently it
>> > >> > looks for custom messages specified via options, then for the title
>> > >> > attribute, then for default messages. You can access metadata via
>> > >> > $(element).metadata().
>> > >> > To be able to throw rules and messages together, you'd use the
>> > >> > meta-option to "namespace" rules, eg.
>> > >> > class="{rules:{required:true,email:true}, messages: {required:"yo",
>> > >> > email:"no"}", then $(...).validate({ meta: "rules" })
>>
>> > >> > Hope this helps to get started.
>>
>> > >> > Jörn
>>
>> > >> > On Wed, May 14, 2008 at 5:11 PM, Dane <[EMAIL PROTECTED]> wrote:
>>
>> > >> > >  Hi,
>>
>> > >> > >  I'm trying to build a web framework utilizing the great work thats
>> > >> > >  already been done on the validation plugin. I'm trying to use 
>> > >> > > metadata
>> > >> > >  to specify my rules. I'm having a problem overriding the default
>> > >> > >  messages for multiple rules via metadata. It appears as though I 
>> > >> > > can
>> > >> > >  only specify one generic message for all my rules on a given 
>> > >> > > element
>> > >> > >  using the title attribute.
>>
>> > >> > >  Is there a way use metadata to override error messages that I'm
>> > >> > >  overlooking? If not can this be added? Additionally, do we have to 
>> > >> > > be
>> > >> > >  restricted to using the title attribute? Could we use custom
>> > >> > >  attributes? It seems like a common sc

[jQuery] Re: second time jquery is included, kills previously called plugins

2008-05-19 Thread Shelane Enos

That was perfect.  Thanks.


On 5/19/08 8:00 AM, "Ariel Flesler" <[EMAIL PROTECTED]> wrote:

> 
> //include first
> 
> jQuery(function( $ ){
>// $ will be the first jQuery
>$('#bodyframe').corner('tr');
> });
> 
> // include second
> 
> You can also use jQuery.noConflict();
> 
> Cheers
> 
> --
> Ariel Flesler
> http://flesler.blogspot.com/
> 
> 
> On 19 mayo, 10:16, Jason Huck <[EMAIL PROTECTED]> wrote:
>> Well, it's easy to detect whether jQuery is loaded using plain
>> javascript, but once you've determined that it's not loaded, getting
>> it loaded in the correct order (particularly so that you can still use
>> document.ready()) gets tricky. You could create a custom version of
>> jquery.js that looks like this:
>> 
>> try{ jQuery } catch(err){ ...the rest of the jQuery code... }
>> 
>> That would partially solve your problem. Unfortunately, the browser
>> would still be loading multiple copies of the same script.
>> 
>> We use a server-side variable to register all the needed script paths,
>> and a separate routine includes them for us at the end of the page.
>> This way nothing gets duplicated. If you can't get the portal manager
>> to make any concessions for you, you might still be able to manage
>> this on the server side if you can control the order that your
>> portlets are loaded -- you'd just have to make sure a "utility
>> portlet" gets loaded as well. Far from elegant, but it might be your
>> best bet.
>> 
>> HTH,
>> Jason
>> 
>> On May 18, 11:17 pm, Shelane <[EMAIL PROTECTED]> wrote:
>> 
>> 
>> 
>>> Hey Jason,
>> 
>>> I thought it made sense too - the explanation of why it happens.
>> 
>>> Yes, it would be ideal if jquery were just added to the portal
>>> templates.  However, the developers don't have control over the portal
>>> templates.  They are strictly locked down, and there is no way the
>>> manager of the portal will put it in.  So we need to come up with
>>> another way of either dynamically adding the plugin, then using it, or
>>> detecting if jquery is already called before calling it again.  Of
>>> course, that last one would require that all developers do that, which
>>> may not happen.  It would be awesome if jquery itself would know that
>>> it's already been declared and not override itself if it was.
>> 
>>> On May 18, 7:42 pm, Jason Huck <[EMAIL PROTECTED]> wrote:
>> 
 That makes sense. jQuery is loaded, then extended by loading a plugin,
 but then replaced with a fresh, unaltered copy of jQuery, all of which
 takes place before document.ready(), where the (by then nonexistent)
 plugin is finally called.
>> 
 I would consider including the base jQuery file via a stub or template
 so that it's available on any/all pages in the system, then use
 something like one of the .require() plugins to manage the loading of
 additional plugins from within individual portlets. That's if you're
 looking for a pure Javascript solution. You could do something similar
 on the server side to prevent scripts from being loaded multiple
 times.
>> 
 - jason
>> 
 On May 18, 9:33 pm, Shelane <[EMAIL PROTECTED]> wrote:
>> 
> if you have this in this order, the plugin call won't work.  it will
> give an error that the plugin function is not defined
>> 
> 
>> 
>  script>
>> 
> $(function(){
> $('#bodyframe').corner('tr');
>> 
> });
>> 
>