Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [$] [js] problem z dodawaniem stylu border do Tagu select dla IE
qrcze_pieczone
post
Post #1





Grupa: Zarejestrowani
Postów: 59
Pomógł: 2
Dołączył: 13.04.2007

Ostrzeżenie: (0%)
-----


Witam

Tak jak w temacie
dodaję z poziomu js lub $ style do danego selecta
  1. document.getElementById(id_input).style.border='1px solid #FF0000';
  2. albo w $
  3. $('#id_input').css('border','1px double #c00000')
  4. lub
  5. $('#id_input).addClass('error')

i pod normalnymi przeglądarkami to działa
ale pod IE nie (IMG:style_emoticons/default/sad.gif)
jak by ktoś maił pomysł jak sobie z tym poradzić to czekam jak zwykle na dobrą radę
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
nospor
post
Post #2





Grupa: Moderatorzy
Postów: 36 559
Pomógł: 6315
Dołączył: 27.12.2004




No to debuguj i po kolei dojdziesz do bledu...
Kod
for(index in _input_control_){
                    var id_input = _input_control_[index];
alert('Tu ma byc id:'+id_input);
                var id_value = document.getElementById(id_input).value;                
alert('Tu ma byc wartosc:'+id_value);
                    if(id_value==""){
alert('Tu wszedlem');
                    document.getElementById(id_input).style.border='1px solid #FF0000';    
                        error=true;
                    }
                    if(id_value!=""){
                        document.getElementById(id_input).style.border='1px solid #ccc';
                        if(!error) error=false;
                    }
                }

co ci wyswietla?
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 12.10.2025 - 14:27