[jQuery] Draggable/Droppable - revert:'invalid' working on Firefox, not on Safari

2009-12-27 Thread John Arrowwood
I am creating objects on the page which are meant to be dragged and
dropped.  Here is how I am enabling it:

$(this.element).draggable({
start:P.startDragging,
stop:P.stopDragging,
revert:'valid',
containment:CONTAINER,
snap:SELECTOR,
scroll:true,
stack:{ group: SELECTOR, min: 1 },
helper:'original',
opacity:0.7,
});

$(this.element).droppable({
accept:'.card',
activeClass:false,
addClasses:false,
hoverClass:'dropHere',
tolerance:'pointer',
over:P.draggingCardOver,
out:P.draggingCardOut,
drop:P.droppedCardOn,
});

On Firefox, it behaves as expected.  Namely, if I click on a 'card' I can
drag it around to reposition it.  If I drag a card over another card, the
events for over/out are firing.  When I drop the card somewhere that is not
another card, the draggable::stop event is fired.  When I drop on to a card,
the droppable::drop event is fired, instead.

On Safari, all the events APPEAR to be fired normally.  However, once I drop
the card on another card, the card I was dragging remains slightly
transparent, and is no longer draggable.  It is as though some kind of error
condition happened during the animation of moving the card back to its
original position, and so the animation never completed, and the element is
left in a broken state.

Has anyone else ever seen this?  Any ideas what to look at in trying to
debug this?


-- 
John Arrowwood
John (at) Irie (dash) Inc (dot) com
John (at) Arrowwood Photography (dot) com
John (at) Hanlons Razor (dot) com
--
http://www.irie-inc.com/
http://arrowwood.blogspot.com/


[jQuery] Re: I would like to get value each time when one of these checkboxes will change status, how can I do that ?

2009-12-27 Thread dziobacz
thx You very much Charlie :)


On 28 Gru, 06:08, Karl Swedberg  wrote:
> You don't need to use the "change" event. The "click" event is also  
> triggered by the keyboard. When the checkbox has focus, press the  
> spacebar and see what happens.
>
> --Karl
>
> 
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On Dec 27, 2009, at 11:26 PM, Charlie Griefer wrote:
>
> > Wow.  Never even thought about that, but it makes perfect sense.
>
> > Thanks for pointing that out :)
>
> > On Sun, Dec 27, 2009 at 5:52 PM, Ami  wrote:
> > I recommend to use "change" event and not "click" event, becuase users
> > can change the checkbox without clicking (by using the keyboard).
>
> > On Dec 28, 1:17 am, Charlie Griefer  wrote:
> > > You just want the value of the one that's checked?
>
> > > $(':checkbox[name=number]').click(function() {
> > >      if ($(this).is(':checked')) alert($(this).val());
>
> > > });
>
> > > if you want the total of all checked boxes when one is clicked:
> > > 
> > >     $(document).ready(function() {
> > >         $(':checkbox[name=number]').click(function() {
> > >             var total = 0;
> > >             $(':checkbox[name=number]:checked').each(function() {
> > >                 total += parseFloat($(this).val());
> > >             });
> > >             alert(total);
> > >         });
> > >     });
> > > 
>
> > > On Sun, Dec 27, 2009 at 1:08 PM, dziobacz  
> >  wrote:
> > > > I have:
>
> > > > 
> > > > 
> > > > 
>
> > > > I would like to get value each time when one of these checkboxes  
> > will
> > > > change status, how can I do that ? For example when first checkbox
> > > > will be unchecked or second will be checked. Could You help me ?
>
> > > --
> > > Charlie Grieferhttp://charlie.griefer.com/
>
> > > I have failed as much as I have succeeded. But I love my life. I  
> > love my
> > > wife. And I wish you my kind of success.
>
> > --
> > Charlie Griefer
> >http://charlie.griefer.com/
>
> > I have failed as much as I have succeeded. But I love my life. I  
> > love my wife. And I wish you my kind of success.
>
>


Re: [jQuery] I would like to get value each time when one of these checkboxes will change status, how can I do that ?

2009-12-27 Thread 吕刚
I do not know,but i will try!

