Hi
The question is how to know if the clients browser supports java script?
I searched on the internet and found no clue to make the servlet or the scriptlet recognize if the client Java script enabled so I tried to make a workaround
1-First create a div that will contain the content that you would like to show if java script is enabled
Code:
<div id="javascriptdiv" style="visible:none">
some html
</div>
2-Create a Javascript method called checkenabled()
Code:
<script>
function checkenabled()
{
document.getelementbyid("javascriptdiv").style.visible=true;
}
</script>
3-in the body tag put the checkenabled method in the onload attribute
Code:
<body onload="checkenabled()">
doing that will make the div visible only if the java script is enabled in the browser