Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Textbox color 1

Status
Not open for further replies.

aldrin001

Programmer
Mar 3, 2003
5
0
0
BE
Does anybody nows a way to change the color of a textbox in vbscript with Interdev
 
Something like this? I have a function that generates the client side script shown below.

hth
C

Code:
<html>
<body>
<input type=textbox name=txtME>
<input type=textbox name=txtYou>
<SCRIPT language=vbscript FOR=&quot;txtME&quot; EVENT=onfocus>
  window.event.srcElement.style.backgroundcolor = &quot;yellow&quot;
  window.event.srcElement.style.color = &quot;blue&quot;
</SCRIPT>
<SCRIPT language=vbscript FOR=&quot;txtME&quot; EVENT=onblur>
 window.event.srcElement.style.backgroundcolor = &quot;white&quot;
 window.event.srcElement.style.color = &quot;black&quot;
</SCRIPT>
        </body>
        </html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top