(Evan) wrote in message news:<. com>...
> I have a fairly simple problem that I just cant seem to figure out. I
> am trying to pass and use a div in a function. This is what I have so
> far... it doesnt work though...
>
> <script>
> function divControl(divName){
> divName.innerHTML="test"
> }
> </script>
>
> in the HTML I have three div's
>
> <div id="test1"></div>
> <div id="test2"></div>
> <a onclick="divControl('test1')">test3</a>
>
> The system does not seem to recognize the divName in the function ?!?!
>
> Any help would be greatly appreciated
>
> Evan
Try this:
<script>
function divControl(divName){
divName.innerHTML="test"
}
</script>
</HEAD>
<div id=test1></div>
<div id=test2></div>
<a href='' onclick="divControl(test1);return false">test3</a>
Cheers
Raul