[jQuery] Re: Validate textbox (required=true) on combobox selected value

2009-06-26 Thread ciupaz

Perfect, thank you all.

Luis


[jQuery] Validate textbox (required=true) on combobox selected value

2009-06-24 Thread ciupaz

Hi all,
I have to validate a textbox if the user select a particular value in
a combobox.
For example, if the user select the Specify new color in the
following combobox:



select id=color name=color
   option value=-1Specify new color/option
   option value=1Red/option
   option value=2Green/option
   option value=3Blue/option
   option value=4White/option
   option value=5Black/option
/select

I have to validate the following textbox:

input id=newColor name=newColor type=text /


with the Validate Plugin:


rules: {
 newColor: {
 required: ??
   },


How can I accomplish this?

Thanks in advance.

Luis.



[jQuery] Redirect to another page on selected option value

2009-06-23 Thread ciupaz

Hi all,
having a select option:

select id=NewUser name=NewUser
option value=0---Insert New User---/option
option value=1Mark/option
option value=2Ted/option
/select

on the click of the input=Submit, if is selected Insert New User,
how can I redirect the user to another page (.aspx, .ascx, .html, etc)
where he can insert the new values?

Thanks in advance.

Luis


[jQuery] Two different statement to access at the same tag

2009-06-17 Thread ciupaz

Hi all,
what's the difference between writing these 2 statement for the same
input checkbox:

input type=checkbox name=check id=check /


1) input:checkbox[name=check]'
2) #check

Thanks in advance.

Luis


[jQuery] Hide button based on combo value

2009-06-16 Thread ciupaz

Hi all,
I have a select option like this:

select id=color name=color
   option value=Select a color/option
   option value=1Red/option
   option value=2Green/option
   option value=3Blue/option
   option value=4White/option
   option value=5Black/option
/select


and a button:

div id=buttons class=sportelloamiacque_formline
input type=submit id=submitButton name=submitButton
value=Continue /
/div

How can I hide the button is the combo has Select a color selected,
and show the button when the user select a color?

Thanks in advance.

Luis


[jQuery] Re: Hide button based on combo value

2009-06-16 Thread ciupaz

Perfect, thank you very much Waseem.

Luis


[jQuery] Change page on selected combo value

2009-06-16 Thread ciupaz

Hi all,
I have an .ascx page with a populated combobox:

select id=Users name=Users
 option value=New User---New User---/option
 option value=TedWilsonTed Wilson/option
 option value=KatyBruceKaty Bruce/option
/select

I need that when the user select New User he will be redirected to
another page where he can insert the new user's value.

Ho can I accomplish this?

Thanks in advance.

Luis
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery (English) group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to 
jquery-en+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] Re: Change page on selected combo value

2009-06-16 Thread ciupaz

So putting value=NewUser.ascx in the option tag?

Luis


[jQuery] Re: Change page on selected combo value

2009-06-16 Thread ciupaz

