I would like to have a hypertext "I want to create a custom package" on my webpage. Clicking "I want to create a custom package" should result in hiding the hypertext and displaying a desired DIV which in my case have id="hide2".
What i have right now is:
1:Corresponding javascript
<script type="text/javascript">
function load1()
{
document.getElementById('hide2').style.display='none';
return false;
}
function toggle()
{
document.getElementById('hide1').style.display='none';
document.getElementById('hide2').style.display='';
}
</script>
2. Corresponding HTML code:
<body onLoad="load1()">
<a onclick="toggle()" href="" id="hide1">I want to create a custom package</a>
<div id="hide2">
<p><input type="radio" name="">Name your price:
<input type="text" width="10px">.00($299 minimum)<br>
</p>
</div>
</body>
This code is working almost ok,clicking on the hypertext hides the link and displays "hide2" div. Apart from the fact that it goes back to its body.onLoad mode(i.e hypertext shown and div hidden) just after few milliseconds the div "hide2" comes into existence.
Please be generous in suggesting where i made mistake also apart from providing solution.
Thanks in advance.