[jQuery] AJAX doesn't work on remote server

2008-10-10 Thread altern

I need some help because of great confusion that make me crazy. I have
ajax query function which works fine on firefox, ie (both 6  7)
locally and with firefox on remote server. But it fails on ie (both 6
 7) if I use it on remote server. I have PHP code http://www.pastie.org/289451
that generates js code http://www.pastie.org/289453. What am I doing
wrong?

Error function for some reason is called earlier then timeout passes.
I always get error function called when I try to execute
get_response() function. Just on IE and just when I work with remote
server. Thanks in advance!


[jQuery] Look for validation plugin option

2008-09-04 Thread altern

How can I point the element in which validation error is shown? I have
specific validation form that consists of many radio buttons.
Vaidation error is shown near the first radio button that have the
same 'name' attribute. Problem is that I do not want to have error
near the first radio element, but near the last or in another 'td'
element. All radio buttons are in separate td element and are
grouped into table row. Example:
tr
thName/th
thA/th
thB/th
thC/th
thD/th
/tr
tr
tdquestion 1/td -- I want error to be shown here
tdAinput type=button class=required name=answer1 value=A/
/td -- error is shown here
tdBinput type=button class=required name=answer1 value=B/
/td
tdCinput type=button class=required name=answer1 value=C/
/td
tdDinput type=button class=required name=answer1 value=D/
/td
/tr

'ErrorLabelContainer' option does not work. It causes great bunch of
errors to be shown in one element and it looks like 'This field is
required. This field is required. This field is required. This field
is required...'

Any thoughts are appreciated


[jQuery] Re: Look for validation plugin option

2008-09-04 Thread altern



On Sep 4, 3:40 pm, Jörn Zaefferer [EMAIL PROTECTED]
wrote:
 You can use the showErrors and errorPlacement options to customize
 error placement. Start with errorPlacement, which is easier to
 implement.


Thanks. Your answer was really helpfull. For some reason I didn't
notice this option in documentation :(


[jQuery] hideErrors. bug or not?

2008-09-04 Thread altern

Could someone tell, why after clicking on sumbit button on second time
all validation messages disappear? I have form with a lot of radio
buttons which are required. I've overriden highlight and unhighlight
methods.
It is related, I guess, to the hideErrors usage inside validation
plugin. Am I wrong?

My code of overriden methods:

highlight: function(element, errorClass) {
$(element).addClass(errorClass);
var label = $(element.form).find(label[for= +
element.id + ]);
label.addClass(errorClass);
label.append('error message');
},
unhighlight: function(element, errorClass) {
$(element).removeClass(errorClass);
var label = $(element.form).find(label[for= +
element.id + ]);
label.removeClass(errorClass);
label.empty();
},