You're right, by the way, the pages are .ascx pages, ma they lived
alone, like .aspx pages (they're not embedded in .aspx pages).
And the second page where redirect the user in NewUser.ascx (or .aspx,
it all the same).

Thanks for precisation.

Luis


[jQuery] Read values from another pages

2009-06-15 Thread ciupaz

Hi all,
using this plugin:

http://docs.jquery.com/Ajax/jQuery.post

how can I read the values from the other page?

For example, using: $.post(test.htm, { name: John, time:
2pm } );

in the page test.htm how can I read these value and setting some
label?

Thanks in advance.

Luis


[jQuery] Change form action based on button clicked

2009-06-12 Thread ciupaz

Hi all,
I have a form like this:

form id=my_form method=post action=

Name: br /
input type=text id=name name=name /

input type=submit id=submit1 value=Go to page 1 /
input type=submit id=submit2 value=Go to page 2 /

/form

how can I change my action form so the form goes to Page1.htm with
click on button1 and goes to Page2.htm to click on button2, and
mantein the value inserted in textbox name?

Thanks a lot.

Luis


[jQuery] Re: Change form action based on button clicked

2009-06-12 Thread ciupaz

Thanks, it's work, and how can I recover the input text value, without
using the querystring?

Luis


[jQuery] Set MinValue for textbox of datetime

2009-06-11 Thread ciupaz

Hi all,
how can I set a minimun value of type datetime for a textbox?

Thanks in advance.

Luigi


[jQuery] Validate textbox if another textbox is filled

2009-05-28 Thread ciupaz

Hi all,
how can I validate a textbox only if another textbox is filled (by the
user)?

input name=txtControl id=txtControl type=text /

input name=txtValue id=txtValue type=text /

I'd like to make required txtValue only if the user write something
in txtControl.

Has anyone ideas?

Thanks in advance.

Luis


[jQuery] Re: Make textbox visible if checkbox is selected

2009-05-27 Thread ciupaz

Perfect, thank you heohni.

L


[jQuery] Validate between textboxes

2009-05-27 Thread ciupaz

Hi all,
having 3 textboxes, how can I validate to make one of them required if
the other two are not compiled by the user?

Thanks in advance.

Luis


[jQuery] Validate textbox on particulare selected combo value

2009-05-27 Thread ciupaz

Hi all,
I have a select (combobox) like this:

select name=role id=role
  option value=AdminADMIN/option
  option value=UserUser/option
  option value=Other id=OtherOTHER (specify)/option
/select

and a textbox like:

input name=txtOther id=txtOther type=text /

I'd like to validate the textbox if the selected choice is 'Other'.

I'm trying this code:

$(document).ready(function() {
$('#txtOther').hide();

$('#role').change(function() {
var itemValue = $(this).val();
//alert('ItemValue: ' + itemValue);
if (itemValue == 'Other') {
//alert('True');
$('#txtOther').show();
}
else {
//alert('False');
$('#txtOther').hide();
$('#txtOther').validate(false);
}
});
});


$(document).ready(function() {
$(form#myform).validate({
rules: {
role: {
required: true
},
other: {
required: true
}
},
messages: {
ruolo: {
required: span style='color:#ff;'*/span
},
altro: {
required: span style='color:#ff;'Specify
\'Other\'/span
}
}
});
});


but does not work, because the validation error message (Specify
'Other') always appears.

Has anyone ideas?

Thanks

Luis


[jQuery] Validate selectedValue in a combobox

2009-05-26 Thread ciupaz

Hi all,
I have a simple combobox like this:

form id=myForm action= method=post
select id=city
option value=Select a city/option
option value=1Milan/option
option value=2Turin/option
option value=3Rome/option
option value=4Venice/option
/select
/form


and a validation rule like this:

$('form#myForm').validate({
rules: {
city: {
required: true
}
},
messages: {
city: {
required: span style='color:#ff;'Please,
select a city/span
}
}
});

The problem is that doesn't work!
Where I've wrong?

Thanks a lot.

Luis


[jQuery] Re: Validate selectedValue in a combobox

2009-05-26 Thread ciupaz

Thank you Jorn, now with the name attribute it's working.
A simple question.
For business rules I have to give the value -1 to the Select the
city option.
Like this:

select id=city name=city
option value=-1Select a city/option
option value=1Milan/option
option value=2Turin/option
option value=3Rome/option
option value=4Venice/option
/select

How can I validate in this case?

Luis


[jQuery] Re: Validate selectedValue in a combobox

2009-05-26 Thread ciupaz

I must write it in the jquery.validate.js file?


[jQuery] Re: Validate selectedValue in a combobox

2009-05-26 Thread ciupaz

Yes, exactly, and I'm trying this custom method:

function GetCityValue() {
var value = $('#city').val();
if (value == -1) {
  return true;
}
else {
return false;
}
}


and

..
city: {
required: GetCityValue()
   },

but does not working.
Do you have ideas?

Luis


[jQuery] Re: Validate selectedValue in a combobox

2009-05-26 Thread ciupaz

I have created the file jquery.validateCopy.js and added with:

