[jQuery] toggle check box on row click

2008-06-27 Thread Dan Vega

I have a table and each row has the id of the data element. I put a
checkbox in the the first cell of every row with an id of cb+OrderId.
I found my answer to click on a row and check the checkbox but I was
just wondering if there was a better way. Is there a way to use this
to get the checkbox?


$(document).ready(function(){

$("#dt tbody tr")
.hover( function(e) {
$(this).addClass("rowHighlight");
},
function(e) {
  $(this).removeClass("rowHighlight");
})

.click( function(e) {
var id = $(this).attr("id");
$("#cb"+id).toggleCheck();
});

});

$.fn.toggleCheck = function() {
return this.each(function() {
this.checked = !this.checked;
});
};


[jQuery] Re: One button to do two opposite tasks.

2008-06-27 Thread Cristian

I changed Click for Toggle and it worked!
Thank you very much, guys.


jquery-en@googlegroups.com

2008-06-27 Thread andy9989

Try this:

1) add var $j = jQuery.noConflict(); just after you load the main
jquery library

2) replace all the instances of $ to $j in your script and in all the
plugins that you use

That's it

On Jun 28, 8:35 am, Rey Bango <[EMAIL PROTECTED]> wrote:
> Hi Reinder,
>
> Remove the true param from noConflict and that should resolve your issue.
>
> Rey...
>
> Reinder Brouwer wrote:
> > I want to use JQuery beside moootools with 2 plugins: slimbox &
> > tooltips.
> > JQuerys validation is cooler to me! :)
> > My problem is when I use slimbox by calling it with $ mootools is
> > disabled, so I found out the noconflict method. My problem is:
> > It seems doesnt work?
> >http://tableless.vliegervaringen.com/
>
> > This:
> > 
> > jQuery.noConflict(true);
>
> > jQuery(document).ready(function(){
> > jQuery("#commentForm").validate({
> >   rules: {
> >     norobot: {
> >       required: true,
> >      number: true,
> >       minlength: 4,
> >      maxlength: 4
> >     }
> >   }
> > });
> > });
> > 
> > will not work while:
> > 
> > $(document).ready(function(){
> > $("#commentForm").validate({
> >   rules: {
> >     norobot: {
> >       required: true,
> >      number: true,
> >       minlength: 4,
> >      maxlength: 4
> >     }
> >   }
> > });
> > });
> >  will return into an proper validation of the form, BUT in
> > the latest case my slimbox and tooltips got disabled? In the first
> > case so with noconflict my validation doesnt work, but my slimbox and
> > tooltips do.
> > Here is my complete source:
> >http://tableless.vliegervaringen.com/


jquery-en@googlegroups.com

2008-06-27 Thread andyGr


I did it 100s of times and it works perfectly. Try this:

1) add var $j = jQuery.noConflict(); just after you load the main jquery
library

2) replace all the instances of $ to $j in your script and in all plugins
that you use

That's it:clap:

-- 
View this message in context: 
http://www.nabble.com/noconflict-using-mootools-%3Eslimbox-tooltips-tp18157203s27240p18165452.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Some optimization

2008-06-27 Thread Michael Geary

> Zebra striping absolutely should be done server-side there is 
> no excuse outside of not having access to the code.

If you sort on the client, you must also be able to zebra stripe on the
client.

But you're right, it's best to do the *initial* zebra striping on the
server.

-Mike



[jQuery] Re: Search for a div tag

2008-06-27 Thread Glen Lipka
Do these elements have a class or are they random elements that are 143px
wide?

Glen

On Fri, Jun 27, 2008 at 8:10 AM, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:

>
> Greetings,
> I am new to JQuery and looking into this. We are trying to find a way
> to create a client side javascript that looks for a pattern on the
> page and changes the size of a div tag.
>
> For example the specific div tag is generated by Sharepoint at
> 143pixles. We want to have JQuery alter any of these on the page that
> match this pattern to 200 pixles.
>
> Is this possible, and can someone point me in the direction of a demo
> on how to do this? Any help is apprecaited. Thank you.
>


[jQuery] Re: One button to do two opposite tasks.

2008-06-27 Thread Glen Lipka
Also you can do this:

$(document).ready(function() {
   $("#box1").toggle(function() {
   $(".ul-list").show();
   },function() {
   $(".ul-list").hide()
   });
});

hide/show do what you need.

Glen


On Fri, Jun 27, 2008 at 4:51 PM, Glen Lipka <[EMAIL PROTECTED]> wrote:

> Try using Toggle, rather than Click.  That should work.
>
> Glen
>
>
> On Fri, Jun 27, 2008 at 3:28 PM, Cristian <[EMAIL PROTECTED]> wrote:
>
>>
>> HI,
>> I'm using the code below to create a hover effect. When the user puts
>> the mouse over a div "box1" a list of items appear, and when it goes
>> out, the list disappears.
>> I thought it would be interesting to change the hover event for a
>> click event. So that when the user clicked the box for the first time
>> the list would appear, and the second click would make it disappear.
>>
>> Could you guys help me?
>>
>> $(document).ready(function() {
>>$("#box1").click(function() {
>>$(".ul-list").css("display", "block");
>>},function() {
>>$(".ul-list").css("display", "none");
>>});
>> });
>>
>
>


[jQuery] Re: One button to do two opposite tasks.

2008-06-27 Thread Sam Sherlock
try this hover

$(document).ready(function() {
   $("#box1").bind('mouseover', function() {
   $(".ul-list").css({display: 'block'});
   });
   $("#box1").bind('mouseout', function() {
   $(".ul-list").css({display: 'none'});
   });
});


click toggle


$(document).ready(function() {
$(".ul-list").css({display: 'none'});
   $("#box1").click(function() {
   $(".ul-list").toggle();
   });
});


- S
2008/6/27 Cristian <[EMAIL PROTECTED]>:

>
> HI,
> I'm using the code below to create a hover effect. When the user puts
> the mouse over a div "box1" a list of items appear, and when it goes
> out, the list disappears.
> I thought it would be interesting to change the hover event for a
> click event. So that when the user clicked the box for the first time
> the list would appear, and the second click would make it disappear.
>
> Could you guys help me?
>
> $(document).ready(function() {
>$("#box1").click(function() {
>$(".ul-list").css("display", "block");
>},function() {
>$(".ul-list").css("display", "none");
>});
> });
>


[jQuery] Re: One button to do two opposite tasks.

2008-06-27 Thread Glen Lipka
Try using Toggle, rather than Click.  That should work.

Glen

On Fri, Jun 27, 2008 at 3:28 PM, Cristian <[EMAIL PROTECTED]> wrote:

>
> HI,
> I'm using the code below to create a hover effect. When the user puts
> the mouse over a div "box1" a list of items appear, and when it goes
> out, the list disappears.
> I thought it would be interesting to change the hover event for a
> click event. So that when the user clicked the box for the first time
> the list would appear, and the second click would make it disappear.
>
> Could you guys help me?
>
> $(document).ready(function() {
>$("#box1").click(function() {
>$(".ul-list").css("display", "block");
>},function() {
>$(".ul-list").css("display", "none");
>});
> });
>


[jQuery] Re: required jquery version

2008-06-27 Thread Felix Schwarz

MorningZ schrieb:
> Right from the changelog (http://jquery.bassistance.de/autocomplete/
> changelog.txt):
> 
> "* Updated package to jQuery 1.2.5, removing dimensions"
> 
> older versions (not exactly sure how old though) didn't have the
> dimensions built in

Thanks for your answer. :-)
So I hope everything will continue to work if I just ship the dimensions 
myself... Does it do any harm if I ship dimensions and trac decides to update 
jQuery to 1.2.5?

fs


smime.p7s
Description: S/MIME Cryptographic Signature


jquery-en@googlegroups.com

2008-06-27 Thread Rey Bango


Hi Reinder,

Remove the true param from noConflict and that should resolve your issue.

Rey...

Reinder Brouwer wrote:

I want to use JQuery beside moootools with 2 plugins: slimbox &
tooltips.
JQuerys validation is cooler to me! :)
My problem is when I use slimbox by calling it with $ mootools is
disabled, so I found out the noconflict method. My problem is:
It seems doesnt work?
http://tableless.vliegervaringen.com/

This:

jQuery.noConflict(true);

jQuery(document).ready(function(){
jQuery("#commentForm").validate({
  rules: {
norobot: {
  required: true,
  number: true,
  minlength: 4,
  maxlength: 4
}
  }
});
});

will not work while:

$(document).ready(function(){
$("#commentForm").validate({
  rules: {
norobot: {
  required: true,
  number: true,
  minlength: 4,
  maxlength: 4
}
  }
});
});
 will return into an proper validation of the form, BUT in
the latest case my slimbox and tooltips got disabled? In the first
case so with noconflict my validation doesnt work, but my slimbox and
tooltips do.
Here is my complete source:
http://tableless.vliegervaringen.com/



[jQuery] Re: Question about Event Handling Optimization

2008-06-27 Thread jack

Thanks everyone for your input. My other concern is that if i
completely modularize code to seperate includes, then i will lose the
one-time download / precaching benefit of a single js download.

Perhaps the best approach is to make sure that unnecessary event
handlers arent attached using something like what ambient impact
suggests, using simple switches to prevent segments of code from being
executed by pages that do not need them.

On Jun 27, 12:36 am, "..:: sheshnjak ::.." <[EMAIL PROTECTED]>
wrote:
> It actually does have a performance impact, even though we can't
> always "see it" on modern processors and javascript engines for
> desktop browsers. If you consider users with handheld devices that
> have functionality similar to PCs (and even take media="screen"
> instead of media="handheld" for styling), but have significantly less
> processing capacities, then you can see that even as good and clean
> code as jQuery core is preforming somewhat lazy. So, a large number of
> void requests for selecting nonexistent DOM elements does have a
> negative impact.
>
> What's hapenning internaly is basically evaluating document DOM and
> matching id '#very-specific-id-not-on-every-page' for every DOM
> element (just to conclude that they don't exist and instead of
> returning collection of objects, returning an empty collection), and
> repeating that for every line with $('something_here'). Then, it goes
> a step further and calls the function hover(), just to find out what
> to do if it is called on empty object (probaby return void).
>
> So if you do want to keep on with this coding strategy (or want to
> avoid rewriting of already written and debugged code), you could at
> least find some way of grouping events by functionality or some other
> criteria and call only groups that you need, depending on specific
> page content. Obvious example: you probably don't need any form
> validating events for pages that don't contain forms, or AJAX events
> for page with no AJAX at all... Call AJAX events group only for AJAX
> pages, form events only for page containing forms and so on. You can
> even let the scripts decide what groups to run by declaring which page
> goes to which category (could be multiple categories). For example
> declare a few group arrays:
> var AJAXgroup = new Array("first-ajax-page.html","second-ajax-
> page.html","third-ajax-page.html");
> $(AJAXgroup).each(function(){ if
> ( document.location.href.indexOf(this) declare AJAX events  });
> Again you will have few loops to run (and every loop impacts
> performance), but if you have say 75 events declared and call only 15
> that you need, it should be an improvement...
>
> I know answer was too long, but if you got this far it was worth
> writing...


[jQuery] Re: Some optimization

2008-06-27 Thread jack

Zebra striping absolutely should be done server-side there is no
excuse outside of not having access to the code.

On Jun 24, 3:39 pm, Kyle <[EMAIL PROTECTED]> wrote:
> I wish pagination were an option, as that would without a doubt be my
> first choice. However, it's a list of all applications from a school,
> and paginating just doesn't make sense here.
>
> I do think that I will eventually do the zebra-striping server-side
> (PHP, not that it matters), but striping takes the least amount of
> time to do client-side (I may just end up doing this, however). Also,
> because I will eventually add a filter to sort by application type and
> remove certain kinds of applications, I'll have to have an efficient
> way to do this anyhow because that will take a) removing all "alt"
> classes, b) hiding anything I filter, and c) reapplying the "alt"
> classes. So while the solution for that project is a little different,
> anything that helps optimize my current task will actually help then.
> But even if I decide to do all sorting and filtering by reloading the
> page, I am always trying to learn optimizing techniques.
>
> In any case, thanks for your reply. I appreciate it!
>
> On Jun 24, 5:14 pm, 703designs <[EMAIL PROTECTED]> wrote:
>
> > Note: I'm not going to directly answer your question.
>
> > If you're paging over this many rows, I imagine that there's a server-
> > side language involved. You should do one of two things: Either
> > paginate the results, making jQuery's job easy, or take jQuery out of
> > the equation and add classes accordingly, specifically for the "alt"
> > class. This is trivial to implement when the server-side-language is
> > generating the rows. Just use the modulus operator. If you're doing
> > this in PHP, Ruby, or Python, I can give you a quick snippet to do
> > this, assuming the data comes from an array, which it almost always
> > does.
>
> > On Jun 24, 4:06 pm, Kyle <[EMAIL PROTECTED]> wrote:
>
> > > Hi everybody. I'm looking to optimize a few lines of code here.
> > > Basically, I have a table with sometimes as many as 1600 or more rows.
> > > I want to zebra stripe the table, add a clicked class (for batching
> > > the rows), and also hovering.
>
> > > $("table.fullWidth tr:odd").filter(":not(.last)").addClass("alt");
> > > $("table.fullWidth tr").filter(":not(.last,.first)").bind("mouseenter
> > > mouseleave", function(){
> > >         $(this).toggleClass("over");});
>
> > > $("table.fullWidth tr").bind("click",function(){ $
> > > (this).toggleClass("clicked"); });
>
> > > This code works perfectly, but can take noticeable time to execute
> > > when there are a lot of rows. That should be expected, however, since
> > > it takes 3 passes through the DOM.
>
> > > My goal - if it isn't clear by the code - is to stripe all but the
> > > first and last row, add a hover effect to all but the first and last
> > > row, and then add the ability to click on any row but the first and
> > > last row to add the clicked class.
>
> > > My first attempt is on the next line, but I would really like to
> > > minimize passes. And I don't think this does it as well as it could.
> > > And this is doubly true when you look at the times.
>
> > > var table = $("table.fullWidth tr").filter(":not(.last,.first)");
> > > table.filter(":odd").addClass("alt").bind("mouseenter mouseleave",
> > > function(){ $(this).toggleClass("over"); });
> > > table.filter(":even").bind("mouseenter mouseleave", function(){ $
> > > (this).toggleClass("over"); });
> > > table.bind("click",function(){ $(this).toggleClass("clicked"); });
>
> > > The original code takes:
> > >         16 ms for 17 rows (average).
> > >         390 ms for 453 rows (average).
> > >         1610 ms for 1505 rows (average).
>
> > > My optimized code takes:
> > >         16 ms for 17 rows (average). ... larger range, however. 80% were 
> > > 14
> > > ms.
> > >         369 ms for 453 rows (average).
> > >         1635 ms for 1505 rows (average).
>
> > > I don't know if I ran these tests correctly. It was my first time. I
> > > ran each script 10 times and timed it with Firebug.
>
> > > The other option would be something like this:
>
> > >                 $("table.fullWidth 
> > > tr").filter(":not(.last,.first)").each(function()
> > > {
> > >                         var oddIsTrue = "some way to test that the 
> > > targeted node is odd.";
> > >                         if(oddIsTrue){
> > >                                 $(this).addClass("alt").bind("mouseenter 
> > > mouseleave", function(){ $
> > > (this).toggleClass("over"); }).bind("click",function(){ $
> > > (this).toggleClass("clicked")});
> > >                         }
> > >                         else{
> > >                                 $(this).bind("mouseenter mouseleave", 
> > > function(){ $
> > > (this).toggleClass("over"); }).bind("click",function(){ $
> > > (this).toggleClass("clicked")});
> > >                         }
> > >                 });
>
> > > However, even without d