2009/12/28, Charlie Griefer :
>
> You just want the value of the one that's checked?
>
> $(':checkbox[name=number]').click(function() {
>  if ($(this).is(':checked')) alert($(this).val());
> });
>
> if you want the total of all checked boxes when one is clicked:
> 
> $(document).ready(function() {
> $(':checkbox[name=number]').click(function() {
> var total = 0;
> $(':checkbox[name=number]:checked').each(function() {
> total += parseFloat($(this).val());
> });
> alert(total);
> });
> });
> 
>
>
> On Sun, Dec 27, 2009 at 1:08 PM, dziobacz wrote:
>
>> I have:
>>
>> 
>> 
>> 
>>
>> I would like to get value each time when one of these checkboxes will
>> change status, how can I do that ? For example when first checkbox
>> will be unchecked or second will be checked. Could You help me ?
>>
>>
>>
>
>
> --
> Charlie Griefer
> http://charlie.griefer.com/
>
> I have failed as much as I have succeeded. But I love my life. I love my
> wife. And I wish you my kind of success.
>



-- 
http://www.51.la/?3143621"; target="_blank">http://img.users.51.la/3143621.asp"; style="border:none" />


Re: [jQuery] Re: I would like to get value each time when one of these checkboxes will change status, how can I do that ?

2009-12-27 Thread Karl Swedberg
You don't need to use the "change" event. The "click" event is also  
triggered by the keyboard. When the checkbox has focus, press the  
spacebar and see what happens.


--Karl


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




On Dec 27, 2009, at 11:26 PM, Charlie Griefer wrote:


Wow.  Never even thought about that, but it makes perfect sense.

Thanks for pointing that out :)

On Sun, Dec 27, 2009 at 5:52 PM, Ami  wrote:
I recommend to use "change" event and not "click" event, becuase users
can change the checkbox without clicking (by using the keyboard).

On Dec 28, 1:17 am, Charlie Griefer  wrote:
> You just want the value of the one that's checked?
>
> $(':checkbox[name=number]').click(function() {
>  if ($(this).is(':checked')) alert($(this).val());
>
> });
>
> if you want the total of all checked boxes when one is clicked:
> 
> $(document).ready(function() {
> $(':checkbox[name=number]').click(function() {
> var total = 0;
> $(':checkbox[name=number]:checked').each(function() {
> total += parseFloat($(this).val());
> });
> alert(total);
> });
> });
> 
>
> On Sun, Dec 27, 2009 at 1:08 PM, dziobacz  
 wrote:

> > I have:
>
> > 
> > 
> > 
>
> > I would like to get value each time when one of these checkboxes  
will

> > change status, how can I do that ? For example when first checkbox
> > will be unchecked or second will be checked. Could You help me ?
>
> --
> Charlie Grieferhttp://charlie.griefer.com/
>
> I have failed as much as I have succeeded. But I love my life. I  
love my

> wife. And I wish you my kind of success.



--
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I  
love my wife. And I wish you my kind of success.




Re: [jQuery] Re: I would like to get value each time when one of these checkboxes will change status, how can I do that ?

2009-12-27 Thread Charlie Griefer
Wow.  Never even thought about that, but it makes perfect sense.

Thanks for pointing that out :)

On Sun, Dec 27, 2009 at 5:52 PM, Ami  wrote:

> I recommend to use "change" event and not "click" event, becuase users
> can change the checkbox without clicking (by using the keyboard).
>
> On Dec 28, 1:17 am, Charlie Griefer  wrote:
> > You just want the value of the one that's checked?
> >
> > $(':checkbox[name=number]').click(function() {
> >  if ($(this).is(':checked')) alert($(this).val());
> >
> > });
> >
> > if you want the total of all checked boxes when one is clicked:
> > 
> > $(document).ready(function() {
> > $(':checkbox[name=number]').click(function() {
> > var total = 0;
> > $(':checkbox[name=number]:checked').each(function() {
> > total += parseFloat($(this).val());
> > });
> > alert(total);
> > });
> > });
> > 
> >
> > On Sun, Dec 27, 2009 at 1:08 PM, dziobacz 
> wrote:
> > > I have:
> >
> > > 
> > > 
> > > 
> >
> > > I would like to get value each time when one of these checkboxes will
> > > change status, how can I do that ? For example when first checkbox
> > > will be unchecked or second will be checked. Could You help me ?
> >
> > --
> > Charlie Grieferhttp://charlie.griefer.com/
> >
> > I have failed as much as I have succeeded. But I love my life. I love my
> > wife. And I wish you my kind of success.
>



-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


[jQuery] Keeping Dropdown Menu In Front of Google Ads?

2009-12-27 Thread Vik
I've got a Google ad in the top right column, and drop-down menus that
come down over it.  Often, it's a Flash ad, and the drop-down menu
gets hidden behind it.  I have put  the Google ad in a div with a low
z-index, and give the drop-down menu a high z-index. This appears to
solve it for some Google ads, but not for others. I have also read
that the way to fix this is to do as follows (per this [url=http://
www.communitymx.com/content/article.cfm?cid=E5141]link[/url]):

[code]To the Object tag, add the following parameter (opaque is shown
as an example):



