[thelist] accessing an input type (ie checkbox) through a nested CSS style
VOLKAN ÖZÇELİK
volkan.ozcelik at gmail.com
Wed Sep 7 09:52:06 CDT 2005
Though it depends on other issues DOM may be a solution:
<script type="text/javascript">
window.onload=function(){
var arInput=document.getElementsByTagName("input");
for(var i=0;i<arInput.length;i++){
if(arInput[i].type.toLowerCase()=="checkbox"){
arInput[i].className="myLovelyCheckBoxClass";
}
}
}
</script>
Not tested the code.
HTH,
Volkan.
On 9/7/05, Roger Newbrook <roger.newbrook at scientiasolutions.com> wrote:
> Hello boys and girls,
>
> I am trying to style a series of forms using CSS. I have access to the
> stylesheet to do this but not the actual codebase to add necessary
> additional classes etc.
>
> I want to redefine my text boxes with a different than default border.
> Initially I achieved this through redefining the input tag. A side effect of
> this is, that in redefing the input tag I am inheriting the redefined border
> on checkboxes and radio buttons.
>
> I have googled about on this problem, and the general idea/solution is that
> certain input types are given a corresponding class (ie <input
> type="checkbox" class="checkbox">. Here lies the problem, I don't have
> access to the forms to change the code. :( (reminds me a bit of the song
> "there's a hole in my bucket dear Liza")
>
> some other sites suggest using definitions such as
>
> input.text or input[type="text"] as ways of accessing the input type. I have
> experimented with this but can't get them to work. Am I missing something
> simple here? Has anyone tackled a problem like this before?
>
> hope someone can help...
>
> Roger
> --
>
> * * Please support the community that supports you. * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>
More information about the thelist
mailing list