[jQuery] One button to do two opposite tasks.

2008-06-27 Thread Cristian

HI,
I'm using the code below to create a hover effect. When the user puts
the mouse over a div "box1" a list of items appear, and when it goes
out, the list disappears.
I thought it would be interesting to change the hover event for a
click event. So that when the user clicked the box for the first time
the list would appear, and the second click would make it disappear.

Could you guys help me?

$(document).ready(function() {
$("#box1").click(function() {
$(".ul-list").css("display", "block");
},function() {
$(".ul-list").css("display", "none");
});
});


[jQuery] Firefox 3 help

2008-06-27 Thread daveJay

I seem to be at a loss

I'm trying to run this code right here:

$("#image img").fadeTo(500,0,function() {
$("#image img").attr({src : imgSrcNext});
}).fadeTo(500, 1);

but in firefox 3, I see the fade away and the fade back, and THEN
firefox decides to switch the img source to the new image. It doesn't
wait before firing the callback. I don't understand what could be
causing this anomoly.

Just go to this page and you'll see what I mean.
http://sandbox.exit42design.com/photography/folio_1.html

Any idea what could be going on?

Thanks,

-David


[jQuery] Re: required jquery version

2008-06-27 Thread MorningZ

Right from the changelog (http://jquery.bassistance.de/autocomplete/
changelog.txt):

"* Updated package to jQuery 1.2.5, removing dimensions"

older versions (not exactly sure how old though) didn't have the
dimensions built in


[jQuery] Re: Dynamic event listener?

2008-06-27 Thread Ariel Flesler

Check out this link.
http://docs.jquery.com/FAQ#Why_do_my_events_stop_working_after_an_Ajax_request.3F

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

On 27 jun, 15:12, noon <[EMAIL PROTECTED]> wrote:
> I have the following code which is clearing the contents of an input
> box and modifying its css.
>
> $('.untouched')
>         .focus(function(){
>                 $(this).val('');
>                 $(this).removeClass('untouched');
>                 $('.add-msg').css('display','inline');
>         })
>         .growfield();
>
> After a user enters a message into this box and submits the
> information some DOM manipulation occurs and another input box with
> the class of "untouched" is inserted.  However, no onfocus function is
> tied to this newly inserted node because jQuery isn't actively polling
> the DOM.
>
> Do I have to register an event handler for all clicks and check the
> target?  Does anyone have some sample code for this?
>
> Or is there a way to attach the event listener to the new input node
> during insertion? Without hardcoding "onfocus="? If so, is it better
> to do it this way or handle all clicks?


[jQuery] Re: jquery + tinymce

2008-06-27 Thread Sam Sherlock
same I load jquery first then mce, from a quick google that error seems to
be caused in ff when using mce on ports other 80

have you tried the plugin for mce?

2008/6/27 Mickster <[EMAIL PROTECTED]>:

>
> Hi Salvatore,
>
> I'm afraid I don't have a solution for you, but I just wanted to
> assure you that jQuery and TinyMCE do work together - I use them
> together without errors.
> Not sure if it matters (think I saw a comment about it somewhere
> though), but in which sequence do you load the scripts? I load jQuery
> first and TinyMCE at the end...
>
> Good luck!
>
> Regards,
> Mickster
>
> On Jun 27, 7:24 pm, "Salvatore FUSTO" <[EMAIL PROTECTED]> wrote:
> > Hi all,
> > i'm using jquery library in my projects, and it works fine.
> > in my last app, i've to implement a page taht acts as an html editor, so
> i used the tiny mce library: i have already used tinymce, but this is the
> first time with jquery, and they seem not to work together.
> > first of all, at start of my app i get a js error, viewed in ff console:
> Illegal document.domain value" code: "1009
> > second, in the page where i try to transform a textarea in an html editor
> >
> > 
> >
> > tinyMCE.init({
> >
> > theme : "advanced",
> >
> > mode : "textarea",
> >
> > file_browser_callback : "fileBrowserCallBack"
> >
> > /*language : "it"*/
> >
> > });
> >
> > 
> >
> > i have another js error: tinyMCE has no properties
> > As anyone encontoured and solved?
> > regards
> > salvatore
>


[jQuery] Re: jquery + tinymce

2008-06-27 Thread Mickster

Hi Salvatore,

I'm afraid I don't have a solution for you, but I just wanted to
assure you that jQuery and TinyMCE do work together - I use them
together without errors.
Not sure if it matters (think I saw a comment about it somewhere
though), but in which sequence do you load the scripts? I load jQuery
first and TinyMCE at the end...

Good luck!

Regards,
Mickster

On Jun 27, 7:24 pm, "Salvatore FUSTO" <[EMAIL PROTECTED]> wrote:
> Hi all,
> i'm using jquery library in my projects, and it works fine.
> in my last app, i've to implement a page taht acts as an html editor, so i 
> used the tiny mce library: i have already used tinymce, but this is the first 
> time with jquery, and they seem not to work together.
> first of all, at start of my app i get a js error, viewed in ff console: 
> Illegal document.domain value" code: "1009
> second, in the page where i try to transform a textarea in an html editor
>
> 
>
> tinyMCE.init({
>
> theme : "advanced",
>
> mode : "textarea",
>
> file_browser_callback : "fileBrowserCallBack"
>
> /*language : "it"*/
>
> });
>
> 
>
> i have another js error: tinyMCE has no properties
> As anyone encontoured and solved?
> regards
> salvatore


[jQuery] Re: livequery with hoverIntent

2008-06-27 Thread Gerbrand

Hello,

I'm having the similar problem.

When I try to use the hoverIntent within the livequery, the
hoverintent triggers immediatly even when I didn't went over the
element.

j("a.jTip")
.livequery(function(){

   j(this)
  .hoverIntent({
sensitivity: 3,
interval: 2,
over: JT_show(this.href,this.id,this.name),
timeout: 500,
out: j('#JT').remove()
})
  .click(function(){return false});
}, function() {
$(this)
.unbind('mouseover')
.unbind('mouseout');
});


i'm using jTip to load a kind of vcard.

when I use just hover then it works fine. But it has to load only
after a few seconds when the mouse on the element.

Thanks in advanced.

Gerbrand


On May 2, 3:44 pm, "Brandon Aaron" <[EMAIL PROTECTED]> wrote:
> I don't see anything wrong with the code you posted. Could you post more of
> the code or a test page?
>
> --
> Brandon Aaron
>
> On Fri, May 2, 2008 at 8:26 AM, Alexandre Plennevaux <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > hello!
>
> > i need to assign a behaviour triggered via the hoverIntent plugin to
> > elements fetched via ajax. I would assume i should use the livequery plugin
> > for that, but my attempts have failed miserably so far.
>
> > Here is the non livequery code, that works for DOM elements present on
> > document ready:
>
> > $('ul.mainmenu:not(#applicationTitle)').hoverIntent({
> >           sensitivity: 2,
> >           interval: 0,
> >           over: function(){
> >               $('li, li a', $(this)).addClass('visible');
> >           },
> >           timeout: 0,
> >           out: function(){
> >               $('li, li a', $(this)).removeClass('visible');
> >           }
> >       })
>
> > i tried this, but it doesn't work _  Any help *much* appreciated, thanks
> > !!
>
> >       $('ul.mainmenu:not(#applicationTitle)').livequery(function(){
> >             $(this).hoverIntent({
> >           sensitivity: 2,
> >           interval: 0,
> >           over: function(){
> >               $('li, li a', $(this)).addClass('visible');
> >           },
> >           timeout: 0,
> >           out: function(){
> >               $('li, li a', $(this)).removeClass('visible');
> >           }
> >       });
> >       })


[jQuery] Replace not a function with Regular Expression

2008-06-27 Thread parrfolio

Trying to pull in flickr feed and replace the _m with _b in the url to
print large images.

$.getJSON("http://api.flickr.com/services/feeds/groups_pool.gne?
[EMAIL PROTECTED]&lang=en-us&size=b&format=json&jsoncallback=?",
function(data){
  $.each(data.items, function(i,item) {
$("").attr("src", 
item.media.m).match(/_m\.jpg/g,
'_b.jpg').appendTo("#images").fadeTo(1800, 1.0);

if ( i == 8 ) return false;
  });
$('#images, .content ul').innerfade({
speed: '800',
timeout: 5000,
type: 'sequence'
});
});


I'm having a tough time with the regular expression. I get replace is
not a function. Anyone have any ideas on how to replace the url _m
with _b?


[jQuery] SUPERFISH problems in IE 6

2008-06-27 Thread ethayer594

I'm having problems with the DDNAV in IE 6.

First off, I think it's causing my headers width to display smaller.

Second, the DDNAV extends the entire width of the browser.

This is the first time I have used this style DD menu so any help is
appreciated.
Thanks

site: http://www.goldfishnw.biz/TualatinFoodPantry/

CSS: http://www.goldfishnw.biz/TualatinFoodPantry/MainNav.css

CSS: http://www.goldfishnw.biz/TualatinFoodPantry/superfish.css


[jQuery] [autocomplete] Display a busy indicator?

2008-06-27 Thread Felix Schwarz
Hi,

I use the autocomplete script from
http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/

There is something I could not figure out: Is it possible to show an
busy indicator while the results are fetched from a remote server?

thanks,
fs




smime.p7s
Description: S/MIME Cryptographic Signature


[jQuery] Re: [validate] automatically clear error messages when pass validation rule?

2008-06-27 Thread Josh Joy
Ok, cool. I see what you're saying.

Is there any way around this? The issue I'm facing is that we have a common
header and common footer, the table begins inside the header and ends in the
footer, so it's hard to figure out a nice solution other than having a form
on every page.

Thanks,
Josh

On Fri, Jun 27, 2008 at 8:17 AM, Jörn Zaefferer <
[EMAIL PROTECTED]> wrote:

>
> Looks like your markup is invalid: The form doesn't surround the
> table, instead its closed instantly. Its weird that the validation
> works at least in parts.
>
> This is the rendered html:
>
> 
>  <-- closed!
> ...
> 
>
> Jörn
>
> On Thu, Jun 26, 2008 at 6:39 PM, Josh Joy <[EMAIL PROTECTED]> wrote:
> > Sorry, try here
> > http://snippets.dzone.com/posts/show/5700
> >
> > On Thu, Jun 26, 2008 at 2:50 AM, Jörn Zaefferer
> > <[EMAIL PROTECTED]> wrote:
> >>
> >> I don't see an attachment - could you upload that somewhere?
> >>
> >> On Wed, Jun 25, 2008 at 11:57 PM, Josh Joy <[EMAIL PROTECTED]> wrote:
> >> > Ok, I have attached a sample html.
> >> >
> >> > It seems that using tables is causing some confusion? I'm not sure.
> >> >
> >> > Hope you can pinpoint what I'm doing wrong.
> >> >
> >> > Note  >> > value=""/>
> >> > I'm using spring so it does the data object binding for me which is
> the
> >> > reason for the name. I changed the id to "password" cuz I was figuring
> >> > that
> >> > the Javascript jquery validate lookups were done by id.
> >> >
> >> > Thanks,
> >> > Josh
> >> >
> >> >
> >> > On Wed, Jun 25, 2008 at 1:23 PM, Jörn Zaefferer
> >> > <[EMAIL PROTECTED]> wrote:
> >> >>
> >> >> That looks like a bug. Once a label is inserted, its supposed to be
> >> >> updated and not appended again. Could you upload a testpage and post
> >> >> the url?
> >> >>
> >> >> Jörn
> >> >>
> >> >> On Wed, Jun 25, 2008 at 6:00 PM, Josh Joy <[EMAIL PROTECTED]>
> wrote:
> >> >> > I mean remove the error messages. Whenever I hit submit, and if a
> >> >> > field
> >> >> > still does not pass the validation rule, the old error message
> >> >> > remains,
> >> >> > and
> >> >> > the same message gets appended twice.
> >> >> >
> >> >> > simple example
> >> >> >
> >> >> > (error message)
> >> >> > input field
> >> >> > [submit]
> >> >> >
> >> >> > I click submit, and input field still doesnt pass, now my page has
> >> >> > (error message)
> >> >> > (error message)
> >> >> > input field
> >> >> > [submit]
> >> >> >
> >> >> > So, how come the error message isn't being cleared?
> >> >> >
> >> >> > I had to add a custom errorPlacement override, though there are
> still
> >> >> > cases
> >> >> > it doesnt work properly, for example if I make sure two passwords
> are
> >> >> > the
> >> >> > same.
> >> >> >
> >> >> > Here is my code snippet, please let me know what I am configuring
> >> >> > wrong.
> >> >> > If
> >> >> > I have the replaceWith line commented out (as below) then the error
> >> >> > messages
> >> >> > dont clear.
> >> >> >
> >> >> >   
> >> >> >
> >> >> >   $(document).ready(function(){
> >> >> > $("#command").validate({
> >> >> >   errorPlacement: function(label, element) {
> >> >> > //$(element).prev(".error").replaceWith("");
> >> >> > label.insertBefore( element );
> >> >> >
> >> >> >   },
> >> >> >
> >> >> >   rules: {
> >> >> > "profileBean.loginEmail": {
> >> >> > required: true,
> >> >> > minlength: 5,
> >> >> >   email:true
> >> >> > },
> >> >> > "password": {
> >> >> >
> >> >> >   required:true,
> >> >> >   minlength:5
> >> >> >   },
> >> >> >   "passconfirm":{
> >> >> >   required:true,
> >> >> >   minlength:5,
> >> >> >   equalTo:"#password"
> >> >> >
> >> >> >   }
> >> >> >   },
> >> >> >   messages:{
> >> >> >   "profileBean.loginEmail":{
> >> >> >   required:"Email must be supplied",
> >> >> >   minlength:"specify at least 5
> >> >> > characters",
> >> >> >
> >> >> >   }
> >> >> >}
> >> >> > });
> >> >> >   });
> >> >> >   
> >> >> >
> >> >> >   
> >> >> >
> >> >> > 
> >> >> >
> >> >> >  >> >> > name="profileBean.loginEmail"
> >> >> > class="inputFld" type="text" value=""/>
> >> >> > 
> >> >> > 
> >> >> >
> >> >> >
> >> >> >  >> >> > class="inputFld"
> >> >> > type="password" value=""/>
> >> >> > 
> >> >> > 
> >> >> >
> >> >> >  >> >> > class="inputFld" />
> >> >> > 
> >> >> > 
> >> >> > 
> >> >> >
> >> >> >
> >> >> > Thanks,
> >> >> > Josh
> >> >> >
> >> >> >
> >> >> > On Wed, Jun 25, 2008 at 3:22 AM, Jörn Zaefferer
> >> >> > <[EMAIL PROTECTED]> wrote:
> >> >> >>
> >> >> >> What are you referring to with "clear"? They are 