To the Embed tag, add the following attribute:

wmode="opaque"[/code]

However, examining the code shows that Google has already added this,
and this doesn't appear to solve it.

Is there a way to get drop-down menus to appear over Google Flash ads,
and if so, what is it?

Thanks very much in advance to all for any info.


Re: [jQuery] Re: Finding next element

2009-12-27 Thread Karl Swedberg
You can't just use .prev() or .next() because the links are within  
list items. Instead, you'll need to do something like this:


$('a.active').parent().prev().find('a')

and this:

$('a.active').parent().next().find('a')

--Karl


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




On Dec 27, 2009, at 8:50 PM, Ami wrote:


$('.active').prev()
$('.active').next()

Rate me please if I helped.

On Dec 28, 2:30 am, Toaster  wrote:

Hello.

Example:


  
  
  


How would I be able to get find the next or previous  in relation
to the ?

I'd appreciate it if anybody could help me out with this. Thanks in
advance.




[jQuery] Re: Change "this" when binding element

2009-12-27 Thread Ami
I get an answer from John:
http://groups.google.com/group/jquery-dev/msg/9345d498c4a1d5f5

On Dec 23, 5:05 pm, Ami  wrote:
> One solution is to use the data property like:
>
> function myObj()
> {
> document.bind('scroll',this,this.myScroll);
> this.myScroll=function (data) {
>                 //Now I am trying to get this.a
>                 alert(data.a)}
>
> }
>
> But I am sure that changing the scope will work better.
>
> On Dec 23, 5:03 pm, Ami  wrote:
>
>
>
> > I am suggestion for new small feaute in jQuery.
> > add a new proeprty to "bind" function. a Scope property.
>
> > sometimes I am binding a function inside object. So I need a solution
> > to change the scope of this function.
> > something like:
> >                 $().bind('click',data,scope,function)
>
> > 
> > For Example:
>
> > function myObj()
> > {
> > this.a='1'
> > document.bind('scroll',this.myScroll);
> > this.myScroll=function () {
> >                 //Now I am trying to get this.a
> >                 alert(this.a)}
> >                 //This is make an error becuase this is an HtmlElement and 
> > not THIS
> > object}
>
> > var a=new myObj();


[jQuery] Re: [AUTOCOMPLETE]

2009-12-27 Thread Ami
Yes.
try that:

$('select').focus(
function (){$(this).attr('size',5)}
).blur( function (){$(this).attr('size',0)} )

If it.. rate me please.

On Dec 23, 9:47 pm, Jake Moon  wrote:
> Is it possible to open the select list on focus?
>
> Best regards,
>
> Jake Moon


[jQuery] Re: Function call

2009-12-27 Thread Ami
function slide() {
if ($(slide_img).attr("src")!="images/1.jpg"){
   $(slide_img).fadeOut(200,function() {
   $(slide_img).attr({src:"images/1.jpg"});
   $(slide_img).fadeIn(200);
   });}
}

OR

use can use "this" like:
function slide() {
if ($(this).attr("src")!="images/1.jpg"){
   $(this).fadeOut(200,function() {
   $(this).attr({src:"images/1.jpg"});
   $(this).fadeIn(200);
   });}
}

On Dec 26, 11:22 pm, Funktastik  wrote:
> Hi,
>
> I wrote some lines to make an element fade in & out when HOVER another
> text
> this is my script:
>
> $(sw1).hover(function () {
>             if ($(slide_img).attr("src")!="images/1.jpg"){
>                $(slide_img).fadeOut(200,function() {
>                    $(slide_img).attr({src:"images/1.jpg"});
>                    $(slide_img).fadeIn(200);
>                    }
>                    );}
>             },function(event){  /* NOTHING HERE */ }
>             );
>
> I want to define a function named "slide" then call it when HOVER like
> this:
>
> $(sw1).hover(slide(),function(event){  /* NOTHING HERE */ } );
>
> what should i write ???


[jQuery] Re: The form is not submitted onKeyDown

