Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
Promjena pozadine input-a kad se polje ispuni

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Client-side
View previous topic :: View next topic  
Author Message
Silverlight



Joined: 12 Oct 2008
Posts: 6
Location: Zadar, HR

PostPosted: 18.12.2008 00:29    Post subject: Promjena pozadine input-a kad se polje ispuni Add user to your forum ignore list Reply with quote

Imam kontakt formu, polja: Ime i Prezime, E-mail, Poruka.
ŽELIM, kad se polje Ime i Prezime ispune, i kad se korisnik prebaci (bilo to Tab-om ili bilo kako drugačije) da pozadina polja promjeni boju, recimo iz bijele u sivu.
Jeste skužili, ako ne što niste da bolje objasnim.

_________________
Developer is a machine that converts coffee into code.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Limeni



Joined: 13 Nov 2007
Posts: 109

PostPosted: 18.12.2008 01:04    Post subject: Add user to your forum ignore list Reply with quote

Ovako ti to izgleda:
Code:
<input type="text" value="Ovo polje mjenja boju ;)" onfocus="this.style.backgroundColor = '#666666'" />

Nisam probao al mora radit, javi jel dobro?
Umjesto onfocus mozes stavit i nesto drugo, klik, hover... prouci malo JavaScript!
Back to top
View user's profile Send private message
Silverlight



Joined: 12 Oct 2008
Posts: 6
Location: Zadar, HR

PostPosted: 18.12.2008 01:50    Post subject: Add user to your forum ignore list Reply with quote

KRIVO: ovo mjenja boju kad klikneš na polje Mad .... Svejedno Hvala na pokušaju Smile ?

_________________
Developer is a machine that converts coffee into code.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Silverlight



Joined: 12 Oct 2008
Posts: 6
Location: Zadar, HR

PostPosted: 18.12.2008 01:57    Post subject: Add user to your forum ignore list Reply with quote

SOLVED: onchange="this.style.backgroundColor = 'silver' "

_________________
Developer is a machine that converts coffee into code.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Limeni



Joined: 13 Nov 2007
Posts: 109

PostPosted: 18.12.2008 02:33    Post subject: Add user to your forum ignore list Reply with quote

Silverlight wrote:
KRIVO: ovo mjenja boju kad klikneš na polje Mad .... Svejedno Hvala na pokušaju Smile ?


Rekao sam ti da proucis JavaScript i da mozes koristit bilo koji Event, imas ih tu sve http://www.w3schools.com/jsref/jsref_events.asp Wink

Last edited by Limeni on 18.12.2008 03:09; edited 1 time in total
Back to top
View user's profile Send private message
Silverlight



Joined: 12 Oct 2008
Posts: 6
Location: Zadar, HR

PostPosted: 18.12.2008 02:35    Post subject: Add user to your forum ignore list Reply with quote

ok ok, ali ovo mi je 2. put da mi treba, odsada će ići lakše. Za sve ostale, tu imaju rješeno Very Happy

_________________
Developer is a machine that converts coffee into code.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Limeni



Joined: 13 Nov 2007
Posts: 109

PostPosted: 18.12.2008 02:40    Post subject: . Add user to your forum ignore list Reply with quote

Mislis nece ti JavaScript puno trebat?
Back to top
View user's profile Send private message
Silverlight



Joined: 12 Oct 2008
Posts: 6
Location: Zadar, HR

PostPosted: 18.12.2008 02:43    Post subject: Re: . Add user to your forum ignore list Reply with quote

Limeni wrote:
Mislis nece ti JavaScript puno trebat?


Mislim da hoće, krivo sam se izrazio, mislio sam da se 2. put koristim sa JS na inputu, 1. puta je bilo kad sam u search buttonu nešto napraviti (mogu ja objasnit što ali je opširno ali ako neko misli da mu treba neka se javi)

_________________
Developer is a machine that converts coffee into code.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Client-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group