See if this basic example helps:
Code:
<script type="text/javascript">
window.onload=function()
{
var sr=document.getElementById('sr'), // get the ID of the Service Request button
pr=document.getElementById('pr'), // get the ID of the Product Request button
both=document.getElementById('both'), // get the ID of Both button
service_req=document.getElementById('service_req'),
// get the ID of the element (div) that holds Service Requests's content
product_req=document.getElementById('product_req') ;
// get the ID of the element (div) that holds Product Requests's content
sr.onclick=function(){reset();service_req.style.display='';}
pr.onclick=function(){reset();product_req.style.display='';}
both.onclick=function(){reset();service_req.style.display='';
product_req.style.display='';}
reset();
}
function reset()
{
service_req=document.getElementById('service_req'),
// get the ID of the element (div) that holds Service Requests's content
product_req=document.getElementById('product_req') ;
// get the ID of the element (div) that holds Product Requests's content
service_req.style.display='none';
product_req.style.display='none';
}
</script>
<input type="button" value="Service Request" id="sr">
<input type="button" value="Product Request" id="pr">
<input type="button" value="Both" id="both">
<div id="service_req">
<h1>Service Request</h1>
Contents Here. All the elements you wish which includes form.
</div>
<div id="product_req">
<h1>Product Request</h1>
Contents Here. All the elements you wish which includes form.
</div>