2009-12-27 Thread Ami
Try that:
$(document).keydown (function (e) {
if (e.ctrlKey && e.which==13) {
$('#myform').trigger('submit')
})

Let me know if it's work.
On Dec 27, 6:59 pm, Andre Polykanine  wrote:
> Hello everyone,
>
> I'm trying to sumbit the form normally as well as by pressing
> Ctrl+Enter. Yepp, the same task.
> What I'm doing is the following:
>
>                              var validator=$("#myform").validate( {
>                              // tralala, here go the rules, error
>                              messages and stuff
>                              });
>
> $(document).keydown (function (e) {
> if (e.ctrlKey && e.which==13) {
> validator.form();
>
> }
> });
>
> then I'm trying to submit. If I do something wrong (for example, leave
> a required field blank) and press Ctrl+Enter, Validator gently tells
> me that yes, that field is required, go on and fill it in. But if I
> fill in the field and do everything correctly, pressing Ctrl+Enter
> gives absolutely nothing: no errors and no submit. the simple click on
> the Submit button, however, does give the expected result.
> Where am I wrong?
> Thanks!
>
> --
> With best regards from Ukraine,
> Andre
> Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon @ 
> jabber.org
> Yahoo! messenger: andre.polykanine; ICQ: 191749952
> Twitter: m_elensule


Re: [jQuery] Finding next element

2009-12-27 Thread brian
Use prev() and next(). Look at the "traversing" section of the docs:
http://docs.jquery.com/Traversing

On Sun, Dec 27, 2009 at 7:30 PM, Toaster  wrote:
> Hello.
>
> Example:
>
> 
>      
>      
>      
> 
>
> How would I be able to get find the next or previous  in relation
> to the ?
>
> I'd appreciate it if anybody could help me out with this. Thanks in
> advance.
>


[jQuery] Re: I would like to get value each time when one of these checkboxes will change status, how can I do that ?

2009-12-27 Thread Ami
I recommend to use "change" event and not "click" event, becuase users
can change the checkbox without clicking (by using the keyboard).

On Dec 28, 1:17 am, Charlie Griefer  wrote:
> You just want the value of the one that's checked?
>
> $(':checkbox[name=number]').click(function() {
>      if ($(this).is(':checked')) alert($(this).val());
>
> });
>
> if you want the total of all checked boxes when one is clicked:
> 
>     $(document).ready(function() {
>         $(':checkbox[name=number]').click(function() {
>             var total = 0;
>             $(':checkbox[name=number]:checked').each(function() {
>                 total += parseFloat($(this).val());
>             });
>             alert(total);
>         });
>     });
> 
>
> On Sun, Dec 27, 2009 at 1:08 PM, dziobacz  wrote:
> > I have:
>
> > 
> > 
> > 
>
> > I would like to get value each time when one of these checkboxes will
> > change status, how can I do that ? For example when first checkbox
> > will be unchecked or second will be checked. Could You help me ?
>
> --
> Charlie Grieferhttp://charlie.griefer.com/
>
> I have failed as much as I have succeeded. But I love my life. I love my
> wife. And I wish you my kind of success.


[jQuery] Re: Finding next element

2009-12-27 Thread Ami
$('.active').prev()
$('.active').next()

Rate me please if I helped.

On Dec 28, 2:30 am, Toaster  wrote:
> Hello.
>
> Example:
>
> 
>       
>       
>       
> 
>
> How would I be able to get find the next or previous  in relation
> to the ?
>
> I'd appreciate it if anybody could help me out with this. Thanks in
> advance.


[jQuery] Finding next element

2009-12-27 Thread Toaster
Hello.

Example:


  
  
  


How would I be able to get find the next or previous  in relation
to the ?

I'd appreciate it if anybody could help me out with this. Thanks in
advance.


Re: [jQuery] I would like to get value each time when one of these checkboxes will change status, how can I do that ?

2009-12-27 Thread Charlie Griefer
You just want the value of the one that's checked?

$(':checkbox[name=number]').click(function() {
 if ($(this).is(':checked')) alert($(this).val());
});

if you want the total of all checked boxes when one is clicked:

$(document).ready(function() {
$(':checkbox[name=number]').click(function() {
var total = 0;
$(':checkbox[name=number]:checked').each(function() {
total += parseFloat($(this).val());
});
alert(total);
});
});


On Sun, Dec 27, 2009 at 1:08 PM, dziobacz  wrote:

> I have:
>
> 
> 
> 
>
> I would like to get value each time when one of these checkboxes will
> change status, how can I do that ? For example when first checkbox
> will be unchecked or second will be checked. Could You help me ?
>
>
>


-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


[jQuery] Re: Rebinding not working

2009-12-27 Thread mrtoner
I think I understand. As I recall, though, execution of the JS was
stopping because I didn't have '()' i there to start.

Thanks for the tips; my experience has been with PHP and, although I'm
not a pro at that yet, there are a number of differences between it
and JS.


On Dec 26, 11:35 pm, Michael Geary  wrote:
> That .live() code wouldn't work because what you've really written is:
>
>        var temp = exp_iphone_get_trans();
>        $('#transactions ul li a').live('click tap', temp);


[jQuery] Re: Ajax values are lost between 2 operations

