JavaScript and client side scripting.
Moderator: General Moderators
phice
Moderator
Posts: 1416 Joined: Sat Apr 20, 2002 3:14 pm
Location: Dallas, TX
Contact:
Post
by phice » Sat Sep 14, 2002 8:20 pm
Code: Select all
<FORM><INPUT TYPE="Text" NAME="test_Colors" VALUE="Click inside here" onFocus="if (document.all) this.style.backgroundColor='#F0F0F0';" onBlur="if (document.all) this.style.backgroundColor='#FFFFFF';"></FORM>
When a user is input his/her data into text fields (I haven't tested it on anything else), it'll change the background on that certain input tag. Very nice for helping the user know where they're typing..
phpPete
Forum Commoner
Posts: 97 Joined: Sun Aug 18, 2002 4:40 pm
Location: New Jersey
Post
by phpPete » Sat Sep 14, 2002 10:26 pm
Clever
Takuma
Forum Regular
Posts: 931 Joined: Sun Aug 04, 2002 10:24 am
Location: UK
Contact:
Post
by Takuma » Sun Sep 15, 2002 3:18 am
Cool thing, one thing that you can improve on if the text input background color isn't white it'll be a bit of problem so:-
Code: Select all
<FORM><INPUT TYPE="Text" NAME="test_Colors" VALUE="Click inside here" onFocus="if (document.all) this.style.backgroundColor='#F0F0F0';" onBlur="if (document.all) this.style.backgroundColor='"></FORM>
jamesf4218
Forum Newbie
Posts: 9 Joined: Mon Sep 23, 2002 10:36 am
Post
by jamesf4218 » Tue Oct 01, 2002 8:46 am
It doesn't work on Netscape 4.x
phice
Moderator
Posts: 1416 Joined: Sat Apr 20, 2002 3:14 pm
Location: Dallas, TX
Contact:
Post
by phice » Tue Oct 01, 2002 8:49 am
Upgrade.
EvilWalrus
Site Admin
Posts: 209 Joined: Thu Apr 18, 2002 3:21 pm
Location: Springmont, PA USA
Post
by EvilWalrus » Tue Oct 01, 2002 8:54 am
Netscape? That browser is still around? </sarcasm>
jamesf4218
Forum Newbie
Posts: 9 Joined: Mon Sep 23, 2002 10:36 am
Post
by jamesf4218 » Tue Oct 01, 2002 9:30 am
I can't 'upgrade'. I design websites for a living and unfortunately, my log reports still show enough people using N4.x, that I have to program for it. I even try to make the sites work on macs too...
jamesf4218
Forum Newbie
Posts: 9 Joined: Mon Sep 23, 2002 10:36 am
Post
by jamesf4218 » Tue Oct 01, 2002 9:41 am
It doesn't work on Netscape 7.0 or Mozilla either
mikeq
Forum Regular
Posts: 512 Joined: Fri May 03, 2002 3:33 am
Location: Edinburgh, Scotland
Post
by mikeq » Tue Oct 01, 2002 10:00 am
It is probably to do with different DOM in these browsers, the document.all part would need to be changed and maybe this.style.backgroundColor
phice
Moderator
Posts: 1416 Joined: Sat Apr 20, 2002 3:14 pm
Location: Dallas, TX
Contact:
Post
by phice » Wed Oct 02, 2002 10:46 pm
EvilWalrus wrote: Netscape? That browser is still around? </sarcasm>
Netscape? What's that?
noguru
Forum Commoner
Posts: 61 Joined: Thu Jun 06, 2002 4:03 am
Location: Just north of the City Of Gold, Land of Milk and Honey
Post
by noguru » Thu Oct 03, 2002 2:33 am
I thought PHPers (non-Microsoft programmers in general) prefered Netscape above IE??
twigletmac
Her Royal Site Adminness
Posts: 5371 Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK
Post
by twigletmac » Thu Oct 03, 2002 2:36 am
I think everybody likes bashing Netscape...
Mac
phice
Moderator
Posts: 1416 Joined: Sat Apr 20, 2002 3:14 pm
Location: Dallas, TX
Contact:
Post
by phice » Thu Oct 03, 2002 8:50 am
noguru wrote: I thought PHPers (non-Microsoft programmers in general) prefered Netscape above IE??
Over 85% of the worlds webpages are built on IE first, then changed for netscape.
twigletmac
Her Royal Site Adminness
Posts: 5371 Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK
Post
by twigletmac » Thu Oct 03, 2002 8:56 am
Coding to standards from the offset does take a lot of the pain out of that though.
Mac
mydimension
Moderator
Posts: 531 Joined: Tue Apr 23, 2002 6:00 pm
Location: Lowell, MA USA
Contact:
Post
by mydimension » Thu Oct 03, 2002 11:30 am
for myself, i have learned the hard way. now when i start designing a web page i have both IE an Mozilla open and view my changes in both of them. sure its a pain but it works and my pages are better for it. now if only IE would fix its box model........