View Full Version : How to enhance form fields
Rookie
04-22-2005, 03:14 AM
I have been trying to make my form fields (text boxes, text areas, buttons, etc..) cooler looking. I am obsessed with macromedia's way of doing form fields and have been trying to figure out how they do it for a while. I believe that it is some sort of javascript command but I can't decide if it is located in there style sheets or what.
Anybody have any ideas?
www.macromedia.com
bruce
04-22-2005, 09:12 AM
i think they use flash.
Bruce
DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)
Rookie
04-22-2005, 09:48 AM
I actually figured out a way to do it using style sheets and javascript commands. Basically add a couple extra classes to the style sheet and in the html part of the page I referrenced them using onFocus and onChange. It works quite well
I looked at the code for the pages on macromedia's website and it looks like they are using js functions to do it so I don't think it is flash. I'm probably wrong though.
Brian The Snail
06-01-2005, 09:35 AM
Here's something using CSS and JavaScript that is quite similar to what you require.
[quote]
<html>
<head>
<style>
.lowLight {border-top:thin solid #808080;border-right:thin solid #808080;border-bottom:thin solid #A0A0A0;border-left:thin solid #A0A0A0}
.highLight {border:thin solid #60DF50}
</style>
<script type="text/javascript">
function doHighlight(oObject,status)
{
if(status=="on") {oObject.className="highLight";}
else {oObject.className="lowLight";}
}
</script>
</head>
[b]
<form style="background-color:#E0E0E0;padding:25px;width:50%">
<input type="text" name="textField" id="textField" class="lowLight" onClick="doHighlight(this,'on');" onBlur="doHighlight(this,'off');">
</form>
</body>
</html>
[quote]HTH,
[quote]Andy.
vBulletin® ©Jelsoft Enterprises Ltd.