2009-12-27 Thread Tristan
it's not the problem, it's working without ajax :D
any other guess ? :o i'm stuck with that and i cannot move foward
until the problem is fixed ="'(

On 27 déc, 23:46, Charlie  wrote:
> I don't do much with flash but this  looks strange to me and is what 
> is being written into DOM by your getScript
>  value="data-file=../graphiques/notes.php&loading=Gamer Certified, chargement 
> des donn?es..."/>
> Tristan wrote:if it can help, here's the link 
> :http://www.gamer-certified.fr/statistiques/par-hebergeur.php1) yeap they are 
> correct 2) i tryed that but it still not works 3) php is doing his part, 
> datas are correctly updated with the help of the POST value 
> $("#nomGSP").change(function () { //get the username var hebergeur1 = 
> $('#nomGSP').val(); //use ajax to run the check 
> $.post("/graphiques/notes.php", { hebergeur1: hebergeur1 } , function(data){ 
> $.getScript("graphique3.js"); },"script"); }); thanks


Re: [jQuery] Re: Ajax values are lost between 2 operations

2009-12-27 Thread Charlie




I don't do much with flash but this  looks strange to me
and is what is being written into DOM by your getScript





Tristan wrote:

  if it can help, here's the link :
http://www.gamer-certified.fr/statistiques/par-hebergeur.php


1) yeap they are correct
2) i tryed that but it still not works
3) php is doing his part, datas are correctly updated with the help of
the POST value



$("#nomGSP").change(function () {

 //get the username
 var hebergeur1 =  $('#nomGSP').val();
 //use ajax to run the check
 $.post("/graphiques/notes.php", { hebergeur1: hebergeur1 } ,
  function(data){
$.getScript("graphique3.js");
  },"script");
  });

thanks

  





Re: [jQuery] problem in installing jquery in debian (lenny)

2009-12-27 Thread Leonardo Balter
already tried to reclone your git rep paste?

Maybe you can get better answers in jQuery Dev group.

2009/12/26 alenoosh 

> Hi
>
> I'm trying to install jquery in lenny , I have sun-java6-jre , sun-
> java6-bin and sun-java6-plugin and sun-java6-jdk installed , but when
> I run 'make' in shell to install jquery , I get an error , when it
> tries to build jquery.min.js. Here is the output of 'make' :
>
> ~/jquery$ make
> Grabbing external dependencies...
> Initialized empty Git repository in /home/alenoosh/jquery/test/
> qunit/.git/
> remote: Counting objects: 414, done.
> remote: Compressing objects: 100% (338/338), done.
> remote: Total 414 (delta 139), reused 223 (delta 75)
> Receiving objects: 100% (414/414), 82.46 KiB | 51 KiB/s, done.
> Resolving deltas: 100% (139/139), done.
> Initialized empty Git repository in /home/alenoosh/jquery/src/
> sizzle/.git/
> remote: Counting objects: 1040, done.
> remote: Compressing objects: 100% (1002/1002), done.
> remote: Total 1040 (delta 663), reused 57 (delta 10)
> Receiving objects: 100% (1040/1040), 458.58 KiB | 165 KiB/s, done.
> Resolving deltas: 100% (663/663), done.
> Building selector code from Sizzle
> Building ./dist/jquery.js
> Building ./dist/jquery.min.js
> java.lang.NoSuchMethodError: method java.util.regex.Pattern.quote with
> signature (Ljava.lang.String;)Ljava.lang.String; was not found.
>   at
> com.google.javascript.jscomp.RhinoErrorReporter.replacePlaceHolders
> (Unknown Source)
>   at com.google.javascript.jscomp.RhinoErrorReporter.(Unknown
> Source)
>   at com.google.javascript.jscomp.RhinoErrorReporter.(Unknown
> Source)
>   at com.google.javascript.jscomp.RhinoErrorReporter
> $OldRhinoErrorReporter.(Unknown Source)
>   at com.google.javascript.jscomp.RhinoErrorReporter
> $OldRhinoErrorReporter.(Unknown Source)
>   at com.google.javascript.jscomp.RhinoErrorReporter.forOldRhino
> (Unknown Source)
>   at com.google.javascript.jscomp.Compiler.(Unknown Source)
>   at com.google.javascript.jscomp.Compiler.(Unknown Source)
>   at com.google.javascript.jscomp.CompilerRunner.createCompiler
> (Unknown Source)
>   at com.google.javascript.jscomp.AbstractCompilerRunner.doRun
> (Unknown Source)
>   at com.google.javascript.jscomp.AbstractCompilerRunner.run(Unknown
> Source)
>   at com.google.javascript.jscomp.CompilerRunner.main(Unknown Source)
> make: *** [dist/jquery.min.js] Error 255
>
>
> What is the problem , what is missing ?
>
> Thanks in advance for your help.
>
> Alenoosh
>
>
>
>


