Hello
I've a page in an ASP.net site where i've multiple content placeholders, script tags with JavaScript functions and others elements. I'm hiding all content holders and other html elements using JavaScript except a div which i want to display. But i get the other scripts running in that page. How can i remove them?
Any ideas?
Edit1
Lets consider i've a following page
<html>
<head>
<script type="text/javascript">
alert("unnecessary script")
</script>
</head>
<body>
<script type="text/javascript">
alert("another one")
</script>
<div id="div1">
Div 1</div>
<div id="div2">
Div 2</div>
<div id="div3">
Div 3</div>
<script type="text/javascript">
alert("one more")
</script>
</body>
</html>
I'm loading this page in an iFrame in another page where in the frame OnLoad() i call HideUnneededHTML() which hides everything except div2. How can i remove the unnecessary Javascript too before it gets loaded?