[jQuery] Re: fadeIn and Out not working on IE but working on firefox

2009-10-15 Thread Mr J

hi,
thanks for the quick answer, i did try it but it did not work, i think
is something to do with the DOM because the inputs are not in the DOM
when the page is loaded but i do not see how to solve it.

thanks for the help

On 15 okt, 11:21, "Jonathan Vanherpe (T & T NV)" 
wrote:
> Mr J wrote:
>
> > hi,
> > i run into a probelm when i want to use the fadein and out function
> > for a new dynamic added inputs.
> > you can add inputs dynamically and i want to do that with fadeIn and
> > Out. it is working great in firefox but not in IE. i think the problem
> > is the new added rows are not in the DOM when the page is loaded and
> > that is why the effect is not working i tried few solutions but i did
> > not manage to solve the problem.
>
> > here is the test page i'm working on it.
> >http://www.voorbeeldvan.uwapothekeronline.nl/pages/New_Herhaalrecepte...
>
> > any help will be appreciated.
>
> have you tried styling your input fields (border: 1px solid #000)? It
> might have to do with the fact that the page is showing native widgets
> instead of styled ones.
>
> Jonathan
>
> --
> Jonathan Vanherpe - Tallieu & Tallieu NV - jonat...@tnt.be- Tekst uit 
> oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -


[jQuery] fadeIn and Out not working on IE but working on firefox

2009-10-15 Thread Mr J

hi,
i run into a probelm when i want to use the fadein and out function
for a new dynamic added inputs.
you can add inputs dynamically and i want to do that with fadeIn and
Out. it is working great in firefox but not in IE. i think the problem
is the new added rows are not in the DOM when the page is loaded and
that is why the effect is not working i tried few solutions but i did
not manage to solve the problem.

here is the test page i'm working on it.
http://www.voorbeeldvan.uwapothekeronline.nl/pages/New_Herhaalrecepten.asp?articleid=113816

any help will be appreciated.


[jQuery] dynamic validation in a smart way

2009-10-13 Thread Mr J

dear all,
thanks for the help so far.
i was converting some validation forms we have to the new jQuery and i
run into a problem i hope i can get some assist to solve it.
here is the situation: i have a dynamic fields that are added to the
form, i want to validate these added fields.

the scenario is as follow:
There are three input fields for the medicines by default. just the
(Geneesmiddel) in the first row is mandatory and if you filling the
Geneesmiddel field then the rest of the three fields are mandatory
(Sterkte ,Aantal, Gebruik).
i did validate the first, second and the last rows manaully. i added
also a rule for the Geneesmiddel field so if there are some new added
fields it will also validate them. my problem now is how to add the
rules for the three added fields only if new Geneesmiddel field is
added and is not empty. now it is by default mandatory even if the
Geneesmiddel field is empty.
also i would like to have some suggestion on how to improve the code
to make it something generic and not these manually hardcoded checks
for id's.

here is a link if you want to check the page:
http://www.voorbeeldvan.uwapothekeronline.nl/pages/New_Herhaalrecepten.asp?articleid=113816

any help will be very appreciated.


[jQuery] validation for multiple element in a form is not working with the new jQuery validation plug in

2009-09-07 Thread Mr J

hi all,
before upgrading to the new jQuery i have the function below working
just fine. it validate according to the id sent to the fucntion. last
week i upgraded to the new jQuery which force me to use also the new
jQuery validation and from that date the function is not working good.
it validate just the first case but not the second one. if i commented
the first part then the second part is validated and the third part
not.
i do not know what is changed in the new jQuery validation or how to
fix it.
i debug it and it is goign into the case but not validating the id's.
the case 1 and 2 are working but the 3 and the 4 not.

any help will be very very appriciated.
here is the code:

function showStep(intStep, intValidate){

 var blnValidated = false;
if(intValidate!=0) {
blnValidated = validateStep(intValidate);
}
else {
blnValidated = true;
}
if(blnValidated) {
for (i=1; i<6; i++)
{
jQuery('#step'+ i).hide();
}
jQuery('#step'+intStep).show();
}
}

function validateStep(step)
{
var blnValid = true;
switch(step)
{
case 1:
blnValid = jQuery("#TandartsenGroepKind").validate({
focusCleanup: true,
onkeyup: false,
rules: {
Voorletters:{ required: true },
Naam:{ required: true, Alpha: true },
Straat:{ required: true },
Postcode:{ required: true, Postcode: 
true },
Woonplaats:{ required: true, Alpha: 
true},
Geboortedatum:{ required: true, date1: 
true},
Geslacht:{ required: true},
HuisTelefoonnummer:{ required: true},
A1 : { required: true},
A3 : { required: true},
Verzekerd:{ required: true}
},
messages:{
Voorletters:{ required: " " },
Naam:{ required: " " , Alpha: 
" "},
Straat:{ required: " "},
Postcode:{ required: " ", 
Postcode: " "},
Woonplaats:{ required: " " , 
Alpha: " "},
Geboortedatum:{ required: " ", 
date1: " "},
Geslacht:{ required: " "},
HuisTelefoonnummer:{ required: 
" "},
A1 : { required: " "},
A3 : { required: " "},
Verzekerd:{ required: " "}
},
success: function(label) {
label.html(" ").addClass("checked");
}
}).form();
break;
case 2:
blnValid = jQuery("#TandartsenGroepKind").validate({
focusCleanup: true,
onkeyup: false,
rules: {
VVoorletters:{ required: true },
VNaam:{ required: true, Alpha: true },
VStraat:{ required: true },
VPostcode:{ required: true, Postcode: 
true },
VWoonplaats:{ required: true, Alpha: 
true},
VGeboortedatum:{ required: true, date1: 
true},
VGeslacht:{ required: true},
VHuisTelefoonnummer:{ required: true},
VVerzekerd:{ required: true}
},
messages:{
VVoorletters:{ required: " " },
VNaam:{ required: " " , Alpha: 
" "},
VStraat:{ required: " "},
VPostcode:{ required: " ", 
Postcode: " "},
VWoonplaats:{ required: " " , 
Alpha: " "},
VGeboortedatum:{ required: " ", 
date1: " "},
VGeslacht:{ required: " "},
 

[jQuery] Re: looping through all elements of a form and keeping track of different font size

2009-06-03 Thread Mr J

Thanks Rob even if it was not the answer i was looking for.
i'm agree with you about what you said, but our customers are old
fashion people and they asked a lot for this option to be in the
websites, that is why we need to implement it for them.

even though i'm not agree with you on this:

> Not one web site that I frequently visit uses any such script.  Even
> if it did, I wouldn't use it.  Hardly "famous" or used by "most" web
> sites.
i do not know which websites are you browsing but if you just google
it you will see a lot of implementation for this using jQuery, there
are even plugin for this.


thanks anyway for the remarks.

Noufel


On 3 jun, 14:35, RobG  wrote:
> On Jun 3, 6:48 pm, Mr J  wrote:
>
> > hi all,
> > here is the scenario:
> > i have created an option on a website to give the possibity to the
> > user to change the font size (smaller, bigger, reset),
>
> A complete waste of time.  Modern browsers allow the user to control
> the size of text using one or more of:
>
>   1. User-defined style sheets
>   2. Browser preferences for minimum and standard font sizes
>   3. Zoom text sizes using ctrl+ or ctrl-
>   4. Reset font sizes using ctrl-0
>
> > like the famous
> > x3 'A' that we see in most of the websites.
>
> Not one web site that I frequently visit uses any such script.  Even
> if it did, I wouldn't use it.  Hardly "famous" or used by "most" web
> sites.
>
> > the code i have is based
> > on a plugin copywrite to (http://cool-javascripts.com).
> > now i'm facing a problem with different font size for different
> > elements.
>
> Forget it.  Ditch the script, let users control font sizes using
> browser-native tools.
>
> [...]
>
> > any suggestions or something that will put me in the right path will
> > be very appreciated.
>
> See above.
>
> --
> Rob


[jQuery] looping through all elements of a form and keeping track of different font size

2009-06-03 Thread Mr J

hi all,
here is the scenario:
i have created an option on a website to give the possibity to the
user to change the font size (smaller, bigger, reset), like the famous
x3 'A' that we see in most of the websites. the code i have is based
on a plugin copywrite to (http://cool-javascripts.com).
now i'm facing a problem with different font size for different
elements.
to make the text bigger and smaller works like a charm but to reset
the font size is not working so good.

here is the code of the plug in the reset part:

//on clicking default font size button, font size is reset

jQuery(container + " .defaultFont").click(function(){
jQuery("#content *").css('font-size', defSize);

// coockie to rememebr the selected font size
updatefontCookie(target, defSize);
});

here is how i'm calling the function:

fontSize("#container", "#content *", 8, 12, 20);

container is where i have the images to make the text smaller or
bigger
content is the div that has the content that i want it to be changed
8 is the smallest fonr size
12 default
20 max

now the thing is that i have different font sizes in the page and some
of them don't have a class just the  
when i'm clicking the rest button then i'm getting everything with
size 12 and this is what i want to change.
i want to remember the current font size and set it back.

any suggestions or something that will put me in the right path will
be very appreciated.



[jQuery] jQuery validation and captcha in a form

2009-03-24 Thread Mr J

dear all,
i'm trying to implement the captcha in a form where i'm using jquery
validation and also custom validation methods.
this is the code i have so far:

jQuery.validator.addMethod("Captcha", Function(value, element) {
   jQuery.get("/functions/app/CaptchaAjax/captcha.asp?
validateCaptchaCode=" +  jQuery("#captchacode").val() + "", function
(data){
if (data == 1)
return true;
});
return this.required(element) || true;
});

the problem i have so far is that: if i get out from the jQuery.get
function then i will loose the variable data and if i put the return
this.required(element) || true; then i will get an error because the
addmethod function needs it.

is there i work around this? or may be another way to do it?

Thanks



[jQuery] jQuery validation and captcha

2009-03-24 Thread Mr J

dear all,

i'm working with jQuery validation to validate the fields in a form.
in this form i have also the captcha (the check is verified through
ajax).
check the code below:

jQuery.validator.addMethod("Captcha",
function(value, element) {
jQuery.get("/captcha.asp?validateCaptchaCode=" +  jQuery
("#captchacode").val() + "", function(data){
if (data == 1)
{
result = true;
}
return true;
});
return this.required(element) || true;
});