-- 
At,
Leo Balter
http://leobalter.net
Blog técnico: http://blog.leobalter.net


[jQuery] I would like to get value each time when one of these checkboxes will change status, how can I do that ?

2009-12-27 Thread dziobacz
I have:





I would like to get value each time when one of these checkboxes will
change status, how can I do that ? For example when first checkbox
will be unchecked or second will be checked. Could You help me ?




[jQuery] VALIDATE - error labels don't disappear

2009-12-27 Thread Loony2nz
Using Jorn's awesome validator for the umpteenth time..I'm stumped on
this one issue I'm having.

I made a simple form


Firstname 

Lastname 




with a simple validation rule

$.validator.setDefaults({
submitHandler: function() { alert("submitted!"); }
});
// FORM VALIDATION //
//Single Event Form
$("#testForm").validate();

The problem is that when I hit submit with nothing in the input
fields, I get the error message, but after I fulfill the first name
field, and tab to the last name field, the error message doesn't
disappear.  Even after I submit the valid form, the screen refreshes,
but the error label is still therei have a big ?? over my head
now.

Help.


[jQuery] Re: Ajax values are lost between 2 operations

2009-12-27 Thread Tristan
if it can help, here's the link :
http://www.gamer-certified.fr/statistiques/par-hebergeur.php


1) yeap they are correct
2) i tryed that but it still not works
3) php is doing his part, datas are correctly updated with the help of
the POST value



$("#nomGSP").change(function () {

 //get the username
 var hebergeur1 =  $('#nomGSP').val();
 //use ajax to run the check
 $.post("/graphiques/notes.php", { hebergeur1: hebergeur1 } ,
  function(data){
$.getScript("graphique3.js");
  },"script");
  });

thanks


[jQuery] Re: Ajax values are lost between 2 operations

2009-12-27 Thread Tristan
thx for the reply

1) yeah, the values are correct i checked that with firebug
2) i tried putting the getScript in callback (i don't know if i did
this right) but it's the same no data loaded
3) the php part is doing well i've got the right values in notes.php
according to what users select in the FORM and send by $.post

i want graphique3.js to reload the chart with my new datas just
updated in notes.php ='((

$(document).ready(function(){
$("#nomGSP").change(function () {

 //get the username
 var hebergeur1 =  $('#nomGSP').val();
 //use ajax to run the check
 $.post("/graphiques/notes.php", { hebergeur1: hebergeur1 } ,
  function(data){
$.getScript("graphique3.js");
  },"script");
  });
});



On 27 déc, 21:04, Charlie  wrote:
> lots of possibilities here...a link would help.
> 1) are the correct values being sent in post? Firebug can be very helpful for 
> determining this using the "Show XMLHttpRequests" option.
> 2)getScript may be getting called  prior to notes.php having finished 
> processing (AJAX is asynchronous), could try putting the getScript as a 
> callback to $Post
> 3) is the php doing what it is supposed to? withing the callback you could 
> look a the values it generates also to see what is happening
> Tristan wrote:Hi, i've got a little problem and i need your help please : my 
> script does : 1- post a value in "notes.php" to update values according to 
> what is send. 2- reload the script which calls an flash chart to update it 
> the problem is : the datas are correctly updated in /notes.php when calling 
> again the script to update the chart it's working BUT the values in notes.php 
> are reset to initial value (which is 0) so the chart is showed empty (because 
> the charts fils its data with notes.php) $(document).ready(function(){ 
> $("#nomGSP").change(function () { var hebergeur1 = $('#nomGSP').val(); 
> $.post("/graphiques/notes.php", { hebergeur1: hebergeur1 } ); 
> $.getScript("graphique3.js"); }); }); Thanks.


Re: [jQuery] Ajax values are lost between 2 operations

2009-12-27 Thread Charlie




lots of possibilities here...a link would help.

1) are the correct values being sent in post? Firebug can be very
helpful for determining this using the "Show XMLHttpRequests" option. 
2)getScript may be getting called  prior to notes.php having finished
processing (AJAX is asynchronous), could try putting the getScript as a
callback to $Post
3) is the php doing what it is supposed to? withing the callback you
could look a the values it generates also to see what is happening

Tristan wrote:

  Hi, i've got a little problem and i need your help please :

my script does :
1- post a value in "notes.php" to update values according to what is
send.
2- reload the script which calls an flash chart to update it

the problem is :

the datas are correctly updated in /notes.php when calling again the
script to update the chart it's working BUT the values in notes.php
are reset to initial value (which is 0) so the chart is showed empty
(because the charts fils its data with notes.php)


