I'm relativly new to js, can't get this to work

View: New views
1 Messages — Rating Filter:   Alert me  

I'm relativly new to js, can't get this to work

by guzguz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


<script type="text/javascript">
var W3CDOM = (document.createElement &&
document.getElementsByTagName);

var focusON = new Array();
var focusOFF = new Array();

window.onload = init;

function init()
{
        if (!W3CDOM) return;
        var parent = document.getElementById('commentform');
        var child = parent.getElementsByTagName('input');
        for (var i=0;i<child.length;i++)
        {
                child[i].onfocus = focusON;
                child[i].onblur = focusOFF;
        }
}

function focusON()
{
        this.style.borderBottom="1px solid #cc9900";
}

function focusOFF()
{
        this.style.borderBottom="1px solid #cc9900";
}
</script>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Behaviour Javascript Library" group.
To post to this group, send email to behaviour@...
To unsubscribe from this group, send email to behaviour-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/behaviour?hl=en
-~----------~----~----~----~------~----~------~--~---

LightInTheBox - Buy quality products at wholesale price