[jQuery] Re: jQuery Cycle Plugin Pager mode

2008-06-27 Thread greencode

Many thanks fort the extra links. I shall have a good old play with
this over the weekend. Great Plugin btw.

On Jun 27, 12:23 pm, Mike Alsup <[EMAIL PROTECTED]> wrote:
> Here are some links:
>
> http://www.malsup.com/jquery/cycle/pager2.htmlhttp://www.malsup.com/jquery/cycle/pager3.html
>
> On Jun 27, 4:15 am, greencode <[EMAIL PROTECTED]> wrote:
>
> > Does anyone know how I can change the links to text links rather than
> > continuous numbers? I'm new to all of this and can't seem to find it
> > anywhere?
>
> >http://www.malsup.com/jquery/cycle/int2.html


[jQuery] NEWBIE: Accessing web control (ascx) of page (aspx)

2008-06-27 Thread NAR

I am VERY new to this as in started digging yesterday.

I have a page, "TestPage.aspx" that includes the following javascript
in the  section.

///


@import "css/thickbox.css";


$(document).ready(function() {
$('#form1 #AdminGroups1 > #pnlGroup
> :button').click(function()
{
tb_show("Be patient.","images/walkingBear.gif",null);
});
});

///

Its  contains a user control

///







///

In the user control, "AdminGroups.ascx" is a panel with various lists
and buttons.

///



blah blah

   
///

I want to show a Thickbox when a button is clicked. I have been trying
various permutations of the selectors I found in the JQuery API to no
avail. Can someone help me write the function that will react to this?

$('#form1 #AdminGroups1 > #pnlGroup > :button').click(function()
{
tb_show("Be patient.","images/walkingBear.gif",null);
 });

Thank you so much for your help,

 Nancy


[jQuery] Getting XMLHttpRequest status

2008-06-27 Thread corey

Hey, all. I'm sending an AJAX request, and in addition to executing
functions on Success or failure, I want to get the Status of the
XMLHttpRequest object (404, 401, etc). It's passed into the functions,
but I can't figure out how to retrieve it.

$.ajax({
type: "GET",
url: "member_check.php",
dataType: "xml",
error: function(event, XMLHttpRequest, ajaxOptions, thrownError) {
alert( XMLHttpRequest.status ) // << 
}
)

Any ideas? Thanks!

Corey


[jQuery] Dynamic event listener?

2008-06-27 Thread noon

I have the following code which is clearing the contents of an input
box and modifying its css.

$('.untouched')
.focus(function(){
$(this).val('');
$(this).removeClass('untouched');
$('.add-msg').css('display','inline');
})
.growfield();

After a user enters a message into this box and submits the
information some DOM manipulation occurs and another input box with
the class of "untouched" is inserted.  However, no onfocus function is
tied to this newly inserted node because jQuery isn't actively polling
the DOM.

Do I have to register an event handler for all clicks and check the
target?  Does anyone have some sample code for this?

Or is there a way to attach the event listener to the new input node
during insertion? Without hardcoding "onfocus="? If so, is it better
to do it this way or handle all clicks?


[jQuery] select input in td not wokring, and disabled textbox centered

2008-06-27 Thread wesbird

Hi,
  I have this problem. check the code below
  when first checkbox unchecked will disable 2nd checkbox and textbox;
when 2nd checkbox unchecked will disable textbox.
  now 2nd checkbox works just fine, but I have problem to make 1st one
work.
  I use
$(this).parent().nextAll().attr('disabled', !$
(this).is(':checked'));
  which will disable 2nd checkbox and textbox, but I still can enter
in textbox, I knew it will disable TD instead of the INPUT inside.

  I also try
$(this).parent().find('input').attr('disabled', !$
(this).is(':checked'));
$(this).parent().nextAll('input').attr('disabled', !$
(this).is(':checked'));
  none of them works.

How I can make this work?


Thank you,

Wes





New Document 








  $(document).ready(function(){

// On/Off check box event
$("#tblACR td:first-child input").click(function() {
$(this).parent().nextAll().attr('disabled', !$
(this).is(':checked'));
});

// Zone associate check box Event
$("#tblACR td:nth-child(3) input:checkbox").click(function() {
$(this).next().attr("disabled", !$(this).is(":checked"));
});

$("#acrzt1").val("R1 R2 R3");

});











The siting of identical front elevation side by side
is prohibited


Zone associated








[jQuery] Search for a div tag

2008-06-27 Thread [EMAIL PROTECTED]

Greetings,
I am new to JQuery and looking into this. We are trying to find a way
to create a client side javascript that looks for a pattern on the
page and changes the size of a div tag.

For example the specific div tag is generated by Sharepoint at
143pixles. We want to have JQuery alter any of these on the page that
match this pattern to 200 pixles.

Is this possible, and can someone point me in the direction of a demo
on how to do this? Any help is apprecaited. Thank you.


[jQuery] Problems in beloved IE6

2008-06-27 Thread ethayer594

I'm using superfish 1.4.1 and jquery 1.2.6 here:
http://www.goldfishnw.biz/TualatinFoodPantry/

CSS: http://www.goldfishnw.biz/TualatinFoodPantry/MainNav.css

CSS: http://www.goldfishnw.biz/TualatinFoodPantry/superfish.css

This is my first time using superfish and I got it to work in FF and
IE7, but IE6 is giving me some problems.
Not sure what to do. Any help is appreciated.

Thanks


[jQuery] [autocomplete] Display a busy indicator?

2008-06-27 Thread Felix Schwarz

Hi,

I use the autocomplete script from
http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/

There is something I could not figure out: Is it possible to show an
busy indicator while the results are fetched from a remote server?

thanks,
fs




[jQuery] new plugin: Values

2008-06-27 Thread Nathan Bubna

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

This plugin adds a values() method that searches descendants of the
current selection for those with a "name" attribute and gathers their
values into a hash object for you.  If you pass a hash object or DOM
element into the method, it will reverse the process and set those
values.  It can also work with single values.

This makes it extremely easy to move/set/retrieve values to or from
forms or any random collection of elements, allowing you to focus on
"business" logic and not navigating the DOM to find the elements you
need or worry about how future refactorings will affect things.

To get all values:
var values = $('.parent').values();

To set values:
$('.parent').values({ foo: 'bar', answer: 42 });

To get one value:
var foo = $('.parent').values('foo');

To set one value:
$('.parent').values('foo', 'bar');

More info on the available functions and configuration options are in
the source.  Feedback is welcome.  I'm pretty new to this plugin-dev
thing. :)


[jQuery] struggling to get iframed content using jQuery Thickbox plugin for a calendar

2008-06-27 Thread mjatharvest

Hi All,

I'm working on a calendar for a site in the works at this link:
http://208.79.237.221/events/

My goal is that when a user clicks on a link within the calendar the
details of that event pop up in a thickboxs iframe.

I'm adding the class="thickbox" and query string to all the links in
the tables via jQuery because I can't do it through the CMS.

 $("table.calendar a").addClass("thickbox").each(function(){
var href = $(this).attr('href');
var query = 
"/?KeepThis=true&TB_iframe=true&height=400&width=600";
$(this).attr('href', href+query);
});

This is working properly, but I can't figure out it follows the link
instead of opening up in a thickbox. Any help would be appreciated.

Thanks


[jQuery] Re: Adding hover to all table rows (tr) but the first one.

2008-06-27 Thread aldomatic

@Dean Landolt:   That is a good point, I will take that into
consideration.

On Jun 26, 3:40 pm, "Dean Landolt" <[EMAIL PROTECTED]> wrote:
> > Hi again,
>
> > you replied directly to me with this:
>
> >  Awesome! Now 1 more question.
>
> >> How can I have it not hover the last row too?
>
> Just to expand a little on sheshnjak's point above, if it does sound like
> it's a header and footer you're trying to differentiate. If that's the case,
> may I suggest the more semantic  and  tags? They might come in
> handy.


[jQuery] Show() and Hide() with effects attached question

2008-06-27 Thread [EMAIL PROTECTED]

Hello everyone,
I have a very weird problem that I am seeing with JQuery.
If I have div which contains 

[jQuery] Trouble with Ajax Buttons Inside Facebox Lightbox

2008-06-27 Thread quigebo

I'm trying to have a few text fields inside of a lightbox like: Name
and Subdomain with an image(submit button) to POST those values back
to the server. When they aren't in the lightbox, it works fine but
when I pull it into the lightbox, the image isn't able to POST back to
the server -- I assume it isn't bound and doesn't register the click.
Here is some code to hopefully help show what I mean: (sorry the HTML
is actually HAML)

HTML

%div#company_fields
  = text_field_tag "name", {}, :id => 'name'
  %br
  = text_field_tag "subdomain", {}, :id => 'subdomain'
  %br
  = image_tag 'http://static.px.yelp.com/photo/
hjVFsGNH7MwGUH_Ww8f4Rw/ss', :id => 'test_create'

JS
---
// Ajax create
  $('#test_create').click(function() {
  $.post('http://localhost:3000/users', {'users[name]': $
('#name').val(), 'subdomain':
  $('#subdomain').val()}, function(data) {
   alert('data');
  });
});

--I changed the code around a bit but I assume you can get the idea.
Any ideas?


[jQuery] X_REQUESTED_WITH ie6

2008-06-27 Thread DXCJames

Since JQuery auto sends "X_REQUESTED_WITH" i assumed it would probably
work with most everything.. but it doesnt seem to be working with
ie6... I tried changing the head name to a few different things but
nothing seemed to work.. does anyone have any idea why this doesnt
work or have any other ideas for a similar way to detect if ajax is
making the call on the server side? i dont really want to use a
QueryString variable because then that allows a person to just open
that page up inside the browser.. so i was looking for something
slightly more difficult to obtain the page.. any ideas/


[jQuery] [autocomplete] custom parse function

2008-06-27 Thread Felix Schwarz
Hi,

still using the autocomplete script from
http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/

