[jQuery] Re: validation method not working in ie

2009-11-30 Thread hcvitto
Has anyone any clue for this?

On Nov 27, 5:09 pm, hcvitto hcvi...@gmail.com wrote:
 Hi
 i'm using the validation plugin on a form. I added three methods to
 check that three select value are not equal but it doesn't work in ie.
 here's the page

 http://www.fepgroup.it/community/registrati__.php

 Any idea why?

 Thanks Vittorio


[jQuery] validation method not working in ie

2009-11-27 Thread hcvitto
Hi
i'm using the validation plugin on a form. I added three methods to
check that three select value are not equal but it doesn't work in ie.
here's the page

http://www.fepgroup.it/community/registrati__.php

Any idea why?

Thanks Vittorio


[jQuery] cycle plugin and dropdown menu

2009-09-25 Thread hcvitto

Hi
i'm using the cycle plugin below a dropdown. Problem is that the
dropdowns  stay behind the slideshow. They have position absolute and
higher z-index than the slideshow.

Any solution?

http://www.francesconizzola.it/_demo/

Thanks Vitto


[jQuery] Re: cycle plugin and dropdown menu [solved]

2009-09-25 Thread hcvitto

great!!
Many thanks Karl!!

Vitto


On 25 Set, 15:45, Karl Swedberg k...@englishrules.com wrote:
 Hi Vitto,

 Add these declarations to your ul#mainNav rule (main.css, line 149)

    position: relative;
    z-index: 50;

 For IE, you'll probably also need to add these to div#content  
 (main.css, line 26)

    position: relative;
    z-index: 1;

 --Karl

 
 Karl Swedbergwww.englishrules.comwww.learningjquery.com

 On Sep 25, 2009, at 6:33 AM, hcvitto wrote:





  Hi
  i'm using the cycle plugin below a dropdown. Problem is that the
  dropdowns  stay behind the slideshow. They have position absolute and
  higher z-index than the slideshow.

  Any solution?

 http://www.francesconizzola.it/_demo/

  Thanks Vitto


[jQuery] hoverFlow for simple slideDown

2009-05-12 Thread hcvitto

Hi
 i'm trying to make a dropdown animation and using the hoverFlow
plugin for smooth animation but i just want the submenu to slidedown,
so no animation nedded,

Does anyone know that plugin?

This is a demo page with opacity effect, which is not what i want..
http://www.francesconizzola.it/_demo/nizzola/francesco-nizzola.php




[jQuery] transform variables

2009-05-04 Thread hcvitto

hi, this is not exactly a jquery question but it could be useful
anyway.

i've got a function to which i pass 4 parameters, two as values, two
as var references, but which are 'spelt' the same. Is there a way i
can pass only two parameters and use them inside the function once as
a value and once as var reference

loadSelect('cat', cat, 'fam', fam);  // these are the 4 parameters:
how can i call it using only 2, ie: loadSelect('cat', 'fam'); or
loadSelect(cat, fam);


function loadSelect(parent, parentVal, target, targetVal){
var url = '../include/select.php?search=' + parent;
var target = '#' + target;
$.getJSON(url,{q: parentVal}, function(j){
var options = '';
for (var i = 0; i  j.length; i++) {
options += 'option value=' + j[i].oV + '';
if ( j[i].oV == targetVal) {
options += 'selected=selected';
if (parent == 'cat') loadSelect('fam', fam, 
'cod', cod);
}
options += '' + j[i].oT;'/option';
}
$(target).html(options);
});
}



[jQuery] what's better?

2009-03-04 Thread hcvitto

hi
just needed an advice...
what' s better between this two (if there's any difference at all):

this:

$('a[class^=open]').click(function(){
...whatever...
});

or this:

var myEl = $('a[class^=open]');
$(myEl).each(function(){
 $(this).click(function(){
...whatever...
 });
)};

thanks
Vitto


[jQuery] Re: what's better?

2009-03-04 Thread hcvitto

right..thanks

On Mar 4, 3:38 pm, MorningZ morni...@gmail.com wrote:
 Well, the second version won't help very much since you are not
 reusing myEL later on

 On Mar 4, 9:36 am, hcvitto hcvi...@gmail.com wrote:

  hi
  just needed an advice...
  what' s better between this two (if there's any difference at all):

  this:

  $('a[class^=open]').click(function(){
      ...whatever...

  });

  or this:

  var myEl = $('a[class^=open]');
  $(myEl).each(function(){
       $(this).click(function(){
          ...whatever...
       });
  )};

  thanks
  Vitto


[jQuery] site using [validate] plugin

2009-02-25 Thread hcvitto

hi
i published a site using the validate plugin (which is awesome) for
the 7 pages registration form.

http://www.lavorainmondial.it/tuo_profilo/step1.php

Many thanks


[jQuery] Re: corner plugin ie7 bug

2008-12-29 Thread hcvitto

http://www.tasker.it/img/demo/

hi
sorry for the long delay..i moved everything here

http://www.tasker.it/img/demo/

would you check now whether you can see it?

On 23 Dic, 16:58, Mike Alsup mal...@gmail.com wrote:
  mmh..that's weird..i can see it right..

 All of the scripts and stylesheets on that page return 403 Forbidden.


[jQuery] Re: ajaxStart don't work for ajax/load?

2008-12-29 Thread hcvitto

come on..give me a christmas present  ;)

On 23 Dic, 09:51, hcvitto hcvi...@gmail.com wrote:
 i'm still here :) ...?


[jQuery] Re: corner plugin ie7 bug

2008-12-29 Thread hcvitto

this is driving me crazy!!
anyway, i moved everything here

http://www.pipelabitta.it/demo/

and this should be it!

On 29 Dic, 14:07, donb falconwatc...@comcast.net wrote:
 stylesheet main.css seems to be missing.

 On Dec 29, 6:56 am, Daniel dqmin...@gmail.com wrote:

  The page isnt loading correctly for me

  On Dec 29, 4:44 pm, hcvitto hcvi...@gmail.com wrote:

  http://www.tasker.it/img/demo/

   hi
   sorry for the long delay..i moved everything here

  http://www.tasker.it/img/demo/

   would you check now whether you can see it?

   On 23 Dic, 16:58, Mike Alsup mal...@gmail.com wrote:

 mmh..that's weird..i can see it right..