script src=jquery-1.3.2.js type=text/javascript/script
script src=jquery.validate.js type=text/javascript/script
script src=jquery.validateCopia.js type=text/javascript/script

in my HEAD section.
Than I write:

jQuery.validator.addMethod(GetValue, function() {
return true;
}, jQuery.format(Please enter the correct value));

in it.

Then I modify it with:

city: {
  required: GetValue()
},

but does not compile.

What's wrong?

Luis



[jQuery] Autoselect a checkbox on user's input value

2009-05-25 Thread ciupaz

Hi all,
I have two checkboxes like these ones:

span
input name=place id=internal type=checkbox
value=internal /Internal (up to DN 40)br /
input name=place id=external type=checkbox
value=external /External (over DN 40)
/span

and a textbox like this:

Insert the DN number:
input name=DNnumber id=DNnumber type=text /

I'd like a sort of validation that when the user insert a DN number
greater than 40, the checkbox external will be automatically
selected (without change it).

How can I accomplish this?

Thanks a lot.

Luigi


[jQuery] Re: Validate on combobox

2009-05-25 Thread ciupaz

Perfect, thank you very much Jorn.

Luigi


[jQuery] Re: Validate textbox on at least one checkbox selected

2009-05-22 Thread ciupaz

Anyone has ideas?


[jQuery] Validate on combobox

2009-05-22 Thread ciupaz

Hi all,
I need to validate a combobox if the user doesn't make a choice.
My combo is:

select id=utenza name=utenza
   option value=-1null/option
   option value=1utenza1/option
   option value=2utenza2/option
/select

and I'm trying this code:

rules: {
  utenza: {
 required: #utenza[selectedValue=-1]
}
},


but it doesn't work.

How could fix it?

Thanks in advance.

Luigi


[jQuery] Validate textbox on selected value in a combobox

2009-05-21 Thread ciupaz

Hello,
how can I validate several textbox basing on selected combobox?
For example, having this combo:

select id=mySelect name=mySelect
  option value=-1Please select/option
  option value=1CA/option
   option value=2PR/option
   option value=3PROV/option
/select

I'd like to make required the first textbox if the user select the
first value, and so on.


input id=myFirstInput name=myFirstInput type=text /
input id=mySecondInput name=mySecondInput type=text /
input id=myThirdInput name=myThirdInput type=text /

I have to change my validate plugin:

myFirstInput: {
required: true // to complete
   }


but I've not found the correct way.

Has anyone ideas?

Thanks a lot.

Luigi


[jQuery] Re: Validate textbox on option selected value

2009-05-21 Thread ciupaz

It's working in that way Jorn.
Thanks a lot.

Luigi


[jQuery] Re: Validate textbox on option selected value

2009-05-21 Thread ciupaz

A little adding: if I'd like to make required if the selected index is
*both* 1 and 2 (for example), how can I make it?

Luigi


[jQuery] Negate a validation checkbox

2009-05-20 Thread ciupaz

Hi all,
I have checkbox that if the user check it, the near tetxbox is no more
required.
In the normal case, I have:

myTextbox: {
required: #myCheckbox:checked
},


How can I negate this?
Simply speaking, get the tetxbox no required if the checkbox is
checked.

Thanks in advance.

Luigi


[jQuery] Validate textbox on at least one checkbox selected

2009-05-20 Thread ciupaz

Hi all,
I have a textbox and 2 checkbox, and I'd like to validate the textbox
if at least one of the two checkbox is selected.
If is just one checkbox, I'll write:

myTextboxl: {
required: '#myFirstCheckbox:checked'
}


but in the case of 2 checkbox, how can I solve?

Thanks a lot.

Louis


[jQuery] Validate textbox on option selected value

2009-05-18 Thread ciupaz

Hi all,
I have this validate code to validate a textbox if the user select a
combo value:

script type=text/javascript

$(document).ready(function() {
$(form#2form).validate({
rules: {
viaAltro: {
required: #AltraVia:checked
}
},

messages: {
viaAltro: {
required: Insert 'Altra via'
}

}
})
});
/script


and this is the HTML:

select name=viaFornitura id=viaFornitura
optionSeleziona la via/option
 option id=AltraViaAltro/option
/select

label for=viaAltroAltra via/label
input name=viaAltro id=viaFornituraAltro type=text /


but it doesn't work.
Where the problem?

Thanks a lot.

Luigi


[jQuery] Re: Validate textbox on option selected value

2009-05-18 Thread ciupaz

How can I make this Jorn?

Luigi

On May 18, 10:42 am, Jörn Zaefferer joern.zaeffe...@googlemail.com
wrote:
 select-options don't have a checked property. You have to fix the
 selector #AltraVia:checked.

 Jörn



 On Mon, May 18, 2009 at 10:33 AM, ciupaz luigi.zambe...@gmail.com wrote:

  Hi all,
  I have this validate code to validate a textbox if the user select a
  combo value:

  script type=text/javascript

     $(document).ready(function() {
                 $(form#2form).validate({
                 rules: {
                 viaAltro: {
                     required: #AltraVia:checked
                 }
             },

             messages: {
         viaAltro: {
                     required: Insert 'Altra via'
                 }

             }
         })
     });
  /script

  and this is the HTML:

  select name=viaFornitura id=viaFornitura
                 optionSeleziona la via/option
                  option id=AltraViaAltro/option
  /select

  label for=viaAltroAltra via/label
         input name=viaAltro id=viaFornituraAltro type=text /

  but it doesn't work.
  Where the problem?

  Thanks a lot.

  Luigi- Hide quoted text -

 - Show quoted text -


[jQuery] Hide function problem in IE8

2009-05-11 Thread ciupaz

Hi all,
I have this jQuery snippet to hide a DIV block when the user select
one value of a radio button:

script type=text/javascript
$(document).ready(function() {
$(input[name='persona']).change(function() {
if 
($(input[name='persona']:checked).val() == '0') {
alert('PersonaFisica');
$('#ragioneSocialeLine').hide();
$('#partitaIvaLine').hide();
$('#sedeLegale').hide();
$('#nomeCognomeLines').show();
$('#generalitaLines').show();
}
else {
alert('PersonaGiuridica');
$('#ragioneSocialeLine').show();
$('#partitaIvaLine').show();
$('#sedeLegale').show();
$('#nomeCognomeLines').hide();
$('#generalitaLines').hide();
}
});

$(input[name='persona']).trigger('change');


and

span class=sportelloamiacque_formfield
input 
type=radio id=personaFisica name=persona
value=0 / Persona fisica
input 
type=radio id=personaGiuridica name=persona
value=1 / Persona giuridica
/span

The problem is that the user mustclick 2 times to obtain that
functionality in IE8, and it works correctly in Firefox and Chrome.

How can I solve this strange problem?

Thanks a lot.

Luigi


[jQuery] Re: Hide function problem in IE8

2009-05-11 Thread ciupaz

Perfect, thank you Waseem.

Luigi


[jQuery] Re: Disable checkbox

2009-05-07 Thread ciupaz

Perfect, thank you Jorn.

Luigi

On May 6, 3:06 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com
wrote:
 That doesn't need the validation plugin. jQuery can do this by itself:

 $(#first).click(function() {
   $(#other).attr(disabled, true);

 });

 Jörn



 On Wed, May 6, 2009 at 11:37 AM, ciupaz luigi.zambe...@gmail.com wrote:

  Hi all,
  using jQuery.Validate plug-in, how can I disable a checkbox when the
  user check another checkbox in the form?

  Thanks in advance.

  Luigi- Hide quoted text -

 - Show quoted text -


[jQuery] Copy text between textbox

2009-05-07 Thread ciupaz

Hi all,
having a form with a radio button and 2 textboxes, how can I make that
when the user select one value of the radio button, the second textbox
assume the same text value of the first textbox?

Thanks in advance.

Luigi


[jQuery] Disable checkbox

2009-05-06 Thread ciupaz

Hi all,
using jQuery.Validate plug-in, how can I disable a checkbox when the
user check another checkbox in the form?

Thanks in advance.

Luigi