$(document).ready(function(){
	$("#nomGSP").change(function () {
 var hebergeur1 =  $('#nomGSP').val();
 $.post("/graphiques/notes.php", { hebergeur1:
hebergeur1 } );
 $.getScript("graphique3.js");

  });
});

Thanks.


  





[jQuery] Dialog and IFrame problem

2009-12-27 Thread Yuriy Pobezhymov
Hello.
I have iframe that set on 100% width and height on the page and
jQueryUI dialog:
--

  $("#dialog").dialog({
  autoOpen: false,
  zIndex: 3999
  });
 $('#dialog').dialog('open');
});



Browser is not support iframes.



This is the default dialog which is useful for displaying
information. The dialog window can be moved, resized and closed with
the 'x' icon.

--
I don't know why, but when I move or resize it's work not correctly.
When i move a mouse:
It could resize, when i don't resize it, moving, when i don't move.
It's like a crazy!
If I make width:50%, than dialog works very good on blank part of
page, but don't work correctly on iframe part.


[jQuery] Re: Can't get the $.POST working

2009-12-27 Thread Tristan
ok, that's good i've found but got another problem with updating. so i
opened another discussion.


[jQuery] Ajax values are lost between 2 operations

2009-12-27 Thread Tristan
Hi, i've got a little problem and i need your help please :

my script does :
1- post a value in "notes.php" to update values according to what is
send.
2- reload the script which calls an flash chart to update it

the problem is :

the datas are correctly updated in /notes.php when calling again the
script to update the chart it's working BUT the values in notes.php
are reset to initial value (which is 0) so the chart is showed empty
(because the charts fils its data with notes.php)


$(document).ready(function(){
$("#nomGSP").change(function () {
 var hebergeur1 =  $('#nomGSP').val();
 $.post("/graphiques/notes.php", { hebergeur1:
hebergeur1 } );
 $.getScript("graphique3.js");

  });
});

Thanks.



[jQuery] The form is not submitted onKeyDown

2009-12-27 Thread Andre Polykanine
Hello everyone,

I'm trying to sumbit the form normally as well as by pressing
Ctrl+Enter. Yepp, the same task.
What I'm doing is the following:

 var validator=$("#myform").validate( {
 // tralala, here go the rules, error
 messages and stuff
 });

$(document).keydown (function (e) {
if (e.ctrlKey && e.which==13) {
validator.form();
}
});

then I'm trying to submit. If I do something wrong (for example, leave
a required field blank) and press Ctrl+Enter, Validator gently tells
me that yes, that field is required, go on and fill it in. But if I
fill in the field and do everything correctly, pressing Ctrl+Enter
gives absolutely nothing: no errors and no submit. the simple click on
the Submit button, however, does give the expected result.
Where am I wrong?
Thanks!

-- 
With best regards from Ukraine,
Andre
Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon @ 
jabber.org
Yahoo! messenger: andre.polykanine; ICQ: 191749952
Twitter: m_elensule



[jQuery] Re: Can't get the $.POST working

2009-12-27 Thread Tristan
you're right, there is no code to do so, i though the chart would be
reloaded by itself :/

any idea how you do this please?


[jQuery] Why does this work??

2009-12-27 Thread merchz

Hi, I have a question that puzzles me a lot. I have the following code:
$(document).ready(function() {
   $("#somediv").load("/some/content");
})

The code inserted with AJAX contains two things.
1. A script tag that states things like:
$("#Cancel").click(function(e) {
e.preventDefault();
alert("you cancled");
})

2. A div with various elements, like the button with ID "Cancel".

When I click that Cancel button, the alert executes just like I want it to
do. But I can't figure out why?? I mean how can the eventhandler register
correctly. Is the Cancel button from the AJAX call somehow magically insert
into the DOM before the script registering the event executes?
-- 
View this message in context: 
http://old.nabble.com/Why-does-this-work---tp26934213s27240p26934213.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] jquery xml data

2009-12-27 Thread youngenergy

http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns="http://
tempuri.org/">
 10,16,12,13,14,15,11,17
 korayo
 130



how to assing  XML data to bellow values with jquery , thanks

yetki = 10,16,12,13,14,15,11,17
user = korayo
totalfile = 130


[jQuery] Re: open drodown

2009-12-27 Thread lmeerovich