All of the scripts and stylesheets on that page return 403 Forbidden.


[jQuery] Re: ajaxStart don't work for ajax/load?

2008-12-29 Thread hcvitto

hi daniel
thanks for the replay..
yes, it's initial state is hidden..As far as you know, should the
ajaxStart/ajaxStop functions work with the load function too?

On 29 Dic, 12:49, Daniel dqmin...@gmail.com wrote:
 I dont think there is a problem with your javascript code.

 Did you try to set #load initial style to display:none ?

 Cheers,
 Daniel

 On Dec 29, 5:33 pm, hcvitto hcvi...@gmail.com wrote:

  come on..give me a christmas present  ;)

  On 23 Dic, 09:51, hcvitto hcvi...@gmail.com wrote:

   i'm still here :) ...?


[jQuery] Re: ajaxStart don't work for ajax/load?

2008-12-29 Thread hcvitto

Unfortunately not at the moment. To make one a have to move everything
on another server..
i 'll wait fotr the website to be published, then i will post again.
Thanks a lot, anyway
VItto

On 29 Dic, 15:01, Daniel dqmin...@gmail.com wrote:
 yes it should. Do you have a test page ?

 Cheers,
 Daniel

 On Dec 29, 8:47 pm, hcvitto hcvi...@gmail.com wrote:

  hi daniel
  thanks for the replay..
  yes, it's initial state is hidden..As far as you know, should the
  ajaxStart/ajaxStop functions work with the load function too?

  On 29 Dic, 12:49, Daniel dqmin...@gmail.com wrote:

   I dont think there is a problem with your javascript code.

   Did you try to set #load initial style to display:none ?

   Cheers,
   Daniel

   On Dec 29, 5:33 pm, hcvitto hcvi...@gmail.com wrote:

come on..give me a christmas present  ;)

On 23 Dic, 09:51, hcvitto hcvi...@gmail.com wrote:

 i'm still here :) ...?


[jQuery] Re: corner plugin ie7 bug

2008-12-23 Thread hcvitto

is there any helper:)..?



[jQuery] Re: ajaxStart don't work for ajax/load?

2008-12-23 Thread hcvitto

i'm still here :) ...?



[jQuery] Re: corner plugin ie7 bug

2008-12-23 Thread hcvitto

hi, thanks for the answer..
both the plugin and jquery versions are the latest ones.
here i put the single page with the problem. Html and css are as
little as i could do. Hope it is clear enough.

http://www.tasker.it/demo/

VItto


On 23 Dic, 15:24, Dave Methvin dave.meth...@gmail.com wrote:
 Hi, which version of the plugin is this? Can you post a link to a demo
 page? The problem may be in the markup so it would help to see that.


[jQuery] Re: corner plugin ie7 bug

2008-12-23 Thread hcvitto

mmh..that's weird..i can see it right..

here's the screenshot as i see it

http://www.tasker.it/demo/demo.jpg

how do you see it?

On 23 Dic, 16:40, Dave Methvin dave.meth...@gmail.com wrote:
 The page isn't loading properly, it almost seems like the stylesheet
 is missing.


[jQuery] ajaxStart don't work for ajax/load?

2008-12-22 Thread hcvitto

hi
i want to show/hide a loader when using load() function but
using .ajaxStart / .ajaxStop functions doesn't work. Is it right?

With this script:

$('#load')
.ajaxStart(function() { $(this).show(); })
.ajaxStop(function() { $(this).hide(); });
$('#colCont').load('myFile.php?id=myId #colContIns');
$('#categorie a').click(function(){
   var id = $(this).attr('id');
var s = new Array();
s = id.split('_');
$('#colCont').load('prodotti/
famiglie.php?id='+s[1]+' #colContIns');
return false;
});

the loader shows only on its first call but not when i load html
fragments from other links.
Any idea?
Thanks VItto


[jQuery] corner plugin ie7 bug

2008-12-22 Thread hcvitto

i
i got a weird error using the jquery.corner plugin on ie7.
I attached two image. The wrong one is how the page appears in ie7
(look at the red square on the right where the corner get), the right
one is for all the other browser..(ie6 included..!!!)

http://www.azero.it/checkImg/tasker_wrong.jpg

http://www.azero.it/checkImg/tasker_right.jpg

here's the css rule for that block..

.blocchi{background:#dcdcdc;margin:10px 10px 0
10px;overflow:hidden;padding:10px 10px 40px;width:840px;}

it works right if i dont't give it any width / padding left-right. But
i have to give it a width 'cause it contains some float element.

Anyone has have it yet?
VItto



[jQuery] loader for ajax/load

2008-12-12 Thread hcvitto

hi
i want to show/hide a loader when using load() function. With this
script:

$('#load')
.ajaxStart(function() { $(this).show(); })
.ajaxStop(function() { $(this).hide(); });
$('#colCont').load('myFile.php?id=myId #colContIns');
$('#categorie a').click(function(){
$('#categorie 
a').removeClass('selected');
$(this).addClass('selected');
var id = $(this).attr('id');
var s = new Array();
s = id.split('_');

$('#colCont').load('prodotti/famiglie.php?id='+s[1]+'
#colContIns');
return false;
});

the loader shows only on its first call but not when i load html
fragments from links.
Any idea why?
Thanks Vitto




[jQuery] Re: jcarousel ie6 bug

2008-12-04 Thread hcvitto

solution found:)..

On 3 Dic, 17:36, hcvitto [EMAIL PROTECTED] wrote:
 hi
 i'm using jcarousel plugin for a project.
 Problem is in ie6 the last image in all of my carousel doesn't show
 up?

 Any idea?
 Thanks
 Vitto


[jQuery] jcarousel ie6 bug

2008-12-03 Thread hcvitto

hi
i'm using jcarousel plugin for a project.
Problem is in ie6 the last image in all of my carousel doesn't show
up?

Any idea?
Thanks
Vitto


[jQuery] Re: remote validation with additional parameter

2008-11-27 Thread hcvitto

hi
i just needed that option today!!
for the moment i just found a not-very-good way out which works for
me.

Among the pages you suggested i found this:

test(remote, customized ajax options, function() {
expect(2);
stop();
var v = $(#userForm).validate({
rules: {
username: {
required: true,
remote: {
url: users.php,
type: post,
beforeSend: function(request, settings) 
{
same(settings.type, post);
same(settings.data, 
username=asdfemail=email.com);
},
data: {
email: function() {
return email.com;
}
},
complete: function() {
start();
}
}
}
}
});
$(#username).val(asdf);
$(#userForm).valid();
});

but i'm not sure how to use it..any help?

Thanks Vitto

On 25 Nov, 20:15, Jörn Zaefferer [EMAIL PROTECTED]
wrote:
 With the 1.5 release you will be able to use this instead:

 $(#myform).validate({
   rules: {
     username: {
       required: true,
      remote: {
         url: checkusername.php,
         type: post
         data: {
           email: function() { return $(#email).val() }
         }
       }
     }
   }

 });

 In other words, you can override all settings that $.ajax supports by
 replacing the currentremote: url withremote: {url:url} and add
 whatever you need.

 You can try it out now
 (http://jqueryjs.googlecode.com/svn/trunk/plugins/validate/) or wait
 for the next release.

 Feedback is welcome!

 Jörn

 On Thu, Nov 20, 2008 at 8:28 PM, Jörn Zaefferer

 [EMAIL PROTECTED] wrote:
  The current workaround I recommend is to use ajaxSend:

  $().ajaxSend(function(e, xml, settings) {
   $.extend(settings.data, { field2: $(#field2).val() });
  });

  With the drawback that it gets applied to all ajax requests. Depends
  on your application if thats a problem and how to avoid it.

  Jörn

  On Thu, Nov 20, 2008 at 5:17 PM, SMaDeP [EMAIL PROTECTED] wrote:

  I want to make a duplicate check withremotevalidation, but I need an
  additional parameter like the parent key
  (no duplicate article numbers within one order)!

  does addMethod support async validation?
  can I add an additional parameter to theremote-url? How?

  Thanks in advance,

  Stefan


[jQuery] Re: remote validation with additional parameter

2008-11-27 Thread hcvitto

Wow..Jörn you're just great!!

Thanks a lot!

It works in chrome, firefox and ie6...

On 27 Nov, 13:16, Jörn Zaefferer [EMAIL PROTECTED]
wrote:
 Thats test code, nothing useful for an application. The code I posted
 is what you'll want to use:

 $(#myform).validate({
  rules: {
    username: {
      required: true,
      remote: {
        url: checkusername.php,
        type: post
        data: {
          email: function() { return $(#email).val() }
        }
      }
    }
  }

 });

 Just put any option you need into that object literal and add
 additional data to the data property.

 You need the latest js file for it to 
 work:http://jqueryjs.googlecode.com/svn/trunk/plugins/validate/jquery.vali...

 Jörn

 On Thu, Nov 27, 2008 at 12:29 PM, hcvitto [EMAIL PROTECTED] wrote:

  hi
  i just needed that option today!!
  for the moment i just found a not-very-good way out which works for
  me.

  Among the pages you suggested i found this:

  test(remote, customized ajax options, function() {
         expect(2);
         stop();
         var v = $(#userForm).validate({
                 rules: {
                         username: {
                                 required: true,
                                 remote: {
                                         url: users.php,
                                         type: post,
                                         beforeSend: function(request, 
  settings) {
                                                 same(settings.type, post);
                                                 same(settings.data, 
  username=asdfemail=email.com);
                                         },
                                         data: {
                                                 email: function() {
                                                         return email.com;
                                                 }
                                         },
                                         complete: function() {
                                                 start();
                                         }
                                 }
                         }
                 }
         });
         $(#username).val(asdf);
         $(#userForm).valid();
  });

  but i'm not sure how to use it..any help?

  Thanks Vitto

  On 25 Nov, 20:15, Jörn Zaefferer [EMAIL PROTECTED]
  wrote:
  With the 1.5 release you will be able to use this instead:

  $(#myform).validate({
    rules: {
      username: {
        required: true,
       remote: {
          url: checkusername.php,
          type: post
          data: {
            email: function() { return $(#email).val() }
          }
        }
      }
    }

  });

  In other words, you can override all settings that $.ajax supports by
  replacing the currentremote: url withremote: {url:url} and add
  whatever you need.

  You can try it out now
  (http://jqueryjs.googlecode.com/svn/trunk/plugins/validate/) or wait
  for the next release.

  Feedback is welcome!

  Jörn

  On Thu, Nov 20, 2008 at 8:28 PM, Jörn Zaefferer

  [EMAIL PROTECTED] wrote:
   The current workaround I recommend is to use ajaxSend:

   $().ajaxSend(function(e, xml, settings) {
    $.extend(settings.data, { field2: $(#field2).val() });
   });

   With the drawback that it gets applied to all ajax requests. Depends
   on your application if thats a problem and how to avoid it.

   Jörn

   On Thu, Nov 20, 2008 at 5:17 PM, SMaDeP [EMAIL PROTECTED] wrote:

   I want to make a duplicate check withremotevalidation, but I need an
   additional parameter like the parent key
   (no duplicate article numbers within one order)!

   does addMethod support async validation?
   can I add an additional parameter to theremote-url? How?

   Thanks in advance,

   Stefan


[jQuery] iFixPng bug in ie6

2008-11-03 Thread hcvitto

hi
i'm using the improved iFixPng version.
In ie6 it renders the transparency but the background png image gets
over anything else as it had a high z-index.

Any solution?

Thanks vitto

Here's the code

# css
div#wrapper {margin:0 auto; width:880px;background: url(../img/
ombraWrapper.png) bottom right no-repeat;padding-bottom:40px;}
div#main {margin:0 auto; width:800px;background: url(../img/
sfondoContent.jpg) 0 0 no-repeat;}

#html
div id=wrapper
  div id=main
  /div
/div

#js
!--[if lt IE 7]
script type=text/javascript
$(document).ready(function(){
$.ifixpng('img/pixel.gif');
$('#wrapper').ifixpng();
});
/script
![endif]--



[jQuery] Re: validate plugin and CodeIgniter

2008-10-22 Thread hcvitto

http://www.azero.it/test_val/form.php

here's a test page with the problemtic block..i did some change and it
works better now but still i couldn't manage to make it right. I'm
sure it's my lack of js knowladge..


[jQuery] Re: validate plugin and CodeIgniter

2008-10-22 Thread hcvitto

doh!!
ok..now i do that but i can't get the result of the iterate function
(i see my question is no longer about the plugin!).
Any suggestion :) ?


[jQuery] Re: validate plugin and CodeIgniter

2008-10-22 Thread hcvitto

doh!!
ok..i do that now but i can't get the right result of the iteration
function (i see it's no longer a plugin problem!)
Any suggestion though :) ?


[jQuery] Re: validate plugin and CodeIgniter

2008-10-22 Thread hcvitto

done it!
if anyone interested here's what i did:

here's the class rule which calls a function that iterate through the
radiobuttons

$.validator.addClassRules({
 scuola: { required: function(){
checkIstruzione();
return cc;
}
  }
});

and here is the function

function checkIstruzione(){
$('input[type=radio].scuola').each(function(){
var chk = $(this).attr('checked');
var val = $ (this).val();
if ( (val == 'si')  (chk == true)) {
cc = false;
return cc;
} else {
cc = true;
return cc;
}
});
}

maybe it can be useful

Thanks again Jorn :)


On 22 Ott, 12:20, hcvitto [EMAIL PROTECTED] wrote:
 doh!!
 ok..i do that now but i can't get the right result of the iteration
 function (i see it's no longer a plugin problem!)
 Any suggestion though :) ?


[jQuery] validate plugin and CodeIgniter

2008-10-21 Thread hcvitto

hi
i'm giving a go at codeIgniter using jquery for the js side.
So i got a form which i validate with the validate plugin but in CI
when i submit the form the js starts a loop and i must shut down the
browser.
I read somewhere that it could be because the validate plugin use the
GET method by default which CI refuse to accept.

Is this true?
Anyone has used this two togheter?

Thanks Vitto


[jQuery] Re: validate plugin and CodeIgniter

2008-10-21 Thread hcvitto

h Jorn
thank for the quick reply..it was my mistake :(..
but, if i'm not annoying, i got another issue which i solved with a
twik but was wonder if there's a better solution..

i got 5 couples of radio button:
input name=name1 type=radio value=si class=className /
input name=name1 type=radio value=no class=className /
input name=name2 type=radio value=si class=className /
input name=name2 type=radio value=no class=className /
input name=name3 type=radio value=si class=className /
input name=name3 type=radio value=no class=className /
input name=name4 type=radio value=si class=className /
input name=name4 type=radio value=no class=className /
input name=name5 type=radio value=si class=className /
input name=name5 type=radio value=no class=className /
The validation rule against them must be:
- at least one radiobutton with value 'si' must be checked.
I added a classRule  but apparently this doesn't work for
radiobuttons.
$.validator.addClassRules({
  className: { required: function(element){
var id ;
var chk;
var val;
$
(element).each(function(){
id = $
(this).attr('id');
chk = $
(this).attr('checked');
val = $
(this).val();
alert
(id + ' ' + chk + ' ' + val)
if
((val == 'si')  (chk == true)){
 
return true;
}
});
}
}
I put the alert to show that the plugin in its cycle takes into
consderation only the radiobutton with value 'si' (twice) and no the
seconds one with value no!
Is this possible or is just a mistake of mine?
Thanks Vitto


[jQuery] validate plugin and radio button

2008-10-20 Thread hcvitto

hi
another little issue in my long form:)

i got 5 couples of radio button:

input name=name1 type=radio value=si class=className /
input name=name1 type=radio value=no class=className /

input name=name2 type=radio value=si class=className /
input name=name2 type=radio value=no class=className /

input name=name3 type=radio value=si class=className /
input name=name3 type=radio value=no class=className /

input name=name4 type=radio value=si class=className /
input name=name4 type=radio value=no class=className /

input name=name5 type=radio value=si class=className /
input name=name5 type=radio value=no class=className /

The validation rule against them must be:
- at least one radiobutton with value 'si' must be checked.

I added a classRule  but apparently this doesn't work for
radiobuttons.
$.validator.addClassRules({
  className: { required: function(element){
var id ;
var chk;
var val;

$(element).each(function(){
id = 
$(this).attr('id');
chk = 
$(this).attr('checked');
val = 
$(this).val();
alert (id + ' ' 
+ chk + ' ' + val)
if ((val == 
'si')  (chk == true)){
return 
true;
}
});

}
}

I put the alert to show that the plugin in its cycle takes into
consderation only the radiobutton with value 'si' (twice) and no the
seconds one with value no!

Is this possible or is just a mistake of mine?
Thanks Vitto




[jQuery] Re: [validate] callback onblur on single input field

2008-10-13 Thread hcvitto

great thanks!
as soon as the for is online i'll tell you the link, in case it's
useful!!

Vitto

On 13 Ott, 16:28, Jörn Zaefferer [EMAIL PROTECTED]
wrote:
 Try this:

 var fields = $(#tel, #mobile);
 fields.blur(function() {
   fields.valid();

 });

 That triggers validation for both field when one of them is blurred.

 Jörn

 On Mon, Oct 13, 2008 at 12:05 PM, hcvitto [EMAIL PROTECTED] wrote:

  hi
  i'm using tha validation plugin on a very long form. It works fine
  everywhere but for one little issues:

  i need to trigger a function onblur of a single field: i got a tel
  and a mobile input field one of which is required (at least).

  How i trigger the callback after i fill the input to erase th error
  class from the other field?

  Thank Vitto


[jQuery] [validate] callback onblur on single input field

2008-10-13 Thread hcvitto

hi
i'm using tha validation plugin on a very long form. It works fine
everywhere but for one little issues:

i need to trigger a function onblur of a single field: i got a tel
and a mobile input field one of which is required (at least).

How i trigger the callback after i fill the input to erase th error
class from the other field?

Thank Vitto


[jQuery] Re: looking for a slider

2008-10-02 Thread hcvitto

That's good but i need a couple features more. I looked at the options
and i didn't find
1 - a step by step increment of the slider
2 - a way to move the slider with +/- buttons.

I hope i'm not picky but i'm no javascript developer..
Any idea?
Vitto

On 2 Ott, 12:48, BB [EMAIL PROTECTED] wrote:
 Look at 
 this:http://ui.jquery.com/repository/latest/demos/functional/#ui.slider

 this demo is really simple. here are the docs:http://docs.jquery.com/UI/Slider

 On 2 Okt., 11:48, hcvitto [EMAIL PROTECTED] wrote:

  hi
  i've searched around fot a while but couldn't find any slider that
  suits my need. This is what i'm looking for (jquery style!)

 http://www.phatfusion.net/slider/

  plus i a '+' and a '-' buttons.

  Does anyone know about a plugin which does this?

  Thanks vitto


[jQuery] need to sort european data in tabledsorter plugin

2008-09-24 Thread hcvitto

hi
i'm using the tablesorter plugin and i need to sort a data column in
this format

dd.mm. (which i think is the european way)

I read another thread about this in which european data was formatted
like this

1. -MM-DD and YY-MM-DD

Anyone implemented this kind of sorting?

Thanks vitto


[jQuery] Re: need to sort european data in tabledsorter plugin

2008-09-24 Thread hcvitto
hi
i tried the code, no effect though..

On 24 Set, 13:39, MorningZ [EMAIL PROTECTED] wrote:
 Give this custom parser a shot

 $.tablesorter.addParser({
                     id: 'DD-MMM-YY',
                     is: function(s) {
                         return false;
                     },
                     format: function(s) {
                         s = '' + s; //Make sure it's a string
                         var hit = s.match(/(\d{1,2})\.(\d{1,2}).
 (\d{4})/);
                         if (hit  hit.length == 4) {
                             return hit[3] + hit[2] + hit[1];
                         }
                         else {
                             return s;
                         }
                     },
                     type: 'text'
                 });

                 //Wire up this custom parser to needed column
                 $(#myTable).tablesorter({
                     headers: {
                         6: {
                             sorter: 'dd.mm.
                         }
                     }
                 });

             });

[jQuery] Re: need to sort european data in tabledsorter plugin

2008-09-24 Thread hcvitto

in the plugin code there's this shortdate parser,

ts.addParser({
id: shortDate,
is: function(s) {
return /\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);
},
format: function(s,table) {
var c = table.config;
s = s.replace(/\-/g,/);
if(c.dateFormat == us) {
// reformat the string in ISO format
s = 
s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,
$3/$1/$2);
} else if(c.dateFormat == uk) {
//reformat the string in ISO format
s = 
s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,
$3/$2/$1);
} else if(c.dateFormat == dd/mm/yy || c.dateFormat == 
dd-mm-yy)
{
s = 
s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,
$1/$2/$3);
}
return $.tablesorter.formatFloat(new Date(s).getTime());
},
type: numeric
});


but i'm not sure it's what i need neither know how to use it...

maybe?

$(#elencoHome).tablesorter({
sorter: 'shortDate'
});

but it doesn't work anyway..


On 24 Set, 14:50, hcvitto [EMAIL PROTECTED] wrote:
 hi
 i tried the code, no effect though..

 On 24 Set, 13:39, MorningZ [EMAIL PROTECTED] wrote:

  Give this custom parser a shot

  $.tablesorter.addParser({
                      id: 'DD-MMM-YY',
                      is: function(s) {
                          return false;
                      },
                      format: function(s) {
                          s = '' + s; //Make sure it's a string
                          var hit = s.match(/(\d{1,2})\.(\d{1,2}).
  (\d{4})/);
                          if (hit  hit.length == 4) {
                              return hit[3] + hit[2] + hit[1];
                          }
                          else {
                              return s;
                          }
                      },
                      type: 'text'
                  });

                  //Wire up this custom parser to needed column
                  $(#myTable).tablesorter({
                      headers: {
                          6: {
                              sorter: 'dd.mm.
                          }
                      }
                  });

              });


[jQuery] Re: need to sort european data in tabledsorter plugin

2008-09-24 Thread hcvitto

ok
thanks a lot...your code was working and it was just a fault of mine
in writing the date!!

Thanks again!!
Vitto

On 24 Set, 16:00, MorningZ [EMAIL PROTECTED] wrote:
 Working example of above:

 http://paste.pocoo.org/show/86103/


[jQuery] first plugin review

2008-09-23 Thread hcvitto

hi
i wrote my first (pretty useless:) plugin but i'm not sure what to
think about it, it just looks like it has too much words!!

Here's the plugin code (it's to make a glossary)

(function($){
$.fn.glossario = function(options){
var defaults = {
stile: 'mark'
};
var options = $.extend(defaults, 
options);
var classe = options.stile;
var hash;
if (document.location.hash)
var hash = 
(document.location.hash).charAt(1);
return this.each(function() {
var obj = $(this);
var anchors = obj.children(a);

obj.children('dl').css({display:'none'});
if (hash) {
obj.children('a[href=#' 
+ hash + ']').addClass(classe);
obj.children('dl[id=' + 
hash + ']').css({display:'block'});
} else {

obj.children('a:first').addClass(classe);

obj.children('dl:first').css({display:'block'});
}
anchors.click(function(){
var id = 
$(this).attr('href').charAt(1);
if 
(!($(this).hasClass(classe))){

anchors.removeClass(classe);

$(this).addClass(classe);

obj.children('dl').css({display:'none'}).end().children('dl[id=' + id
+ ']').fadeIn();
}
return false;
});
});
};
})(jQuery);

$(#glossario).glossario();



div id=glossarioa href=#aA/a a href=#bB/a  ...  span
class=no_linkZ/span
dl id=a
  dtA word/dt
  ddA word meaning/dd
  dtA word/dt
  ddA word meaning/dd
/dl
dl id=b
 dtB word/dt
  ddB word meaning/dd
  dtB word/dt
  ddB word meaning/dd
/dl
dl id=c
  dtBear market/dt
  ddMercato orso, ossia ribassista./dd
  dtBenchmark/dt
  ddParametro di riferimento utilizzato per la valutazione
dei risultati di un fondo o di una gestione./dd
/dl
...
  /div

Any suggestion or feedback?

Thanks Vitto


[jQuery] Re: first plugin review

2008-09-23 Thread hcvitto

Thanks guys for the quick reply!!
I did as you suggested (Joel) and i saved some bits;i guess in a
bigger plugin that would be even more useful.

As for the hash thing i need just to identify the first letter after
the hash sign to open the corresponding block when i come from another
page so charAt works fine.

Thank again to everybody
Vitto

On 23 Set, 12:13, Joel Birch [EMAIL PROTECTED] wrote:
 Some small byte savings:

 /* replace this: */

 if (hash) {
     obj.children('a[href=#' + hash + ']').addClass(classe);
     obj.children('dl[id=' + hash + ']').css({display:'block'});} else {

     obj.children('a:first').addClass(classe);
     obj.children('dl:first').css({display:'block'});

 }

 /* ...with this: */

 if (hash) {
     $(' a[href=#' + hash + ']',obj).addClass(classe);
     $('#'+hash).show();} else {

     $(' a:first',obj).addClass(classe);
     $(' dl:first',obj).show();

 }

 There are a few other places where you could replace .children() as
 shown here also.

 Joel Birch.


[jQuery] Re: flashembed plugin

2008-06-03 Thread hcvitto

great!!
thanks Sam

On May 30, 5:59 pm, Sam Sherlock [EMAIL PROTECTED] wrote:
 not my plugin but Luke Lutman's

 sounds like you need to add to your stylesheet
 .flash-replaced .alt {
 display:block;
 height:0pt;
 overflow:hidden;
 position:absolute;
 width:0pt;

 }

 for more info see this 
 examplehttp://jquery.lukelutman.com/plugins/flash/example-text-replacement.html

 all the info you require is on his site :)

 2008/5/30 hcvitto [EMAIL PROTECTED]:



  hi sam
  thanks, i'm using your(?) plugin; looks good but  i already have a
  problem (my fault, for sure ):
  the text inside the flash div remains visible!

  Did i miss anything?

  Thanx vitto

   -- this is the css
  div#header{width:740px;height:200px;}

   -- this is the javascript
  $(document).ready(function(){
 $('#header').flash({
   src: '../flash/header.swf',
   width: 740,
   height: 200,
   flashvars: { menuAttivo: '@@(sezioneMenu)@@' }
 });
  });

   -- this is the html
  div id=header
 pText text text /p
 ul
   lia href=#Artisti amp; eventi/a/li
   lia href=#Calendario/a/li
   lia href=#Biglietti/a/li
   lia href=#Community/a/li
   lia href=#Friends amp; parnters/a/li
   lia href=#Contatti/a/li
 /ul
   /div

  On May 29, 9:41 pm, Sam Sherlock [EMAIL PROTECTED] wrote:
   how abouthttp://jquery.lukelutman.com/plugins/flash/

   full examples provided

   2008/5/29 hcvitto [EMAIL PROTECTED]:

Has anyone ever used this flash embed plugin?

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

Do you know how to pass it some flashvars? I read the documentation
but couldn't find anything clear..

Thanks vitto


[jQuery] Re: flashembed plugin

2008-05-30 Thread hcvitto

hi sam
thanks, i'm using your(?) plugin; looks good but  i already have a
problem (my fault, for sure ):
the text inside the flash div remains visible!

Did i miss anything?

Thanx vitto

 -- this is the css
div#header{width:740px;height:200px;}


 -- this is the javascript
$(document).ready(function(){
$('#header').flash({
  src: '../flash/header.swf',
  width: 740,
  height: 200,
  flashvars: { menuAttivo: '@@(sezioneMenu)@@' }
});
});


 -- this is the html
div id=header
pText text text /p
ul
  lia href=#Artisti amp; eventi/a/li
  lia href=#Calendario/a/li
  lia href=#Biglietti/a/li
  lia href=#Community/a/li
  lia href=#Friends amp; parnters/a/li
  lia href=#Contatti/a/li
/ul
  /div


On May 29, 9:41 pm, Sam Sherlock [EMAIL PROTECTED] wrote:
 how abouthttp://jquery.lukelutman.com/plugins/flash/

 full examples provided

 2008/5/29 hcvitto [EMAIL PROTECTED]:



  Has anyone ever used this flash embed plugin?

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

  Do you know how to pass it some flashvars? I read the documentation
  but couldn't find anything clear..

  Thanks vitto


[jQuery] flashembed plugin

2008-05-29 Thread hcvitto

Has anyone ever used this flash embed plugin?

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

Do you know how to pass it some flashvars? I read the documentation
but couldn't find anything clear..

Thanks vitto


[jQuery] Validation Plugin remote method

2008-05-13 Thread hcvitto

hi
i'm trying to do a remote validation on an email field just like the
Marketo sign-up form one!
I'm not a programmer (don't know json too) and i don't exactly know
what to put in my email.php file (which does the actual check). At
the moment it just does a normal php check therefore nothin' happens.
Could anyone give me some clue or some good link to read from?

Thanks
Vitto


[jQuery] jQuery XSLT plugin question

2008-04-07 Thread hcvitto

hi
i'm using the jQuery XSLT plugin to insert some xml code in a xhtml
page.

how can i use the same function to inject xml data in two different
xhtml blocks?

What i do now is:

 $(document).ready(function(){
$('#leftMenu').xslt({xmlUrl: '../Dati/menuProdotti_jquery.xml',
xslUrl: 'index_xml.xsl'});
$('#topNav').xslt({xmlUrl: '../Dati/menuTop_jquery.xml', xslUrl:
'index_xml.xsl'});
});

but i'd like to call index_xml.xsl only once and use the same xml
file (as you can see i use two of them) for both.

thanks vitto


[jQuery] Re: ajaxfileuploads: how to add more fields?

2008-02-22 Thread hcvitto

hi
i had the same problem. I managed (not yet perfectly) send an entire
form with an upload input.
Check this thread

http://groups.google.com/group/jquery-en/browse_thread/thread/bb2ff357abcefa44#

Maybe it can help you
Vitto



On Feb 20, 8:54 pm, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Hi,

 I'm working with the ajax file upload script from here 
 --http://www.phpletter.com/Demo/AjaxFileUpload-Demo/.  What I'm wanting
 to know is how do I add an additional hidden field into my form and
 have it parsed on the server side?  If you visit here

 http://elearningrd.info/portal/ajaxfileupload.php

 you'll see I have added a hidden field isbn.  But something happens
 when the form is parsed and submitted because on the server end
 (doajaxupload.php), the parameter isbn is not submitted.

 Any help is appreciated, - Dave


[jQuery] Re: $.ajaxFileUpload into an ajax form

2008-02-22 Thread hcvitto

hi Yılmaz
thanks for the reply..
I followed your (good) advice with some change. This is what i did:

1- deleted the  url:' option  from ajaxFileUpload function, so my php
file is called rightly once;
2- when i call the jquery $.ajax function i clone the input created
from the $.ajaxFileUpload into my form
3- all my data are sent to the php script

and that's perfect but..using jquery apparently i cannot specify that
i have a $_FILES['myInputFile'] into the data option (If i get as
$_POST it's ok).
I specified processData as false between the  $.ajax optoin but with
no use.

any idea why?
Vitto



 deleted

On Feb 21, 10:39 am, Yılmaz Uğurlu [EMAIL PROTECTED] wrote:
 I am using this plugin just like that.
 form ...

 ... my other form elements

 p
   label for=fileToUploadChoose File :/label
   input id=fileToUpload type=file name=fileToUpload /
   input type=button id=upload_btn value=Upload!
 onclick=ajaxFileUpload(); /
 /p

 ... other elements,  my form is huge :)
 /form

 ajaxFileUpload() does not need to be posting your form. It's already
 creating iframe and posting file over this element. So, you can use like
 this, i am using with no problem.

 2008/2/20, hcvitto [EMAIL PROTECTED]:





  hi
  i'm using the ajaxfileupload plugin from this site
 http://www.phpletter.com/Our-Projects/AjaxFileUpload/(which works
  great) in a form with different kind of input file. The form is
  ajaxed through the $.ajax jquery function. Following the form
  submitting is a mail with the data from the form.

  Problem: i use the '$.ajax' and the '$.ajaxFileUpload' on the same
  form which calls for the same php file, which is now called twice,
  once per function. So everytime i submit the form two mails are sent,
  one with the data the other with the file attached.

  How can i integrate the ajaxfileupload in my form? anyone does know
  this plugin?

  Thanks Vitto

  this is my form submit ajax function:

  $.ajax({
  type: POST,
  url: curriculumInvio.php,
  data: myData,
  success: function(){
  myFunction
  }
  });

  this is the plugin ajax function:

  $.ajaxFileUpload({
  url:'curriculumInvio.php',
  secureuri:false,
  fileElementId:'fileToUpload',
  dataType: 'json',
  success: function (data, status){
plugin stuff,
  }
  });

 --
 Yılmaz Uğurlu ~ jabber : [EMAIL PROTECTED]  ~http://www.2nci.com~ İzmir


