|
-
Jul 11th, 2000, 08:55 AM
#1
Thread Starter
Hyperactive Member
Hi all,
I have got two frames on an HTML page. The first frame has a form with a button. When I click on the button I want to make the second form invisible. How do I do that in VBScript or JavaScript.
Thanks in advance.
-
Jul 11th, 2000, 05:21 PM
#2
Fanatic Member
Try this:
************************************************************
<html>
<head>
<title>Hiding my Div</title>
<script language = "javascript">
function Hide()
{
MyDiv.style.visibility = 'hidden';
}
</script>
</head>
<body>
<br><br><br>
<DIV ALIGN = "CENTER" ID = "MyDiv">
This is my div
</DIV>
<br>
<br>
<input type="button" value = "Hide Div" ONCLICK="Hide()">
</body>
</html>
************************************************************
I believe to access this cross-frame just prefix the MyDiv in the function with the name of your frame. Make sure that you wrap the form in a DIV tag and give the DIV tag an ID to refer to it in the javascript function.
Copy and paste the above HTML into notepad and save it as MyDiv.html to see it work. By clicking on the button the text in the Div tag disappears.
Psyrus
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|