Currently the script expects by default that the response contains the
data as "visible text|other data" with one item per line (at least this
is what I figured out from reading the source, I did not find any
documentation about this - maybe I'm wrong!).

I have an application which returns HTML because this was the preferred
format for another autocompletion script which uses a different js
library. Now I want to make the switch to jQuery but I don't want to
change the application if not absolutely necessary.

It was quite easy using a custom parse function by using the parse
option (again, undocumented). But for me its much easier to just
transform my data into the default format and let the default parse
function do its job. But I did not find a way to call the default parse
function so I ended up copying it. Is there another way?

Furthermore I like to know if custom parse functions are an official
features (I did not find any documentation about them) or if they are
likely to go away in the future...

fs





smime.p7s
Description: S/MIME Cryptographic Signature


[jQuery] [autocomplete] custom parse function

2008-06-27 Thread Felix Schwarz

Hi,

still using the autocomplete script from
http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/

Currently the script expects by default that the response contains the
data as "visible text|other data" with one item per line (at least this
is what I figured out from reading the source, I did not find any
documentation about this - maybe I'm wrong!).

I have an application which returns HTML because this was the preferred
format for another autocompletion script which uses a different js
library. Now I want to make the switch to jQuery but I don't want to
change the application if not absolutely necessary.

It was quite easy using a custom parse function by using the parse
option (again, undocumented). But for me its much easier to just
transform my data into the default format and let the default parse
function do its job. But I did not find a way to call the default parse
function so I ended up copying it. Is there another way?

Furthermore I like to know if custom parse functions are an official
features (I did not find any documentation about them) or if they are
likely to go away in the future...

fs





[jQuery] [autocomplete] Adding data via external function

2008-06-27 Thread [EMAIL PROTECTED]


Jorn,  great work on autocomplete.

One thing I'd like to see is the ability to pull the data from a
function (instead of a static array or url).  The function could
return the array instead, however it wanted to go get the data.

Imagine:
autocomplete: function(urlOrDataOrFunction, options) {

I tried to hack it in myself, making a function that returned an array
of objects,using typeof urlOrData == 'function', and then invoking the
function in the "function request(term, success, failure)"  section,
but I failed.  Pretty spectacularly.  It seems like it should work,
but later "item" (for formatItem) comes back undefined.  I'll keep
working at it.





[jQuery] Re: Sorting a JSON object based on it's keys

2008-06-27 Thread Michael Geary

Arun, ask not what jQuery can do for you, ask what you can do for... Well,
something like that.

Did you look at what makeArray() gave you back? Do a console.log() if you
didn't try it. You'll see that it's not what you were expecting -
makeArray() isn't meant for this purpose.

Don't rely on a library function to do this conversion for you (unless you
know it's the right one) - it's only 2-3 lines of code anyway, so just write
it yourself and get exactly what you need.

But first you need to decide exactly what the output should be. It can't be
what you posted in your first message - that's not an array. Is the array
format I listed OK? Or do you need to also preserve those numeric keys,
maybe by adding a third property to each element:

...
        {
"Key" : 2,
                "Name" : "B",
                "Position" : "Sr"
        },
...

Once you have the exact format in mind, it's a simple bit of code to create
the array.

Don't think about sorting until you have verified the array contents. Then,
sort with a callback function and you're done.

-Mike

> From: Arun Kumar
> 
> what about using jQuery.makeArray() method?
> 
> I tried this and converted that object into an array and then I used
> sort() method. But no use.

> On Jun 27, 12:33 pm, "Michael Geary" <[EMAIL PROTECTED]> wrote:
> > No, you can't do that. Your jsonObj is an *object*, not an 
> > array, so it has no sort order.
> >
> > If you want to be able to sort your object, it needs to be 
> > an array, e.g.
> >
> > var jsonObj = [
> >         {
> >                 "Name" : "B",
> >                 "Position" : "Sr"
> >         },
> >         {
> >                 "Name" : "S",
> >                 "Position" : "Sr"
> >         },
> >         {
> >                 "Name" : "A",
> >                 "Position" : "Jr"
> >         }
> > ];
> >
> > That is something you can sort. You can use JavaScript's 
> > sort() method of the Array object with a callback function
> > that compares two elements as you wish.
> >
> > If you have a large number of elements in the array, a sort 
> > callback can slow down sorting. Let me know if this is the
> > case - I have a very fast array sort method for just this
> > situation. To late at night for me to post it right now, but
> > remind me tomorrow...

> > > From: Arun Kumar
> >
> > > I have a JSON object (dynamically created) which is given below:
> >
> > > var jsonObj = {
> > >    1 : {
> > >            "Name" : "B",
> > >            "Position" : "Sr"
> > >    },
> > >    2 : {
> > >            "Name" : "S",
> > >            "Position" : "Sr"
> > >    },
> > >    3 : {
> > >            "Name" : "A",
> > >            "Position" : "Jr"
> > >    }
> > > };
> >
> > > In the above JSON object, keys can be strings also.
> >
> > > Is there anyway that I can sort this JSON object  based 
> > > on these keys?
> >
> > > The output should be as below:
> >
> > > var jsonObj = {
> > >    2 : {
> > >            "Name" : "Sai",
> > >            "Position" : "Sr"
> > >    },
> > >    1 : {
> > >            "Name" : "Bhushan",
> > >            "Position" : "Sr"
> > >    },
> > >    3 : {
> > >            "Name" : "Arun",
> > >            "Position" : "Jr"
> > >    }
> > > };



[jQuery] Re: jqModal r12 release

2008-06-27 Thread Alexandre Plennevaux
Brice,

i have a feature request: the possibilty to use proportional width instead
of fixed width, so we can tell it to take like 90% of the available width
space. Useful in some cases for complex UI.

sorry if it is possible already, didn't manage to so far.

thanks !!!

On Tue, Jun 24, 2008 at 1:38 AM, MorningZ <[EMAIL PROTECTED]> wrote:

>
> Brice:
>
> Thanks a lot for all the hard work, your plugin is one of the most
> used ones in my applications
>
> Glad to see it playing nicely with the new jQuery version
>



-- 
Alexandre Plennevaux
LAb[au]

http://www.lab-au.com


[jQuery] Re: glowbuttons

2008-06-27 Thread Matt

Very neat plugin! I might have some use for this in a new form. Nice
work Matt and thanks to Rey for sharing!



On Jun 27, 7:08 am, Rey Bango <[EMAIL PROTECTED]> wrote:
> Matt Berseth published his first jQuery plugin called glowButtons:
>
> http://mattberseth.com/blog/2008/06/glowbuttons_writing_my_first_j.html
>
> Rey


[jQuery] jquery + tinymce

2008-06-27 Thread Salvatore FUSTO
Hi all,
i'm using jquery library in my projects, and it works fine.
in my last app, i've to implement a page taht acts as an html editor, so i used 
the tiny mce library: i have already used tinymce, but this is the first time 
with jquery, and they seem not to work together.
first of all, at start of my app i get a js error, viewed in ff console: 
Illegal document.domain value" code: "1009
second, in the page where i try to transform a textarea in an html editor



tinyMCE.init({

theme : "advanced",

mode : "textarea",

file_browser_callback : "fileBrowserCallBack"

/*language : "it"*/


});



i have another js error: tinyMCE has no properties
As anyone encontoured and solved?
regards
salvatore

[jQuery] Re: Using "this" with jQuery

2008-06-27 Thread Richard D. Worth
In that case $(this).prev(".seriesOverlay") should do.

- Richard

On Fri, Jun 27, 2008 at 12:27 PM, hubbs <[EMAIL PROTECTED]> wrote:

>
> This is almost what I need.  But .seriesOverlay is not a child, but
> the previous div in the DOM, so it is right above it.
>
> Maybe I could use $(".seriesOverlay + .seriesItem")?
>
> On Jun 26, 2:47 am, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
> > If your .seriesOverlay is a child of your .seriesItem[1], you can do:
> >
> > $(".seriesItem").mouseover(function() {
> >   $(".seriesOverlay", this).hide();}).mouseout(function() {
> >
> >   $(".seriesOverlay", this).show();
> >
> > });
> >
> > Why this works:
> > * The thisArg in jQuery callbacks is always equal to the original element
> to
> > which the event is bound
> > * The jQuery function accepts an optional context as the second argument.
> > See
> >
> > http://docs.jquery.com/Core/jQuery#expressioncontext
> >
> > for more info.
> >
> > - Richard
> >
> > Richard D. Worthhttp://rdworth.org/
> >
> > [1] If you have a different structure, you might have to do something
> like
> > $(this).next(".seriesOverlay"), depending
> >
> > On Thu, Jun 26, 2008 at 1:02 AM, hubbs <[EMAIL PROTECTED]> wrote:
> >
> > > I have a listing of items, each of which has a transparent "cover"
> > > over each item, but when you mouse over the item, the transparency
> > > hides, and shows full color item, then on mouseout the "cover" is
> > > added again.
> >
> > > This works fine if I use IDs, but I want to get away from this, as I
> > > am not always sure about how many items I will have, so I don't want
> > > to have to keep adding more IDs to my jquery script.  How can I use
> > > the javascript "this" property, so that I can get away from using IDs,
> > > and just have the function happen on the element that the event is
> > > happening on?
> >
> > > Here is what I am using:
> >
> > >$(".seriesItem").mouseover(function () {
> > >  $(".seriesOverlay").hide();
> > >});
> > >$(".seriesItem").mouseout(function () {
> > >  $(".seriesOverlay").show();
> > >});
> >
> > > How could I incorporate "this" into my script?  Or am I going about it
> > > the wrong way?
> >
> > > I wanted to use classes, but obviously it shows and hides ALL items
> > > transparent cover.
>


[jQuery] Re: Using "this" with jQuery

2008-06-27 Thread hubbs

This is almost what I need.  But .seriesOverlay is not a child, but
the previous div in the DOM, so it is right above it.

Maybe I could use $(".seriesOverlay + .seriesItem")?

On Jun 26, 2:47 am, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
> If your .seriesOverlay is a child of your .seriesItem[1], you can do:
>
> $(".seriesItem").mouseover(function() {
>   $(".seriesOverlay", this).hide();}).mouseout(function() {
>
>   $(".seriesOverlay", this).show();
>
> });
>
> Why this works:
> * The thisArg in jQuery callbacks is always equal to the original element to
> which the event is bound
> * The jQuery function accepts an optional context as the second argument.
> See
>
> http://docs.jquery.com/Core/jQuery#expressioncontext
>
> for more info.
>
> - Richard
>
> Richard D. Worthhttp://rdworth.org/
>
> [1] If you have a different structure, you might have to do something like
> $(this).next(".seriesOverlay"), depending
>
> On Thu, Jun 26, 2008 at 1:02 AM, hubbs <[EMAIL PROTECTED]> wrote:
>
> > I have a listing of items, each of which has a transparent "cover"
> > over each item, but when you mouse over the item, the transparency
> > hides, and shows full color item, then on mouseout the "cover" is
> > added again.
>
> > This works fine if I use IDs, but I want to get away from this, as I
> > am not always sure about how many items I will have, so I don't want
> > to have to keep adding more IDs to my jquery script.  How can I use
> > the javascript "this" property, so that I can get away from using IDs,
> > and just have the function happen on the element that the event is
> > happening on?
>
> > Here is what I am using:
>
> >    $(".seriesItem").mouseover(function () {
> >      $(".seriesOverlay").hide();
> >    });
> >    $(".seriesItem").mouseout(function () {
> >      $(".seriesOverlay").show();
> >    });
>
> > How could I incorporate "this" into my script?  Or am I going about it
> > the wrong way?
>
> > I wanted to use classes, but obviously it shows and hides ALL items
> > transparent cover.


[jQuery] Re: Add class on click, then remove when click another, and add to that.

2008-06-27 Thread hubbs

Thank you!  This will work perfectly.

Yes, I need the link to be followed, because it loads content into a
div using ajax, so, removing return false; will be what i need.  Any
thank you for commenting the code!  That really helps for beginners!


On Jun 26, 1:15 am, sheshnjak <[EMAIL PROTECTED]> wrote:
> Hi, I think this should work for you:
>
> - Basically, you have this in html:
> 
>   bla1
>   bla2
>   bla3
> 
> - To see the results put this in your css:
> a.clicked {background-color: red}
>
> - And finally, you should put this in js file:
>
> $("a").click(function(){
>         $(".targetLinkList a.clicked").removeClass("clicked");   // remove
> previous class if there is any
>         $(this).addClass("clicked");                                      //
> add class to the clicked link
>         return
> false;                                                           //
> this prevents browser from following clicked link
>
> });
>
> This should work, but I'm not sure you really asked the right
> question. If you omit last js line (return false;), then browser will
> apply clicked class, but it will follow clicked link and you will
> never stay on the page long enough to see the change, whatever it is
> you intended. If this doesn't help, give me more details and I'll try
> to help...http://www.tomislavdekovic.iz.hr/


[jQuery] Re: jQuery powered Plazes acquired by Nokia

2008-06-27 Thread Klaus Hartl

Yeah, only the website uses jQuery, the upcoming version much more
than now.

--Klaus


On Jun 27, 4:24 pm, RobG <[EMAIL PROTECTED]> wrote:
> On Jun 23, 6:41 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > All,
>
> > I'm happy to announce that jQuery powered service Plazes has been
> > aquired ny Nokia. W0t!!!1!
>
> Which part uses jQuery?  The linked article says that the iPhone
> version is an SDK application.
>
> --
> Rob


[jQuery] jCarousel problem with IE6: CSS not applied correctly & scroll not activating

2008-06-27 Thread [EMAIL PROTECTED]

Hi, i've set up a jcarousel here:

http://www.q2arabia.com/index.php/events

The page doesn't seem to be working in IE6, but it does work in IE7 /
Firefox / Safari / Opera.

Two things are not working:

1. The scrolling doesn't seem to be working
2. The css for hiding the overflow doesn't seem to be working

Does anyone have any hints on how to fix this; i'm pretty sure i've
just followed the standard example of how to set it up. Any help is
appreciated.


jquery-en@googlegroups.com

2008-06-27 Thread Reinder Brouwer

I want to use JQuery beside moootools with 2 plugins: slimbox &
tooltips.
JQuerys validation is cooler to me! :)
My problem is when I use slimbox by calling it with $ mootools is
disabled, so I found out the noconflict method. My problem is:
It seems doesnt work?
http://tableless.vliegervaringen.com/

This:

jQuery.noConflict(true);

jQuery(document).ready(function(){
jQuery("#commentForm").validate({
  rules: {
norobot: {
  required: true,
  number: true,
  minlength: 4,
  maxlength: 4
}
  }
});
});

will not work while:

$(document).ready(function(){
$("#commentForm").validate({
  rules: {
norobot: {
  required: true,
  number: true,
  minlength: 4,
  maxlength: 4
}
  }
});
});
 will return into an proper validation of the form, BUT in
the latest case my slimbox and tooltips got disabled? In the first
case so with noconflict my validation doesnt work, but my slimbox and
tooltips do.
Here is my complete source:
http://tableless.vliegervaringen.com/


[jQuery] td[title=''] vs td:not([title])

2008-06-27 Thread mick

Hi

I've been playing with jQuery selectors and i found something
strange:
I have a table like this:


  
  
  


Now, when i try to use jQuery to select all TD's that do not have a
title attribute:
td:not([title])
this selects the last two td's, so the one with title='' is included.
if i try td[title=''] it gives me the last two as well
if i try td[title] to see the reverse effect, it gives me only the
first TD!
Is this a bug??

Michaël


[jQuery] [autocomplete] required jquery version

2008-06-27 Thread Felix Schwarz

Hi,

http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/ states 
that the required version of jquery is 1.2.6. Is there a list why 1.2.6 
is necessary? I write a trac plugin and trac 0.11 only ships 1.2.3 but I 
don't like to/can't insert my own version of jQuery.

fs


[jQuery] Re: jquery Plugin Validation + jquery Form Plugin

2008-06-27 Thread Fred Boucher

You are right !
Thank you very much for your help, Jörn :)

On 27 juin, 14:56, "Jörn Zaefferer" <[EMAIL PROTECTED]>
wrote:
> Try to put the script you load into the ajaxSubmit-success-callback,
> instead of loading it together with the HTML. That should be much more
> reliable.
>
> Jörn
>
> On Fri, Jun 27, 2008 at 2:43 PM, Fred Boucher <[EMAIL PROTECTED]> wrote:
>
> > I have a problem using two plugins with Jquery :
> >http://bassistance.de/jquery-plugins/jquery-plugin-validation/
> > and
> >http://www.malsup.com/jquery/form/#code-samples
>
> > I have a form where I need to check if fields are wrong or not (with
> > jquery Plugin Validation).
> > When the form is submitted and all fields ok, I need to load a page
> > into a div ('#response) using ajaxSubmit (from
> >http://www.malsup.com/jquery/form/#code-samples).
>
> > Here is my code :
> > jQuery(function() {
> >$('#response').css({ display: "none"});
> >var container = $('div#errors');
>
> >$("#Form1").validate({
> >errorContainer: container,
> >errorLabelContainer: $("ul", container),
> >wrapper: 'li',
> >meta: "validate",
> >submitHandler: function(form) {
> >$(form).ajaxSubmit({
> >target: "#response"
> >});
> >$('#response').show();
> >}
> >});
> > });
>
> > The code above works very fine everywhere.
>
> > But... the content into the div called is also another form, whitch
> > get POST datas from the first form.
> > If contents are shown right in IE and FF, it is as if IE didn't load
> > the javascript included in the ajax content loaded.
> > I have absolutly no errors with Firebug and js console, but IE tells
> > me there are errors.
>
> > Here is the content of the div loaded :
> > 
>
> > 
> > 
> >
> > 
> > 
> > fields of form are here, I don't detail them
> > 
> > 
>
> > And here is the content of paiement.js :
>
> > $(document).ready(function() {
> > var container = $('div#errorsFormPaiement');
>
> >$("#FormPaiement").validate({
> >errorContainer: container,
> >errorLabelContainer: $("ul", container),
> >wrapper: 'li',
> >meta: "validate",
> >submitHandler: function(form) {
> >alert('everything is ok, félicitations !');
> >}
> >});
>
> >$("#reset").click(function() {
> >$("#FormPaiement").resetForm();
> >$('#response').hide();
> >});
> > });
>
> > What is the problem with IE ?
> > When I click on #reset element, IE does not do anything, and when i
> > submit empty form, it does not validate the second form.
> > It is as if js is not loaded.
>
> > I tried to include js in anothers ways, encapsuled into 

[jQuery] Re: Differnce between JQuery call and Nomal call

2008-06-27 Thread DXCJames

Nevermind, problems solved:

$_SERVER['HTTP_X_REQUESTED_WITH']

On Jun 26, 9:49 pm, DXCJames <[EMAIL PROTECTED]> wrote:
> Is there anyway to tell the difference between a JQuery call and a
> Normal? Preferably in PHP?
>
> I dont know if that is a detailed enough question but i dont really
> know how else to ask and I wasnt sure how to search for it in the
> group either so i just started a new topic.. Thanks!!
>
> James


[jQuery] Re: jquery Plugin Validation + jquery Form Plugin

2008-06-27 Thread Fred Boucher

I send an answer but I don't see it.
So, you were right.
Thank you very much for your help, Jörn :)

On 27 juin, 14:56, "Jörn Zaefferer" <[EMAIL PROTECTED]>
wrote:
> Try to put the script you load into the ajaxSubmit-success-callback,
> instead of loading it together with the HTML. That should be much more
> reliable.
>
> Jörn
>
> On Fri, Jun 27, 2008 at 2:43 PM, Fred Boucher <[EMAIL PROTECTED]> wrote:
>
> > I have a problem using two plugins with Jquery :
> >http://bassistance.de/jquery-plugins/jquery-plugin-validation/
> > and
> >http://www.malsup.com/jquery/form/#code-samples
>
> > I have a form where I need to check if fields are wrong or not (with
> > jquery Plugin Validation).
> > When the form is submitted and all fields ok, I need to load a page
> > into a div ('#response) using ajaxSubmit (from
> >http://www.malsup.com/jquery/form/#code-samples).
>
> > Here is my code :
> > jQuery(function() {
> >$('#response').css({ display: "none"});
> >var container = $('div#errors');
>
> >$("#Form1").validate({
> >errorContainer: container,
> >errorLabelContainer: $("ul", container),
> >wrapper: 'li',
> >meta: "validate",
> >submitHandler: function(form) {
> >$(form).ajaxSubmit({
> >target: "#response"
> >});
> >$('#response').show();
> >}
> >});
> > });
>
> > The code above works very fine everywhere.
>
> > But... the content into the div called is also another form, whitch
> > get POST datas from the first form.
> > If contents are shown right in IE and FF, it is as if IE didn't load
> > the javascript included in the ajax content loaded.
> > I have absolutly no errors with Firebug and js console, but IE tells
> > me there are errors.
>
> > Here is the content of the div loaded :
> > 
>
> > 
> > 
> >
> > 
> > 
> > fields of form are here, I don't detail them
> > 
> > 
>
> > And here is the content of paiement.js :
>
> > $(document).ready(function() {
> > var container = $('div#errorsFormPaiement');
>
> >$("#FormPaiement").validate({
> >errorContainer: container,
> >errorLabelContainer: $("ul", container),
> >wrapper: 'li',
> >meta: "validate",
> >submitHandler: function(form) {
> >alert('everything is ok, félicitations !');
> >}
> >});
>
> >$("#reset").click(function() {
> >$("#FormPaiement").resetForm();
> >$('#response').hide();
> >});
> > });
>
> > What is the problem with IE ?
> > When I click on #reset element, IE does not do anything, and when i
> > submit empty form, it does not validate the second form.
> > It is as if js is not loaded.
>
> > I tried to include js in anothers ways, encapsuled into 

[jQuery] Re: Odd image button issue in IE

2008-06-27 Thread Hilmar Kolbe
Works for me on XP IE7/IE8 - except that on IE8 the pictures on the right
overlay the menu-bars...

2008/6/26 Andy Matthews <[EMAIL PROTECTED]>:

>
> Anyone have any ideas about this oddity?
>
> On Jun 25, 7:23 pm, Andy Matthews <[EMAIL PROTECTED]> wrote:
> > My client has discovered an interesting issue with the nav on a small
> > site that I built out for him, and it only seems to happen in IE:
> >
> > http://www.sdiarchitects.com/home.php
> >
> > 1) Click on a button, "Clients" for example.
> > 2) Then click on another button, like "Contact Us".
> > 3) If you click your back button, the text is missing from the button.
> >
> > The only thing that I can think of is that it's got to be caching the
> > display property of the button somehow. But I've never seen this
> > happen before. Anyone have any ideas?
>


