Hello My All Dear Friends!
I am very new to java.And I need to a little thing with java I hope you awesome guys could do it.

For example there is a div width some id.When I click some button it should be maximized to full screen with fixed position and 100% height and width.I have tried below code for this propose But it don't work for me in site..



Code:
<style>

#someId {
display: block;
background-color: black;
color: white;
width: 100px;
height: auto;
}

</style>

<script type="text/javascript">
function changeWidth(elemId, w){
     var elem = document.getElementById(elemId);
      elem.style.width = w;
}
</script>



<input type="button" value=" Change Div Width " onclick="changeWidth('someId', 500);" />

<input type="button" value=" Back To Orignal " onclick="changeWidth('someId', 100);" />

<div id="someId">
Div content.......

</div>

Please Help
Thanks In Advance