[jQuery] $_FILES and $.ajax function

2008-02-22 Thread hcvitto

hi
i'm trying to send a file uploaded thourgh a form to a php file with
$.ajax function.
In my php file i can grab the value of the file type input only if i
use tha $_POST method; if i use $_FILES nothing happens. Does anyone
know whether jquery $.ajax function supports this type of data in the
data otpion?
How do i do this?
I tried with processData: false with no use..

Thanks Vitto


[jQuery] jQuery Form Plugin help

2008-02-22 Thread hcvitto

hi
i'm trying to use the jQuery Form Plugin from http://www.malsup.com/jquery/form/

it's apparently easy to use but at my first try i can't make anything
out of it!!

this is the page i'm working on

http://www.eco-way.it/projects-and-communication/extra/curriculum.php

In my comuni.js i use

$('#formCurriculum').submit(function() {
$(this).ajaxSubmit();
return false;
});

pretty simple but when i submit nothing shows in firebug and less with
my php file.
Any help out there?
thanks vitto


[jQuery] Re: sending an array[] with $.ajax post

2008-02-15 Thread hcvitto

thanks anyway
i foun a way to do it through this:

var myFunction = function() {
$(#myButton).click(function() {
if (confirm(are you sure?)){
arrayCheckBox = new Array;
$(input:checked).each(function(id) {
myVar = $(input:checked).get(id);
arrayCheckBox.push(myVar.value);
});
$.ajax({type: POST,
url: myScript.php,
data: checkBox=+arrayCheckBox,
success: function(){
//alert(success);
$(#cont1).empty();
$(#cont2).fadeOut().empty();

$(#cont3).load(mpScript2.php, function(){

myFunction2();

});

$(#cont4).fadeIn(300).fadeTo(300, 1).fadeOut(300);
}
});
} else {
alert(not deleted);
}
});
}

hope it can help eveyone else

vitto



On Feb 14, 11:27 pm, andrea varnier [EMAIL PROTECTED] wrote:
 On 14 Feb, 16:59, hcvitto [EMAIL PROTECTED] wrote:

data: what should i write here??? how should i send my
  arrayCheckBox values??

 you have to use a map, an object containing name: value pairs.
 the names will be the names of the variables that the php script is
 expecting to receive.
 so if the script is wating for $_POST['checkBox1'],
 $_POST['checkBox2], etc...
 your object will look like this:

 {'checkBox1': 'true', 'checkBox2': 'true'}

 to put an array into an object, the syntax is

 {'checkBox': [x, y, z, ...]}

 but I've never tried that, and I don't know if it works. you can try.
 just one note.
 these two lines:

 arrayCheckBox = new Array;
 arrayCheckBox = $(#selezionaCancella input:checked);

 don't work as you would expect. that is to say arrayCheckBox is not an
 array at the end.
 this selector $(#selezionaCancella input:checked) returns a jQuery
 object, which is not an array :/
 one way to get around that could be this.

 var toBeSent = {checkBox: []};
 $('#selezionaCancella:checkbox').each(function(index){
   if ($(this).is(':checked')) toBeSent.checkBox[index] = true;
   else toBeSent.checkBox[index] = false;

 });

 $.ajax({url:...,
type: 'post',
data: toBeSent,

 it's very late and I'm a bit tired, so maybe I wrote some cagate,
 but you should get the idea, I hope :)


[jQuery] sending an array[] with $.ajax post

2008-02-14 Thread hcvitto

hi
i've got an array made after a selection of checkboxes and i want to
send this values to a php page to do some sql query.
i couldn't manage to pass the values via post and this is my function

var myFunction = function() {
$(#cancellaRecord).click(function() {
if (confirm(sei sicuro di voler cancellare questi 
record?)){
arrayCheckBox = new Array;
arrayCheckBox = $(#selezionaCancella 
input:checked);
$.ajax({type: POST,
url: 
effettuaCancellazioneMultipla.php,

data: what should i write here??? how 
should i send my
arrayCheckBox values??

success: function(){
alert(success)
}
});
} else {
alert(non cancellato);
}
});
}

Any idea?
thanks vitto


[jQuery] double ajax calls don't work in IE

2008-02-11 Thread hcvitto

hi
got this problem:|

i load a page in a div with the load method using this function:

$(#myLink).click(function(){
$(#myDiv).load(myPage.php, function(){
myFunction();
});
return false;
});

myPage.php has a dropdown menu which makes another load in a div

var myFunction= function() {
(#myDropdown).change(function() {
gruppo = $(#myDropdown).val();
$(#myDiv2).load(myPage2.php.php?id=+id, function() {
 myFunction2();
 });
});
}

it works fine in firefox but not in ie which doesn't show anything
after i choose something from the edrop down.
i guess is something related to linking the function at the right
moment but i'm not really good in Javascript.

Any suggestion?

thanks vitto


[jQuery] Re: attr ie bug

2008-02-01 Thread hcvitto

Hi bohdan
your oneliner works fine :) thanks
but the problem is still there.
Maybe is just a conflict with another script but it's weird that it
happens only in one page..
i'll check better..
thanks vitto