[jQuery] MaxLength and Strict sequence validation is not happening

2008-06-27 Thread Rudra

Hello Below is the code snippet i am using in Xml parsing against XSD

Parsing is showing succesfull even if i give TransactionRef more than
30 character in xml.
Any suggestion what should be wrong.What will be the root cause



Transaction reference for a given transaction.
Note:
Same reference is sent back in response 










[jQuery] Re: iFixPng Improved

2008-06-27 Thread Isaak Malik
I should really try this out, I had issues with IE not applying the PNG fix
on images that were hidden so I had to apply the fix to those elements every
time I created an effect or any kind of animation.

Many thanks

On Tue, Jun 24, 2008 at 7:19 PM, Yereth <[EMAIL PROTECTED]> wrote:

>
> After using my own flavour of iFixPng for a long time now, I decided
> it was time to publish it, so the community can make use of it as
> well.
>
> Although the performance will be a bit slower, it has 2 important
> improvements to make the use of transparent PNGs more painless in IE6:
>
>* The image or element with a background image doesn't have to be
> visible for the fix to work.
>* background-position in all possible formats is now supported,
> including an IE absolute position fix. (bottom: -1px || bottom: 0px)
>
> If you see any improvements in functionality or performance, please
> let me know.
>
> The plugin can be found here:
> http://plugins.jquery.com/project/iFixPng2
>
> Cheers!
> Yereth
>
>


-- 
Isaak Malik
Web Developer


[jQuery] Re: Trying to use jQuery to do the same effect on multiple links.

2008-06-27 Thread Pegpro

@Steen Thanks that was perfect! Worked great!
@Gordon I had tried that before and for some reason it didn't work
@Donb Thanks for your help! it was very similar to Steen's

I have this working now. However in IE nothing happens, it starts to
slide but stops about 25% of the way up then nothing happens. Any idea
what is wrong?