On 26 дек, 22:45, fachhoch  wrote:
> My select drop down   is inside a div , I am wondering if jquery has any api
> to open the dropdwon   ,when  user clicks on  the div ?
>
> 
>          wicket:id="infGrantProgram">
>                 Choose One
>                 AD - DEVELOPMENTAL DISABLITIES - 
> 94006
>                 AC - Developmental Disabilities 
> Councils -
> 93630
>                 ADPTASST - Adoption Assistance - 
> 93659
>                 AE1 - Community Based Abstinence 
> Education -
> 93010
>                 AEGP - Abstinence Education Grant Program 
> -
> 93235
>                 ZV - ASSISTANCE FOR  VICTIMS OF 
> TRAFFICKING -
> 93598
>         
> 
>
> --
> View this message in 
> context:http://old.nabble.com/open-drodown-tp26929027s27240p26929027.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] jQuery Validate dynamic form issues

2009-12-27 Thread Dave3
Hey all, this is my first post here. I have tried desperately for
hours and hours to find a solution to this problem but so far no
luck.

I have a dynamic form that will show/hide certain parts based on the
value of a select box. I am also using the errorContainer option to
display all errors together in a seperate div.

My problem is that the errorContainer is not hiding itself when there
are zero errors. I suspect this is because the numberOfInvalids is out
of wack with what is actually on the page. I am manually hiding errors
for form elements that no longer exist, which is causing the validate
plugin to become confused. If the validate plugin could validate
onChange of a select box that may help me out, but I haven't found a
way to make that happen.

Instead of writing a book about the issue I will just show you a
working example and maybe someone can help me out. There are 2 files
here, test-1-1.html and test-1-1.js. Not included are jquery and the
validate plugin.

The easiest way to observe the error is: select 1 borrower, click
submit, select 0 borrowers ("Please Select")...

//---
test-1-1.js--//

$(document).ready(function(){

// form validation
$("form").validate({
debug: true,
onkeyup: false,
ignore: '.ignore',
rules:{
numBorrowers:{
notZero: true,
},
borrower1FName:{
required: true,
},
borrower1MName:{
required: true,
},
borrower1LName:{
required: true,
},
borrower2FName:{
required: true,
},
borrower2MName:{
required: true,
},
borrower2LName:{
required: true,
},
primaryContact:{
required: true,
},
},
messages:{
numBorrowers:{
notZero: 'Please choose the number of loan 
applicants.',
},
borrower1FName:{
required: 'Please enter Borrower 1\'s first 
name.',
},
borrower1MName:{
required: 'Please enter Borrower 1\'s middle 
name.',
},
borrower1LName:{
required: 'Please enter Borrower 1\'s last 
name.',
},
borrower2FName:{
required: 'Please enter Borrower 2\'s first 
name.',
},
borrower2MName:{
required: 'Please enter Borrower 2\'s middle 
name.',
},
borrower2LName:{
required: 'Please enter Borrower 2\'s last 
name.',
},
primaryContact:{
required: 'Please choose the primary contact 
for this loan.',
},
},
highlight: function(element){
$(element.form).find("label[for="+element.id +"]")
   .addClass('error');
},
unhighlight: function(element){
$(element.form).find("label[for=" + element.id + "]")
.removeClass('error');
},
errorContainer: "#applicationErrorMessage",
errorLabelContainer: "#applicationErrorMessage ul",
wrapper: "li",
});

$.validator.addMethod("notZero", function(value){
if(value == 0)
return false;
else
return true;
});

// functions
function borrower1AddValidation(){
$('.borrower1').removeClass('ignore');
}
function borrower2AddValidation(){
$('.borrower2').removeClass('ignore');
}
function borrower1RemoveValidation(){
// remove validation
$('.borrower1').addClass('ignore');

// remove highlighting next to input
$('td > label[for^="borrower1"]').removeClass('error');

// hide error msg

[jQuery] Re: Can't get the $.POST working

2009-12-27 Thread MorningZ
"but the FLASH chart is not reloading"

Maybe i am missing something, but where in your shown code above are
you attempting to reload anything?   your $.post command only has
target URL and params specified, not any actions tied to "success"


On Dec 26, 11:00 pm, Tristan  wrote:
> ok, i turned on my brain and i found the error :
>
> $("nomGSP").click(function () {     incorrect
> $("#nomGSP").click(function () {    correct
>
> but it would not be fun if it works ! i've got the correct data
> produced by the changing (i can see it in the ajax request), but the
> FLASH chart is not reloading so all i can see is the original flash
> chart (not updated)
> any ideas ?
>
> the flash chart is contained into an div
>
> and the options are provided by this  :
>
> swfobject.embedSWF(
> "../open-flash-chart.swf", "graphique3",
> "900", "800", "9.0.0", "/expressInstall.swf",
> {"data-file":"../graphiques/notes.php",
> "loading":"loooading..."} );
>
> Thanks