Hi
I have prototype.js script.js, validate_form.j s and lib,src forlder for valdate the user registration. i want to use other field validation. when user click from drop down "other" then are displaying other text field and i putted validation="urt _m"
it works fine. but when user does not wnt select from other only wnt select from drop down menu and submit then other field not displaying but message displaying " * mondatory field" but this not should be. this shoud be when user select only other field. and java script problem displaying:
" Line:1595
Char:3
Error:Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus"
Code:0
URL: http://localhost/Yretire_new/index.p...ion&action=Add
[MY code goes here of js -> this is for Hide and show in validate_form.j s]
[CODE=javascript]function HideShowOther(o bj, id)
{
txt = obj.value;
if ( txt == 'Other')
{
Element.show(id );
}
else
Element.hide(id );
}
[/CODE]
[& in Prototype.js]
[CODE=javascript]Element.Methods = {
visible: function(elemen t) {
return $(element).styl e.display != 'none';
},
toggle: function(elemen t) {
element = $(element);
Element[Element.visible (element) ? 'hide' : 'show'](element);
return element;
},
hide: function(elemen t) {
$(element).styl e.display = 'none';
return element;
},
show: function(elemen t) {
$(element).styl e.display = '';
return element;
},
remove: function(elemen t) {
element = $(element);
element.parentN ode.removeChild (element);
return element;
},
[/CODE]
So, Please solve my problem.
Thanks in advance.
I have prototype.js script.js, validate_form.j s and lib,src forlder for valdate the user registration. i want to use other field validation. when user click from drop down "other" then are displaying other text field and i putted validation="urt _m"
it works fine. but when user does not wnt select from other only wnt select from drop down menu and submit then other field not displaying but message displaying " * mondatory field" but this not should be. this shoud be when user select only other field. and java script problem displaying:
" Line:1595
Char:3
Error:Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus"
Code:0
URL: http://localhost/Yretire_new/index.p...ion&action=Add
[MY code goes here of js -> this is for Hide and show in validate_form.j s]
[CODE=javascript]function HideShowOther(o bj, id)
{
txt = obj.value;
if ( txt == 'Other')
{
Element.show(id );
}
else
Element.hide(id );
}
[/CODE]
[& in Prototype.js]
[CODE=javascript]Element.Methods = {
visible: function(elemen t) {
return $(element).styl e.display != 'none';
},
toggle: function(elemen t) {
element = $(element);
Element[Element.visible (element) ? 'hide' : 'show'](element);
return element;
},
hide: function(elemen t) {
$(element).styl e.display = 'none';
return element;
},
show: function(elemen t) {
$(element).styl e.display = '';
return element;
},
remove: function(elemen t) {
element = $(element);
element.parentN ode.removeChild (element);
return element;
},
[/CODE]
So, Please solve my problem.
Thanks in advance.
Comment