On Jun 27, 10:16 am, Steen Nielsen <[EMAIL PROTECTED]> wrote:
> Another thing you can do instead of giving every link a class, you can
> give the container a class and select the links in that container.
> example html:
>
> 
>   
>     test1
>     test2
>     test3
>     test4
>   
> 
>
> use this selector: jQuery('.menu a')
>
> That way you will get every link inside the div with the class "menu"
> You probably already have a class indicating the menu position for the
> css.. you can just use that selector
>
> On Jun 26, 11:40 pm, Pegpro <[EMAIL PROTECTED]> wrote:
>
> > I am currently using:
> >                 jQuery.noConflict();
> >                 jQuery(document).ready(function(){
> >                         jQuery(\"a:contains('Home')\").click(function(e){
> >                                 e.preventDefault();
> >                                 var link = jQuery(this), link = 
> > link.attr('href');
> >                                 jQuery('#loading').fadeIn(200)
> >                                 jQuery('.wrap').slideUp(600, function(){
> >                                                 setTimeout('window.location 
> > = link', 500);
> >                                 });
> >                 });
> > Instead of duplicating this for everylink in the menu is there a way I
> > can use a or statement within this line:
> > jQuery(\"a:contains('Home')\").click(function(e){
>
> > Thanks for your help in advance!


[jQuery] Re: AutoComplete and Validation

2008-06-27 Thread shapper

I am using ASP.NET MVC ...

So the autocomplete list is defined on the server and accessed on HTML
using something like:
<%= MyModel.ViewData.TagList.ToString %>

Can I use something like this to define the validation?

Thanks,
Miguel

On Jun 27, 1:59 pm, "Jörn Zaefferer" <[EMAIL PROTECTED]>
wrote:
> Depending on where your autocomplete data is coming from, you could
> use a custom method (local data) or the remote method (remote data).
>
> http://docs.jquery.com/Plugins/Validation/Validator/addMethodhttp://docs.jquery.com/Plugins/Validation/Methods/remote
>
> Jörn
>
> On Fri, Jun 27, 2008 at 2:42 AM, shapper <[EMAIL PROTECTED]> wrote:
>
> > Hello,
>
> > I am using AutoComplete with Validation. Can I create a validation
> > that accepts only values from the autocomplete?
>
> > For example if the autocomplete list is:
> > "New York, London, Lisbon, Paris"
>
> > Then the following would be accepted:
> > "New York, London"
> > "New York"
> > "Lisbon,    Paris  "
> > "    London,Paris,Lisbon"
>
> > But not:
> > "New York, Rome"
> > "Moscow"
>
> > Is this possible?
>
> > Thanks,
> > Miguel


[jQuery] Re: jQuery powered Plazes acquired by Nokia

2008-06-27 Thread RobG



On Jun 23, 6:41 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> All,
>
> I'm happy to announce that jQuery powered service Plazes has been
> aquired ny Nokia. W0t!!!1!

Which part uses jQuery?  The linked article says that the iPhone
version is an SDK application.


--
Rob


[jQuery] [Tutorial] Use jQuery and ASP.NET AJAX to build a client side Repeater

2008-06-27 Thread Rey Bango


From Encosia.com:

Use jQuery and ASP.NET AJAX to build a client side Repeater

http://encosia.com/2008/06/26/use-jquery-and-aspnet-ajax-to-build-a-client-side-repeater/

Rey...


[jQuery] [PLUGIN] glowbuttons

2008-06-27 Thread Rey Bango


Matt Berseth published his first jQuery plugin called glowButtons:

http://mattberseth.com/blog/2008/06/glowbuttons_writing_my_first_j.html

Rey


[jQuery] Re: [validate] automatically clear error messages when pass validation rule?

2008-06-27 Thread Jörn Zaefferer

Looks like your markup is invalid: The form doesn't surround the
table, instead its closed instantly. Its weird that the validation
works at least in parts.

This is the rendered html:


 <-- closed!
...


Jörn

On Thu, Jun 26, 2008 at 6:39 PM, Josh Joy <[EMAIL PROTECTED]> wrote:
> Sorry, try here
> http://snippets.dzone.com/posts/show/5700
>
> On Thu, Jun 26, 2008 at 2:50 AM, Jörn Zaefferer
> <[EMAIL PROTECTED]> wrote:
>>
>> I don't see an attachment - could you upload that somewhere?
>>
>> On Wed, Jun 25, 2008 at 11:57 PM, Josh Joy <[EMAIL PROTECTED]> wrote:
>> > Ok, I have attached a sample html.
>> >
>> > It seems that using tables is causing some confusion? I'm not sure.
>> >
>> > Hope you can pinpoint what I'm doing wrong.
>> >
>> > Note > > value=""/>
>> > I'm using spring so it does the data object binding for me which is the
>> > reason for the name. I changed the id to "password" cuz I was figuring
>> > that
>> > the Javascript jquery validate lookups were done by id.
>> >
>> > Thanks,
>> > Josh
>> >
>> >
>> > On Wed, Jun 25, 2008 at 1:23 PM, Jörn Zaefferer
>> > <[EMAIL PROTECTED]> wrote:
>> >>
>> >> That looks like a bug. Once a label is inserted, its supposed to be
>> >> updated and not appended again. Could you upload a testpage and post
>> >> the url?
>> >>
>> >> Jörn
>> >>
>> >> On Wed, Jun 25, 2008 at 6:00 PM, Josh Joy <[EMAIL PROTECTED]> wrote:
>> >> > I mean remove the error messages. Whenever I hit submit, and if a
>> >> > field
>> >> > still does not pass the validation rule, the old error message
>> >> > remains,
>> >> > and
>> >> > the same message gets appended twice.
>> >> >
>> >> > simple example
>> >> >
>> >> > (error message)
>> >> > input field
>> >> > [submit]
>> >> >
>> >> > I click submit, and input field still doesnt pass, now my page has
>> >> > (error message)
>> >> > (error message)
>> >> > input field
>> >> > [submit]
>> >> >
>> >> > So, how come the error message isn't being cleared?
>> >> >
>> >> > I had to add a custom errorPlacement override, though there are still
>> >> > cases
>> >> > it doesnt work properly, for example if I make sure two passwords are
>> >> > the
>> >> > same.
>> >> >
>> >> > Here is my code snippet, please let me know what I am configuring
>> >> > wrong.
>> >> > If
>> >> > I have the replaceWith line commented out (as below) then the error
>> >> > messages
>> >> > dont clear.
>> >> >
>> >> >   
>> >> >
>> >> >   $(document).ready(function(){
>> >> > $("#command").validate({
>> >> >   errorPlacement: function(label, element) {
>> >> > //$(element).prev(".error").replaceWith("");
>> >> > label.insertBefore( element );
>> >> >
>> >> >   },
>> >> >
>> >> >   rules: {
>> >> > "profileBean.loginEmail": {
>> >> > required: true,
>> >> > minlength: 5,
>> >> >   email:true
>> >> > },
>> >> > "password": {
>> >> >
>> >> >   required:true,
>> >> >   minlength:5
>> >> >   },
>> >> >   "passconfirm":{
>> >> >   required:true,
>> >> >   minlength:5,
>> >> >   equalTo:"#password"
>> >> >
>> >> >   }
>> >> >   },
>> >> >   messages:{
>> >> >   "profileBean.loginEmail":{
>> >> >   required:"Email must be supplied",
>> >> >   minlength:"specify at least 5
>> >> > characters",
>> >> >
>> >> >   }
>> >> >}
>> >> > });
>> >> >   });
>> >> >   
>> >> >
>> >> >   
>> >> >
>> >> > 
>> >> >
>> >> > > >> > name="profileBean.loginEmail"
>> >> > class="inputFld" type="text" value=""/>
>> >> > 
>> >> > 
>> >> >
>> >> >
>> >> > > >> > class="inputFld"
>> >> > type="password" value=""/>
>> >> > 
>> >> > 
>> >> >
>> >> > > >> > class="inputFld" />
>> >> > 
>> >> > 
>> >> > 
>> >> >
>> >> >
>> >> > Thanks,
>> >> > Josh
>> >> >
>> >> >
>> >> > On Wed, Jun 25, 2008 at 3:22 AM, Jörn Zaefferer
>> >> > <[EMAIL PROTECTED]> wrote:
>> >> >>
>> >> >> What are you referring to with "clear"? They are hidden by default,
>> >> >> isn't that enough?
>> >> >>
>> >> >> Jörn
>> >> >>
>> >> >> On Wed, Jun 25, 2008 at 4:26 AM, Josh Joy <[EMAIL PROTECTED]>
>> >> >> wrote:
>> >> >> > Hi,
>> >> >> >
>> >> >> > How do I clear the error messages when it passes the validation
>> >> >> > rules? I
>> >> >> > was
>> >> >> > hoping it would clear automatically. Is there some value I need to
>> >> >> > set
>> >> >> > or
>> >> >> > some configuration necessary?
>> >> >> >
>> >> >> > Thanks,
>> >> >> > Josh
>> >> >> >
>> >> >
>> >> >
>> >
>> >
>> > Email Address
>> > Password
>> > Re-enter password
>> >
>> >
>
>


[jQuery] Re: AutoComplete and Validation

2008-06-27 Thread Jörn Zaefferer

Depending on where your autocomplete data is coming from, you could
use a custom method (local data) or the remote method (remote data).

http://docs.jquery.com/Plugins/Validation/Validator/addMethod
http://docs.jquery.com/Plugins/Validation/Methods/remote

Jörn

On Fri, Jun 27, 2008 at 2:42 AM, shapper <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I am using AutoComplete with Validation. Can I create a validation
> that accepts only values from the autocomplete?
>
> For example if the autocomplete list is:
> "New York, London, Lisbon, Paris"
>
> Then the following would be accepted:
> "New York, London"
> "New York"
> "Lisbon,Paris  "
> "London,Paris,Lisbon"
>
> But not:
> "New York, Rome"
> "Moscow"
>
> Is this possible?
>
> Thanks,
> Miguel
>


[jQuery] Re: [Treeview] Dynamically adding nodes to the async treeview

2008-06-27 Thread Jörn Zaefferer

To avoid putting it all into one unreadable line.

Jörn

On Fri, Jun 27, 2008 at 3:00 AM, Alexsandro_xpt <[EMAIL PROTECTED]> wrote:
>
> Jorn, Why you always declare a new JS var?
>
>
> --
> www.alexsandro.com.br
>
>
>
> On 22 jun, 16:14, "Jörn Zaefferer" <[EMAIL PROTECTED]>
> wrote:
>> Just use jQuery methods to find the node:
>>
>> var node = $("...").appendTo("#products .someNode");
>> ...
>>
>> Jörn
>>
>> On Sun, Jun 22, 2008 at 2:25 PM, SirHoundalot <[EMAIL PROTECTED]> wrote:
>>
>> > Hi all
>>
>> > I'm using the async version of the treeview plugin by Jörn Zaefferer.
>> > I'd really like the ability to dynamically add nodes to the treeview,
>> > but am experiencing some difficulties in doing so.
>>
>> > Currently I've managed to get top-level leaf nodes added using the
>> > following code:
>>
>> > function addNode(cssClass,newName){
>> >var node = $("> > class='"+cssClass+"'>"+newName+"> > ul>").appendTo("#products");
>> >$("#products").treeview({add: node});}
>>
>> > where #products is the id of the ul that contains the tree.
>>
>> > I can't work out how to add nodes elsewhere in the hierarchy though -
>> > is there a way to specify which parent to add the new nodes to?
>>
>> > Thanks!
>


[jQuery] Re: jquery Plugin Validation + jquery Form Plugin

2008-06-27 Thread Jörn Zaefferer

Try to put the script you load into the ajaxSubmit-success-callback,
instead of loading it together with the HTML. That should be much more
reliable.

Jörn

On Fri, Jun 27, 2008 at 2:43 PM, Fred Boucher <[EMAIL PROTECTED]> wrote:
>
> I have a problem using two plugins with Jquery :
> http://bassistance.de/jquery-plugins/jquery-plugin-validation/
> and
> http://www.malsup.com/jquery/form/#code-samples
>
> I have a form where I need to check if fields are wrong or not (with
> jquery Plugin Validation).
> When the form is submitted and all fields ok, I need to load a page
> into a div ('#response) using ajaxSubmit (from
> http://www.malsup.com/jquery/form/#code-samples).
>
> Here is my code :
> jQuery(function() {
>$('#response').css({ display: "none"});
>var container = $('div#errors');
>
>$("#Form1").validate({
>errorContainer: container,
>errorLabelContainer: $("ul", container),
>wrapper: 'li',
>meta: "validate",
>submitHandler: function(form) {
>$(form).ajaxSubmit({
>target: "#response"
>});
>$('#response').show();
>}
>});
> });
>
> The code above works very fine everywhere.
>
> But... the content into the div called is also another form, whitch
> get POST datas from the first form.
> If contents are shown right in IE and FF, it is as if IE didn't load
> the javascript included in the ajax content loaded.
> I have absolutly no errors with Firebug and js console, but IE tells
> me there are errors.
>
> Here is the content of the div loaded :
> 
>
> 
> 
>
> 
> 
> fields of form are here, I don't detail them
> 
> 
>
> And here is the content of paiement.js :
>
> $(document).ready(function() {
> var container = $('div#errorsFormPaiement');
>
>$("#FormPaiement").validate({
>errorContainer: container,
>errorLabelContainer: $("ul", container),
>wrapper: 'li',
>meta: "validate",
>submitHandler: function(form) {
>alert('everything is ok, félicitations !');
>}
>});
>
>$("#reset").click(function() {
>$("#FormPaiement").resetForm();
>$('#response').hide();
>});
> });
>
>
> What is the problem with IE ?
> When I click on #reset element, IE does not do anything, and when i
> submit empty form, it does not validate the second form.
> It is as if js is not loaded.
>
> I tried to include js in anothers ways, encapsuled into 

[jQuery] jquery Plugin Validation + jquery Form Plugin

2008-06-27 Thread Fred Boucher

I have a problem using two plugins with Jquery :
http://bassistance.de/jquery-plugins/jquery-plugin-validation/
and
http://www.malsup.com/jquery/form/#code-samples

I have a form where I need to check if fields are wrong or not (with
jquery Plugin Validation).
When the form is submitted and all fields ok, I need to load a page
into a div ('#response) using ajaxSubmit (from
http://www.malsup.com/jquery/form/#code-samples).

Here is my code :
jQuery(function() {
$('#response').css({ display: "none"});
var container = $('div#errors');

$("#Form1").validate({
errorContainer: container,
errorLabelContainer: $("ul", container),
wrapper: 'li',
meta: "validate",
submitHandler: function(form) {
$(form).ajaxSubmit({
target: "#response"
});
$('#response').show();
}
});
});

The code above works very fine everywhere.

But... the content into the div called is also another form, whitch
get POST datas from the first form.
If contents are shown right in IE and FF, it is as if IE didn't load
the javascript included in the ajax content loaded.
I have absolutly no errors with Firebug and js console, but IE tells
me there are errors.

Here is the content of the div loaded :







fields of form are here, I don't detail them



And here is the content of paiement.js :

$(document).ready(function() {
var container = $('div#errorsFormPaiement');

$("#FormPaiement").validate({
errorContainer: container,
errorLabelContainer: $("ul", container),
wrapper: 'li',
meta: "validate",
submitHandler: function(form) {
alert('everything is ok, félicitations !');
}
});

$("#reset").click(function() {
$("#FormPaiement").resetForm();
$('#response').hide();
});
});


What is the problem with IE ?
When I click on #reset element, IE does not do anything, and when i
submit empty form, it does not validate the second form.
It is as if js is not loaded.

I tried to include js in anothers ways, encapsuled into  and , or included in the head of my main page, but nothing more
better.

What did I do wrong for it does not work in IE ?

Sorry for my english, I hope you can understand everything as I tried
to explain them.


[jQuery] Dojo -> jQuery

2008-06-27 Thread Christoph

I've looked around for a good information source on converting from
Dojo to jQuery.  Specifically, something that might details things to
look for when converting, gotchas, things to be careful about,
analogous packages (e.g., if you are using the subpackage X in dojo,
you should think about using subpackage Y in jQuery), etc.

Does anyone know of something like this?

thnx,
Christoph


[jQuery] Re: Code not working in IE

2008-06-27 Thread Pegpro

this is printed in php onto the page. The backslashes are to escape
the php so it doesn't end the string.

On Jun 27, 9:44 am, andrea varnier <[EMAIL PROTECTED]> wrote:
> On 27 Giu, 02:41, Pegpro <[EMAIL PROTECTED]> wrote:
>
> > IE sucks. What is wrong here?
>
> one question: why are these quotes backslashed?
>
> > jQuery(\"a:contains('Home')\")


[jQuery] Re: jtemplates performance

2008-06-27 Thread chris thatcher
Hi Andiih, I had one more thought.  I don't usually setTemplateURL abd
ibstead use setTemplateElement and have the template locally in a hidden
text area.  I was wondering if it might be the difference because of the
network communication that occurs in your case.  Might be worth a try to see
if thats the extra time drain.

Also JavaScriptTemplates from trimpath is a really great template engine as
well and really not too different syntatically than jTemplate so you should
be able to modify your templates relatively easily to use them if that what
you decide to do.

On Fri, Jun 27, 2008 at 5:53 AM, Andiih <[EMAIL PROTECTED]> wrote:

>
> Machine A
> FF3 xml to json 1380, Template Processing 619
> IE6 xml to json 1782, Template Processing 22593
>
> Machine B
> IE7 xml to json 765, Template Processing 8579
> FF2 xml to json 2094, Template Processing 1492
> FF3 Beta xml to json 1151, Template Processing 1054
>
> Machine C
> IE 7 Xml to json 1187, Template Processing 9344
> FF 2 Xml to json 3281, Template Processing 1328
>
> OK - its the tempaltes.  Will try the other template engine above...or
> perhaps I should consider xml/xsl and skip the json step ? I think I
> saw a jQuery xls processor somewhere...
>
> On Jun 27, 12:03 am, "chris thatcher" <[EMAIL PROTECTED]>
> wrote:
> > I think you are measuring the combined time. Try this:
> >
> > var xmltojson_start = new Date().getTime();
> > ret = $.xmlToJSON(responseXML);
> > var xmltojson_stop = new Date().getTime();
> >
> > var template_start = new Date().getTime();
> > $('#output2').processTemplate(ret);
> > var template_stop = new Date().getTime();
> > alert(""+
> >   "\n\tXml to Json: " + (xmltojson_stop - xmltojson_start) +
> >   "\n\tTemplate Processing: " + (template_stop - template_start)
> +
> > "\n");
> >
> >
> >
> > On Thu, Jun 26, 2008 at 4:36 PM, Andiih <[EMAIL PROTECTED]> wrote:
> >
> > > Jack, I'll take a look
> > > Chris, I *think* the timing code I've added in my sample above is only
> > > timing the template step ?
> >
> > > I've had the opportunity to try this out this afternoon on a number of
> > > machines in the organization, and noted a couple of things...
> > > Its quick in FF3 (which I didn't expect given what I have been
> > > reading)
> > > Its *usually* a lot slower in IE than FF, but some machines are the
> > > opposite.
> >
> > > So, I need to revise the question : what browser configuration
> > > changes, plugins, settings etc might make a *huge* difference to inter-
> > > browser performance ?
> >
> > > I'll see if JavaScriptTemplates looks like I can integrate it, and re-
> > > test.
> >
> > > TIA
> >
> > > Andrew
> >
> > > On Jun 26, 6:02 pm, "chris thatcher" <[EMAIL PROTECTED]>
> > > wrote:
> > > > Andiih, just curious becuase I use jtemplates and havent seen that
> issue,
> > > > though can you verify that the slow code is not 'xmlToJSON'.  I have
> seen
> > > > the marshalling process take up a lot of time in IE when the xml is
> > > > substantial in size .
> >
> > > > Thatcher
> >
> > > > On Thu, Jun 26, 2008 at 12:30 PM, Jack Killpatrick <[EMAIL PROTECTED]>
> > > wrote:
> >
> > > > > I don't know how it compares as far as speed, but you might want to
> try
> > > > > this:
> >
> > > > >http://code.google.com/p/trimpath/wiki/JavaScriptTemplates
> >
> > > > > We've been using it for more than a year on many of our projects,
> > > including
> > > > > some with large table row outputs, and it's worked for us.
> >
> > > > > - Jack
> >
> > > > > Andiih wrote:
> >
> > > > >> I am using jTemplates (jquery-jtemplates.js) to render a large xml
> > > > >> response by running xmlToJSON then processTemplate.  Although the
> code
> > > > >> works fine, and performance in FF2.0 is acceptable (2672ms) on my
> test
> > > > >> system, I am getting a result of 9827ms when running in IE7.  Is
> there
> > > > >> a known performance issue with jtemplates ?  Are other templte
> modules
> > > > >> better ?
> >
> > > > >> (p.s. the real world code uses jQuery Form plugin and web
> services,
> > > > >> but the sample below reproduces the issue)
> >
> > > > >> Code, and template follow.
> >
> > > > > ... snip...
> >
> > > > --
> > > > Christopher Thatcher
> >
> > --
> > Christopher Thatcher
>



-- 
Christopher Thatcher


[jQuery] Re: jQuery powered Plazes acquired by Nokia

2008-06-27 Thread Karl Swedberg


Hey Klaus,

Sorry I got to this thread quite late, but anyway, congratulations on  
the huge news! I hope the acquisition results in lots of great new  
opportunities for you (and lots of money, too. ;) ).


Cheers,

--Karl

Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Jun 23, 2008, at 6:13 PM, Klaus Hartl wrote:



Thanks again to all of you for the noce words! Yes, I'm staying on
board! :-)


--Klaus



On Jun 23, 4:59 pm, Brice Burgess <[EMAIL PROTECTED]> wrote:

Klaus,

  Congradulations man! They're lucky to have you and your talented
work. Are you going to stay on board? Keep it up!

~ Brice

On Jun 23, 3:41 am, Klaus Hartl <[EMAIL PROTECTED]> wrote:


All,



I'm happy to announce that jQuery powered service Plazes has been
aquired ny Nokia. W0t!!!1!


http://www.techcrunch.com/2008/06/23/breaking-germanys-plazes-acquire 
...



Cheers, Klaus




[jQuery] Re: Concern: quality of plugin library submissions

2008-06-27 Thread Jörn Zaefferer

The idea of reviewing plugins and putting the good ones on a list is
even older then the plugin repository. And just reviewing for the sake
of reviewing isn't really practical.

In the long term I hope to see more and more components finding their
way into jQuery UI, or subprojects of jQuery UI (like effects).

Lets consider Josh's watermark plugin:
http://digitalbush.com/projects/watermark-input-plugin
It works well, but lacks certain features, ie. no support for password
fields. If you look at plugins.jquery.com for alternatives, you'll
find plenty.
In the long run, a jQuery UI Forms subproject could include the
watermark plugin, providing the quality and flexibility you can expect
from an official jQuery project.

Apart from that, a reusable template, or just some documentation, for
creating plugin pages could help. In that respect, you're welcome to
improve and promote the plugin authoring guide:
http://docs.jquery.com/Plugins/Authoring

Jörn

On Fri, Jun 27, 2008 at 1:12 AM, donb <[EMAIL PROTECTED]> wrote:
>
> I'm finding what seems like a lot of plugins that:
>
> a. Don't follow the structure of the 'home page, documentation,
> demonstration' pattern
>
> b. Have dead links to the code/docs
>
> c. Plugins that are marginally 'jqueryized' (for instance a Dynamic
> Drive component I came across with a minor reference to jquery but the
> bulk of it's code is run of the mill javascript.
>
> d. Seem to be poorly described as to intent/purpose
>
> e. Seem to be quickly-knocked-out and/or not well thought out, almost
> as if for the sake of just getting something published with their name
> on it.
>
> Now I may just be overly critical, since I don't see any discussion on
> this.  But as the plugin list has grown, it's getting more and more
> difficult to find quality information.
>
> Well, there's my 2 cents...  Fire away!
>
> As a 'well what do you suggest be done about it?' starting point -
> perhaps a link to 'suggest improvement' that would email the developer
> or others, could be added?  Or a simpler 'does not conform' link that
> simply marks the plugin project pages as needing cleanup.
>
> Perhaps a way for the general community to directly work on the
> plugins documentation to cleanup the deficiencies?  Tough, that one
> because most link off to someone's personal webspace, I know.
>
> Anyway I hope this is taken in the spirit of 'making it better' and
> not idle griping.  I fear jQuery may be getting smothered by it's very
> success.
>
>


[jQuery] autocomplete doesn't trigger result when using autofill

2008-06-27 Thread Adam

Hi,

I have the code below on my page.  The bindBehaviours function is used
as the page is loaded via an AJAX call in a jQuery UI Tab.  I want the
autocomplete to check the value is in the list and to add the
engineerID to a hidden field based on the EngineerName selected in the
autocomplete box.  The EngineerID is returned with the Name from
s_engineer_list.php.  The code to set the EngineerID is not present
below I just want to see the results working in the alerts before
adding this bit of the code.

I was using the following code but this only works if the item in the
autocomplete dropdown is clicked on or if selected by cursor and then
the enter key pressed.  It doesn't work if the data is "auto-filled"
and then the focus moved to the next input box.

$("#EngineerName", scope).result(function(event, data, formatted) {
if (data)
 $("#EngineerID", scope).val(data[1]);
});

Thanks for your help,

Adam

PAGE CODE STARTS HERE

var bindBehaviors = function(scope) {
  $("#EngineerName", scope).autocomplete("s_engineer_list.php", {
onItemSelect: selectItem,
onFindValue: findValue,
autoFill: true,
selectFirst: false
  });
}

bindBehaviors(this);

function selectItem(li) {
 findValue(li);
}

function findValue(li) {
 if( li == null ) return alert("No match!");

 if( !!li.extra ){
var sValue = li.extra[0];
 } else{
var sValue = li.selectValue;
 }
 alert("The value you selected was: " + sValue);
}


[jQuery] Re: submitting a form by pressing enter

2008-06-27 Thread tlob

Hy Steen

I totally agree with you.

And I did not know the CSS display:none will break the submit. Good to
know! THX.

cheers
tl

On Jun 27, 11:35 am, Steen Nielsen <[EMAIL PROTECTED]> wrote:
> A lot of browsers support usage without JS and CSS. Especially mobile
> devices or screenreaders have very bad JavaScript support, and
> screenreaders "read" the content of the page as it's shown without
> CSS.
>
> Even though we can argue for a long time whether or not it's a good
> idea to only support clients that have JS and CSS activated, it's all
> beside the point.
> My point was that if you have a  around your input fields, then
> it's easier to actually insert the submit button and through
> stylesheet, move it outside the viewable scope.
>
> You can't really use display: none; on the submit button. For some
> browsers it will remove the action of the button, so you are back to
> square one.. :)
>
> Oh, and lastly, why invent new things, when existing ones do exactly
> what is requested :)
>
> On Jun 26, 12:25 pm, tlob <[EMAIL PROTECTED]> wrote:
>
> > A page is read without css? Hmmm I think that is really really really
> > rare Even more rare than a browser without js turned on. Thats
> > only really really rare ;-)
>
> > Or what do you mean?
>
> > instead of moving it away, why not css display:none;? Does this brake
> > the submit?
> > cheers
> > tl
>
> > On Jun 26, 10:22 am, Steen Nielsen <[EMAIL PROTECTED]> wrote:
>
> > > You need to insert a submit button in the form to get it working..
> > > 
>
> > > if you don't want to show the button you can always hide it using CSS.
> > > I usually just positioning it -9000px to the left, that way it won't
> > > show up, but if the page is read without CSS, it will be shown
> > > correctly with a submit button
>
> > > On Jun 26, 6:20 am, "[EMAIL PROTECTED]"
>
> > > <[EMAIL PROTECTED]> wrote:
> > > > Hi,
>
> > > > I have a form, with id="myForm", with a number of text fields (input
> > > > with type="text").  How do I cause a form submission by pressing enter
> > > > in any of those form fields?
>
> > > > Thanks, - Dave


[jQuery] Re: make credit card validator allow spaces

2008-06-27 Thread Scott González

The problem with making that the default behavior is that you will
need to strip out the spaces on the server.

You could use addMethod() to create a new method which just strips out
the spaces and then calls the existing credit card validation method.

On Jun 27, 3:52 am, rupurt <[EMAIL PROTECTED]> wrote:
> Is it possible to add support for spaces in the credit card validator?


[jQuery] Re: Using noConflict with links

2008-06-27 Thread Scott González

var $this = jQuery(this), link = $this.attr('href');

or use a closure:

(function($) {
var $this = $(this), link = $this.attr('href');
})(jQuery);


On Jun 26, 6:11 pm, Pegpro <[EMAIL PROTECTED]> wrote:
>  I am using this line:
> var $this = $(this), link = $this.attr('href');
>
> However I have had to use jQuery.noConflict()
> How do I use jQuery() with this?


[jQuery] Re: Validate plugin: RFC2822 compliant emails

2008-06-27 Thread Scott González

No problem.  The interesting thing is that the more you comply with
the RFC, the more likely you are to allow someone to accidentally
enter an incorrect email address.  The webforms plugin addresses this
by following the spec as closely as possible and just ensuring that
the form of the address is valid.  The validation plugin addresses
this by reviewing all user requests/complaints and making adjustments
based on actual and expected results.  So while the validation plugin
will be more strict (disallowing certain valid email addresses), it is
extremely unlikely that any public email addresses actually in use
will fail validation with the default email method.


On Jun 26, 10:50 am, AstroIvan <[EMAIL PROTECTED]> wrote:
> Sounds great Scott.  First my apologies, as it seems my post was a
> little pre-emptive.  The specific case I got in a bug report was that
> + signs were not being allowed by the client validation.  This is
> incorrect as I've double tested it after looking at your test cases,
> and it looks like you guys are already taking care of it
> appropriately; it was our server-side validation that was incorrectly
> catching it.
>
> Also, since my post I've found that the javascript function I've
> referenced is actually incorrect as well, as it doesn't check for more
> than one at sign outside of quotations.
>
> Ultimately we're trying to stay as close as possible to the rfc
> definition as our site expects some visibility on our registration
> project.
>
> Thanks both of you for responding so quickly!
>
> On Jun 26, 7:46 am, Scott González <[EMAIL PROTECTED]> wrote:
>
> > As Jörn has stated, we have intentionally gone against the RFC a bit
> > to go for a more practical approach.  The original regex was written
> > to the spec (as much as possible).  I seem to recall that while I was
> > writing the regex I thought it was actually impossible to follow the
> > spec because I had to reference several RFCs and there were
> > contradictions.  In fact, even the W3C doesn't recommend following the
> > spec (the HTML 5 spec gives specific modifications to make for
> > validation).
>
> > In a month or two, I will be writing scripts to produce custom regexes
> > for IRI and email validation, so that should cover whatever your needs
> > are.  At the same time I will be updating the regexes in the webforms
> > plugin, which will follow the HTML 5 rules exactly (they're pretty
> > close right now - closer than what we use in the validation plugin).
>
> > Feel free to contact me directly if you'd like more information on
> > this.
>
> > On Jun 25, 11:11 am, AstroIvan <[EMAIL PROTECTED]> wrote:
>
> > > Looks like the default email validation isn't of the correct version.
> > > My team is going with this as a custom validator, but the validate
> > > plugin might want to update
>
> > >http://en.wikibooks.org/wiki/JavaScript/Best_Practices-Hide quoted text -
>
> > - Show quoted text -


[jQuery] Re: Cycle plugin using named id's

2008-06-27 Thread Mike Alsup

> Is it possible to use named links/ids to show a particular div when
> using the pager function of the Cycle Plugin?

You can choose which elements become slides using the 'slideExpr'
option:

http://www.malsup.com/jquery/cycle/slideExpr.html


> Also, I am unable to get several of the effects to work, specifically
> any of the scroll effects (scrollLeft), turnLeft works. Currently
> testing using the code below.

Can you post a link?


[jQuery] Re: jQuery Cycle Plugin Pager mode

2008-06-27 Thread Mike Alsup

Here are some links:

http://www.malsup.com/jquery/cycle/pager2.html
http://www.malsup.com/jquery/cycle/pager3.html

On Jun 27, 4:15 am, greencode <[EMAIL PROTECTED]> wrote:
> Does anyone know how I can change the links to text links rather than
> continuous numbers? I'm new to all of this and can't seem to find it
> anywhere?
>
> http://www.malsup.com/jquery/cycle/int2.html


[jQuery] question about callbacks

2008-06-27 Thread Alexandre Plennevaux
hi mates,

how do i implement the possibility to have a callback function in my plugin?
Via eval()?


jQuery.fn.setScrollableArea = function(modifier, callback){

jQuery('body').css({
overflow: 'hidden'
});
return this.each(function(){
var offset = jQuery(this).offset();
var availableHeight = jQuery(window).height();
//alert("new height=" + availableHeight);
modifier = (typeof modifier == 'undefined') ? 0 : modifier;

var newHeight = availableHeight - offset.top - modifier;
jQuery(this).css({
height: newHeight,
overflow: 'hidden'
});
callback();
});
}


it seems to work, but i read somewhere eval() is evil() :)






-- 
Alexandre


[jQuery] Re: submitting a form by pressing enter

2008-06-27 Thread Steen Nielsen

Well, you could do this in two ways, one is to actually make it into a
form and the do something when the submit have been activated.

The other way includes what you probably are looking for.
You want to read the key that have been pressed. For this you need to
register the keycode on the key down event on every input field inside
the div.

It should be something like this (although it have not been tested):

$('#myDiv :input').keydown(function(e){
  if (e.keyCode==13) {
//do something when the enter key have been pressed - Enter key
have the keycode of 13
  }
});

On Jun 26, 7:45 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Thanks for your replies.  I have a follow up question.  Let's say I
> have a bunch of inputs, type="text" within a div with id="myDiv".  How
> do trigger an action if someone presses enter within one of those text
> fields?  This would not be a form submission necessarily.
>
>  - Dave
>
> On Jun 26, 5:25 am, tlob <[EMAIL PROTECTED]> wrote:
>
> > A page is read without css? Hmmm I think that is really really really
> > rare Even more rare than a browser without js turned on. Thats
> > only really really rare ;-)
>
> > Or what do you mean?
>
> > instead of moving it away, why not css display:none;? Does this brake
> > the submit?
> > cheers
> > tl
>
> > On Jun 26, 10:22 am, Steen Nielsen <[EMAIL PROTECTED]> wrote:
>
> > > You need to insert a submit button in the form to get it working..
> > > 
>
> > > if you don't want to show the button you can always hide it using CSS.
> > > I usually just positioning it -9000px to the left, that way it won't
> > > show up, but if the page is read without CSS, it will be shown
> > > correctly with a submit button
>
> > > On Jun 26, 6:20 am, "[EMAIL PROTECTED]"
>
> > > <[EMAIL PROTECTED]> wrote:
> > > > Hi,
>
> > > > I have a form, with id="myForm", with a number of text fields (input
> > > > with type="text").  How do I cause a form submission by pressing enter
> > > > in any of those form fields?
>
> > > > Thanks, - Dave- Hide quoted text -
>
> > - Show quoted text -