On Jan 31, 7:32 pm, besh [EMAIL PROTECTED] wrote:
 Hi vitto,

 are you sure that the problem isn't somewhere else? Link would be
 fine...

 Anyway, I have a tip for you. What about to make this a oneliner:

 $('a.ppt, a.pdf, a.allegato, a.doc, a.jpg, a.xls, a.external,
 a.zip').attr('target','_blank');

 --
 Bohdan Ganicky

 On Jan 31, 3:46 pm, hcvitto [EMAIL PROTECTED] wrote:

  hi i'm using this code to add the target=_blank attribute to links.

  $(a[href]).each(function(){
  if ($(this).hasClass(ppt) || $(this).hasClass(pdf) || $
  (this).hasClass(allegato) || $(this).hasClass(doc) || $
  (this).hasClass(jpg) || $(this).hasClass(xls) || $
  (this).hasClass(external) || $(this).hasClass(zip)){
$(this).attr(target,_blank);
  }
  });

  it works fine in firefox but not with ie which throws a javascript
  error i can't identify.

  any idea why? is that my error or an ie bug?

  Thanks vitto


[jQuery] attr ie bug

2008-01-31 Thread hcvitto

hi i'm using this code to add the target=_blank attribute to links.

$(a[href]).each(function(){
if ($(this).hasClass(ppt) || $(this).hasClass(pdf) || $
(this).hasClass(allegato) || $(this).hasClass(doc) || $
(this).hasClass(jpg) || $(this).hasClass(xls) || $
(this).hasClass(external) || $(this).hasClass(zip)){
  $(this).attr(target,_blank);
}
});

it works fine in firefox but not with ie which throws a javascript
error i can't identify.

any idea why? is that my error or an ie bug?

Thanks vitto


[jQuery] attr ie bug

2008-01-31 Thread hcvitto

hi
i got this code working in firefox but not in IE.

$(a[href]).each(function(){
if ($(this).hasClass(ppt) || $(this).hasClass(pdf) || $
(this).hasClass(allegato) || $(this).hasClass(doc) || $
(this).hasClass(jpg) || $(this).hasClass(xls) || $
(this).hasClass(external) || $(this).hasClass(zip))
   $(this).attr(target,_blank);
});

am i doing anything wrong, is a ie bug o a jquery bug?

any idea?

thanx vitto


[jQuery] detecting keystrokes for ie

2008-01-15 Thread hcvitto

hi,
i'm using yahoo autocomplete from an input field and jquery to detect
keystroke to trigger function. Everything works fine with the enter
key, but it doesn't work for the tab key (both firefox/navigator and
ie).
Here's my code:

$(#ysearchinput).keyup(function(e){
if(e.keyCode==13){//(e.keyCode==9)   doesn't trigger
anything
taglia();
}
});

I also tried with blur and it works fine in firefox/navigator but not
in ie it looks like it calls the function twice
$(#ysearchinput).blur(function(){
taglia();
});


A page where you can check this

http://www.azero.dyndns.org/web/registrazioni/temp_registrati.php

Go to the second fieldset, check the italia radiobutton and fill the
Ricerca la località input field. Choose a place trying with the
enter key, the tab key and clicking with the mouse the see the
difference.

Any idea why ie works like this?
Thanks vitto


[jQuery] delay problem on kreypress with ie

2007-12-10 Thread hcvitto

hi everybody, just joined this group:)
I've been using jquery for some weeks so i'm not an expert. This is my
problem:
i'm using yahoo autocomplete. On choosing an option from the dropdown
div a function is triggered whether the choice is made with the mouse
(click event) or with the return key(keypress event). In this second
instance it works fine in firefox but in ie if i don't keep the return
key pressed for a millisecond more the event is not triggered!!
Anyone has had this problem (and a solution) before?
I can post a link if you need.
Thanks in advance.


[jQuery] problem with keypress delay and ie

2007-12-10 Thread hcvitto

hi everybody, just joined this group:)
i'm using yahoo autocomplete and jquery (i'm not an expert, just using
jquery for some weeks now).
I've got the autocomplete which trigger a function on choosing an
option both via mouse or keyboard. The click event works fine but if i
use the return event in ie i need to keep pressed the key for a
millisecond more in order to trigger the event.
Has anyone had the same problem before(and a solution)?

the code is :
$(#ysearchinput).keydown(function(e){
if(e.keyCode==13)
taglia();
});

thanks in advance
Vitto