[jQuery] Re: jtemplates performance

2008-06-27 Thread Andiih

Machine A
FF3 xml to json 1380, Template Processing 619
IE6 xml to json 1782, Template Processing 22593

Machine B
IE7 xml to json 765, Template Processing 8579
FF2 xml to json 2094, Template Processing 1492
FF3 Beta xml to json 1151, Template Processing 1054

Machine C
IE 7 Xml to json 1187, Template Processing 9344
FF 2 Xml to json 3281, Template Processing 1328

OK - its the tempaltes.  Will try the other template engine above...or
perhaps I should consider xml/xsl and skip the json step ? I think I
saw a jQuery xls processor somewhere...

On Jun 27, 12:03 am, "chris thatcher" <[EMAIL PROTECTED]>
wrote:
> I think you are measuring the combined time. Try this:
>
> var xmltojson_start = new Date().getTime();
> ret = $.xmlToJSON(responseXML);
> var xmltojson_stop = new Date().getTime();
>
> var template_start = new Date().getTime();
> $('#output2').processTemplate(ret);
> var template_stop = new Date().getTime();
> alert(""+
>           "\n\tXml to Json: " + (xmltojson_stop - xmltojson_start) +
>           "\n\tTemplate Processing: " + (template_stop - template_start) +
> "\n");
>
>
>
> On Thu, Jun 26, 2008 at 4:36 PM, Andiih <[EMAIL PROTECTED]> wrote:
>
> > Jack, I'll take a look
> > Chris, I *think* the timing code I've added in my sample above is only
> > timing the template step ?
>
> > I've had the opportunity to try this out this afternoon on a number of
> > machines in the organization, and noted a couple of things...
> > Its quick in FF3 (which I didn't expect given what I have been
> > reading)
> > Its *usually* a lot slower in IE than FF, but some machines are the
> > opposite.
>
> > So, I need to revise the question : what browser configuration
> > changes, plugins, settings etc might make a *huge* difference to inter-
> > browser performance ?
>
> > I'll see if JavaScriptTemplates looks like I can integrate it, and re-
> > test.
>
> > TIA
>
> > Andrew
>
> > On Jun 26, 6:02 pm, "chris thatcher" <[EMAIL PROTECTED]>
> > wrote:
> > > Andiih, just curious becuase I use jtemplates and havent seen that issue,
> > > though can you verify that the slow code is not 'xmlToJSON'.  I have seen
> > > the marshalling process take up a lot of time in IE when the xml is
> > > substantial in size .
>
> > > Thatcher
>
> > > On Thu, Jun 26, 2008 at 12:30 PM, Jack Killpatrick <[EMAIL PROTECTED]>
> > wrote:
>
> > > > I don't know how it compares as far as speed, but you might want to try
> > > > this:
>
> > > >http://code.google.com/p/trimpath/wiki/JavaScriptTemplates
>
> > > > We've been using it for more than a year on many of our projects,
> > including
> > > > some with large table row outputs, and it's worked for us.
>
> > > > - Jack
>
> > > > Andiih wrote:
>
> > > >> I am using jTemplates (jquery-jtemplates.js) to render a large xml
> > > >> response by running xmlToJSON then processTemplate.  Although the code
> > > >> works fine, and performance in FF2.0 is acceptable (2672ms) on my test
> > > >> system, I am getting a result of 9827ms when running in IE7.  Is there
> > > >> a known performance issue with jtemplates ?  Are other templte modules
> > > >> better ?
>
> > > >> (p.s. the real world code uses jQuery Form plugin and web services,
> > > >> but the sample below reproduces the issue)
>
> > > >> Code, and template follow.
>
> > > > ... snip...
>
> > > --
> > > Christopher Thatcher
>
> --
> Christopher Thatcher


[jQuery] Re: Trying to use jQuery to do the same effect on multiple links.

2008-06-27 Thread Steen Nielsen

Another thing you can do instead of giving every link a class, you can
give the container a class and select the links in that container.
example html:


  
test1
test2
test3
test4
  


use this selector: jQuery('.menu a')

That way you will get every link inside the div with the class "menu"
You probably already have a class indicating the menu position for the
css.. you can just use that selector



On Jun 26, 11:40 pm, Pegpro <[EMAIL PROTECTED]> wrote:
> I am currently using:
>                 jQuery.noConflict();
>                 jQuery(document).ready(function(){
>                         jQuery(\"a:contains('Home')\").click(function(e){
>                                 e.preventDefault();
>                                 var link = jQuery(this), link = 
> link.attr('href');
>                                 jQuery('#loading').fadeIn(200)
>                                 jQuery('.wrap').slideUp(600, function(){
>                                                 setTimeout('window.location = 
> link', 500);
>                                 });
>                 });
> Instead of duplicating this for everylink in the menu is there a way I
> can use a or statement within this line:
> jQuery(\"a:contains('Home')\").click(function(e){
>
> Thanks for your help in advance!


[jQuery] [validate] make credit card validator allow spaces

2008-06-27 Thread rupurt

Is it possible to add support for spaces in the credit card validator?


[jQuery] Re: Highlight Table Row with Animate

2008-06-27 Thread briandichiara

That was exactly what I was looking for. Thanks for the quick response
and easy to follow information.

On Jun 20, 1:52 pm, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
> Color animations are not in core jQuery but are in jQuery UI Effects. If
> color animations is all you want (from UI Effects), you just need one file:
> effects.core.js, which you can get from the UI download build page:
>
> http://ui.jquery.com/download_builder/(select Effects Core)
>
> or directly here:
>
> http://dev.jquery.com/view/tags/ui/latest/ui/effects.core.js
>
> Here's the documentation:
>
> http://docs.jquery.com/UI/Effects/ColorAnimations
>
> - Richard
>
> Richard D. Worthhttp://rdworth.org/
>
> On Fri, Jun 20, 2008 at 11:18 AM, briandichiara <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > At the end of my Ajax request, I'd like to highlight a table row, so
> > to speak. Why doesn't this work:
>
> > id = 5
>
> > success: function(e){
> >$("#address"+id).css("background-color","#F9FFCF");
> >$("#address"+id).animate({backgroundColor:'#FFF'}, 800);
> > }
>
> > The first line will work, but the 2nd line does not. Any ideas?


[jQuery] Multiple Select option.. Selecting and Unselecting

2008-06-27 Thread Adi

Hi have a form as follows as follows




  



   Team A
  Team B







   




Initially when the page is loaded, both the divs are hidden. I want
the user to select one or more of the options from the select
'meetevents', and depending on which one he selects the div with the
appropriate input field (matched by the name of the input field)
should be displayed. If the user deselects the option, the input field
should be hidden.

what are the correct events to use? what should the event selector be?
I have been struggling with this.. i used click, change.. but no
luck.. Also the IE and Firefox behavior seem to be different with
whatever testing i have done so far


[jQuery] Re: jtemplates performance

2008-06-27 Thread Andiih

Arrrgggh.  You know when you read the same lines of code again and
again and can't see the obviousyou are of course correct, I'm
timing both.  I will give your code a try.

On Jun 27, 12:03 am, "chris thatcher" <[EMAIL PROTECTED]>
wrote:
> I think you are measuring the combined time. Try this:
>
> var xmltojson_start = new Date().getTime();
> ret = $.xmlToJSON(responseXML);
> var xmltojson_stop = new Date().getTime();
>
> var template_start = new Date().getTime();
> $('#output2').processTemplate(ret);
> var template_stop = new Date().getTime();
> alert(""+
>           "\n\tXml to Json: " + (xmltojson_stop - xmltojson_start) +
>           "\n\tTemplate Processing: " + (template_stop - template_start) +
> "\n");
>
>
>
> On Thu, Jun 26, 2008 at 4:36 PM, Andiih <[EMAIL PROTECTED]> wrote:
>
> > Jack, I'll take a look
> > Chris, I *think* the timing code I've added in my sample above is only
> > timing the template step ?
>
> > I've had the opportunity to try this out this afternoon on a number of
> > machines in the organization, and noted a couple of things...
> > Its quick in FF3 (which I didn't expect given what I have been
> > reading)
> > Its *usually* a lot slower in IE than FF, but some machines are the
> > opposite.
>
> > So, I need to revise the question : what browser configuration
> > changes, plugins, settings etc might make a *huge* difference to inter-
> > browser performance ?
>
> > I'll see if JavaScriptTemplates looks like I can integrate it, and re-
> > test.
>
> > TIA
>
> > Andrew
>
> > On Jun 26, 6:02 pm, "chris thatcher" <[EMAIL PROTECTED]>
> > wrote:
> > > Andiih, just curious becuase I use jtemplates and havent seen that issue,
> > > though can you verify that the slow code is not 'xmlToJSON'.  I have seen
> > > the marshalling process take up a lot of time in IE when the xml is
> > > substantial in size .
>
> > > Thatcher
>
> > > On Thu, Jun 26, 2008 at 12:30 PM, Jack Killpatrick <[EMAIL PROTECTED]>
> > wrote:
>
> > > > I don't know how it compares as far as speed, but you might want to try
> > > > this:
>
> > > >http://code.google.com/p/trimpath/wiki/JavaScriptTemplates
>
> > > > We've been using it for more than a year on many of our projects,
> > including
> > > > some with large table row outputs, and it's worked for us.
>
> > > > - Jack
>
> > > > Andiih wrote:
>
> > > >> I am using jTemplates (jquery-jtemplates.js) to render a large xml
> > > >> response by running xmlToJSON then processTemplate.  Although the code
> > > >> works fine, and performance in FF2.0 is acceptable (2672ms) on my test
> > > >> system, I am getting a result of 9827ms when running in IE7.  Is there
> > > >> a known performance issue with jtemplates ?  Are other templte modules
> > > >> better ?
>
> > > >> (p.s. the real world code uses jQuery Form plugin and web services,
> > > >> but the sample below reproduces the issue)
>
> > > >> Code, and template follow.
>
> > > > ... snip...
>
> > > --
> > > Christopher Thatcher
>
> --
> Christopher Thatcher


[jQuery] Re: Adding hover to all table rows (tr) but the first one.

2008-06-27 Thread ..:: sheshnjak ::..

> >> How can I have it not hover the last row too?
>
> Just to expand a little on sheshnjak's point above, if it does sound like
> it's a header and footer you're trying to differentiate. If that's the case,
> may I suggest the more semantic  and  tags? They might come in
> handy.

@Dean Landolt:   Good point.

This is even better if you need to separate header and footer, of
course. This way you can even style them separatly (or have them
visible all the time while srolling long tables).


[jQuery] Trouble getting .click() Tutorial code to work in FF3

2008-06-27 Thread NBW

This tutorial code works fine in Safari 3.1.1 and Opera 9.5.0 but is
failing in FireFox 3.0.  These are all Mac OS X versions.  In the case
of FF3 when you click the link jquery.com is loaded.  The code which
adds the test class to the a element does work in FF3.


  


$(function(){
  $("a").click(function(){
event.preventDefault();
$(this).hide("slow");
  });
  $("a").addClass("test");
});

a.test { font-weight: bold; }>
  
  
http://jquery.com/";>jQuery
  



[jQuery] Cycle plugin using named id's

2008-06-27 Thread teazer

Is it possible to use named links/ids to show a particular div when
using the pager function of the Cycle Plugin?

Also, I am unable to get several of the effects to work, specifically
any of the scroll effects (scrollLeft), turnLeft works. Currently
testing using the code below.


$(function() {
$('#slideshow').cycle({
fx: 'fade',
speed:  'fast',
timeout: 0,
pager:  '#nav',
pagerAnchorBuilder: function(idx, slide) {
// return sel string for existing anchor
return '#nav li:eq(' + (idx) + ') a';
}
});
});



[jQuery] Differnce between JQuery call and Nomal call

2008-06-27 Thread DXCJames

Is there anyway to tell the difference between a JQuery call and a
Normal? Preferably in PHP?

I dont know if that is a detailed enough question but i dont really
know how else to ask and I wasnt sure how to search for it in the
group either so i just started a new topic.. Thanks!!

James


[jQuery] Re: submitting a form by pressing enter

2008-06-27 Thread Steen Nielsen

A lot of browsers support usage without JS and CSS. Especially mobile
devices or screenreaders have very bad JavaScript support, and
screenreaders "read" the content of the page as it's shown without
CSS.

Even though we can argue for a long time whether or not it's a good
idea to only support clients that have JS and CSS activated, it's all
beside the point.
My point was that if you have a  around your input fields, then
it's easier to actually insert the submit button and through
stylesheet, move it outside the viewable scope.

You can't really use display: none; on the submit button. For some
browsers it will remove the action of the button, so you are back to
square one.. :)

Oh, and lastly, why invent new things, when existing ones do exactly
what is requested :)



On Jun 26, 12:25 pm, tlob <[EMAIL PROTECTED]> wrote:
> A page is read without css? Hmmm I think that is really really really
> rare Even more rare than a browser without js turned on. Thats
> only really really rare ;-)
>
> Or what do you mean?
>
> instead of moving it away, why not css display:none;? Does this brake
> the submit?
> cheers
> tl
>
> On Jun 26, 10:22 am, Steen Nielsen <[EMAIL PROTECTED]> wrote:
>
> > You need to insert a submit button in the form to get it working..
> > 
>
> > if you don't want to show the button you can always hide it using CSS.
> > I usually just positioning it -9000px to the left, that way it won't
> > show up, but if the page is read without CSS, it will be shown
> > correctly with a submit button
>
> > On Jun 26, 6:20 am, "[EMAIL PROTECTED]"
>
> > <[EMAIL PROTECTED]> wrote:
> > > Hi,
>
> > > I have a form, with id="myForm", with a number of text fields (input
> > > with type="text").  How do I cause a form submission by pressing enter
> > > in any of those form fields?
>
> > > Thanks, - Dave


[jQuery] jQuery Cycle Plugin Pager mode

2008-06-27 Thread greencode

Does anyone know how I can change the links to text links rather than
continuous numbers? I'm new to all of this and can't seem to find it
anywhere?

http://www.malsup.com/jquery/cycle/int2.html


[jQuery] slideToggle() Doesn't Work For DIV Containing Images In IE7?

2008-06-27 Thread GaMerZ


Hi Guys,

I got a issue again with IE7. Apparently if my DIV contains an image and if
I use slideToggle() on it, the sliding works but after it slidesDown() the
image will just disappear.

 
 # Donation 

images/icons/paypal.png 

 

-
Lester Chan's Website
- http://lesterchan.net
-- 
View this message in context: 
http://www.nabble.com/slideToggle%28%29-Doesn%27t-Work-For-DIV-Containing-Images-In-IE7--tp18149747s27240p18149747.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Question about Event Handling Optimization

2008-06-27 Thread ..:: sheshnjak ::..

It actually does have a performance impact, even though we can't
always "see it" on modern processors and javascript engines for
desktop browsers. If you consider users with handheld devices that
have functionality similar to PCs (and even take media="screen"
instead of media="handheld" for styling), but have significantly less
processing capacities, then you can see that even as good and clean
code as jQuery core is preforming somewhat lazy. So, a large number of
void requests for selecting nonexistent DOM elements does have a
negative impact.

What's hapenning internaly is basically evaluating document DOM and
matching id '#very-specific-id-not-on-every-page' for every DOM
element (just to conclude that they don't exist and instead of
returning collection of objects, returning an empty collection), and
repeating that for every line with $('something_here'). Then, it goes
a step further and calls the function hover(), just to find out what
to do if it is called on empty object (probaby return void).

So if you do want to keep on with this coding strategy (or want to
avoid rewriting of already written and debugged code), you could at
least find some way of grouping events by functionality or some other
criteria and call only groups that you need, depending on specific
page content. Obvious example: you probably don't need any form
validating events for pages that don't contain forms, or AJAX events
for page with no AJAX at all... Call AJAX events group only for AJAX
pages, form events only for page containing forms and so on. You can
even let the scripts decide what groups to run by declaring which page
goes to which category (could be multiple categories). For example
declare a few group arrays:
var AJAXgroup = new Array("first-ajax-page.html","second-ajax-
page.html","third-ajax-page.html");
$(AJAXgroup).each(function(){ if
( document.location.href.indexOf(this) declare AJAX events  });
Again you will have few loops to run (and every loop impacts
performance), but if you have say 75 events declared and call only 15
that you need, it should be an improvement...

I know answer was too long, but if you got this far it was worth
writing...


[jQuery] Safari 2.0.4 crashes with append, html

2008-06-27 Thread nlo

Hi,

I try to inject some Html in a page using ajax():

//
(function($) {
/*
 * load the tab header
 * id: dom id to append content
 * currentTab: index of 'li' to mark as current
 *
 */
$.fn.loadTabbedHeader = function(o) {

var defaults = {
id: null,
currentTab: 0
};

$.extend(defaults, o);
$.ajax({
url: "../../dev/packages/received_files/html/
launchTabbedHeader.html",
success: function(html) {

$("#"+defaults.id).append(html).ready(function(){
$("#" + defaults.id + "
li").eq(defaults.currentTab).addClass("current");

});
}
});
};
})(jQuery);



It crashes with Safari 2.0.4.
Then if I had these 2 options: cache: false, dataType: "html", it
loads most of the time (still sometimes crashes). But if I try to load
the same page in another tab or just do a refresh of the page, then it
crashes again (KERN_PROTECTION_FAILURE)

When I try to use text() instead of html or append, it runs with no
problem.

Any idea about a solution?

Thanks,

Nicolas



[jQuery] Waiting for applet to be loaded

2008-06-27 Thread Jani Tiainen

I've applet on my page and I would like to chain ready() (or do it
otherwise) to wait for applet to be ready. Now page is considered
ready when applet starts to load classes. And I end up having errors
when my ready() code points to applet methods.

I tried to google for solutions but I couldn't find single one.


[jQuery] JQuery + ASP .NET Issue

2008-06-27 Thread jebberwocky

Hello all

I am new at JQuery. But, I have to say it is so kool to use. I try to
add the JQuery validate to my C# Page.
code as following:

I copy most of code from 
http://docs.jquery.com/Plugins/Validation/Methods/email#toptions

http://www.w3.org/1999/xhtml";>

Untitled Page



jQuery.validator.setDefaults({
debug: true,
success: "valid"
});;


  
  $(document).ready(function(){
$("#form1").validate({
  rules: {
TextBox1: {
  required: true,
  email: true
}
  }
});
  });
  
  #field { margin-left: .5em; float: left; }
#field, label { float: left; font-family: Arial, Helvetica, sans-
serif; font-size: small; }
br { clear: both; }
input { border: 1px solid black; margin-bottom: .5em;  }
input.error { border: 1px solid red; }
label.error {
background: 
url('http://dev.jquery.com/view/trunk/plugins/validate/
demo/images/unchecked.gif') no-repeat;
padding-left: 16px;
margin-left: .3em;
}
label.valid {
background: 
url('http://dev.jquery.com/view/trunk/plugins/validate/
demo/images/checked.gif') no-repeat;
display: block;
width: 16px;
height: 16px;
}





Required, email: 








The problem is that even the input is valid, the form will not be
submitted! Does anyone know why?

Thank you much!


  1   2   >