Hexagora Forum
Hexagora Forum
Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Dynamic HTML Editor
 Dynamic HTML Editor
 How to make an object disappear after time?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

rmmarsh
Super User

USA
396 Posts

Posted - 05 Dec 2007 :  20:59:27  Show Profile  Visit rmmarsh's Homepage  Reply with Quote
I have a filled rectangle with text in it. I want it to disappear after a few seconds.

I thought of using Scriptaculous, but it only works on clicks...

How can I do this?

s.dav
Site Admin

Italy
3364 Posts

Posted - 06 Dec 2007 :  09:18:41  Show Profile  Visit s.dav's Homepage  Reply with Quote
You can make this thing using Javascript code acting as follows:

1- create your event (OnClick, OnMouseOut, ...) action JavaCall
2- In the Javacall text write hiderect();
3- in the "Header code" section of the page create a <script tag like this:

<script language="javascript" type="text/javascript">
<!--

function hiderect()
{
setTimeout("hide('FilledCircle1')",500);
}

function hide(n)
{
var o=document.getElementById("ldhe" + n);
//o.style.display="none";
o.style.visibility="hidden";
}

//-->
</script>


Change "FilledCircle1" with the name of the object to hide.

Regards, Davide
Go to Top of Page

rmmarsh
Super User

USA
396 Posts

Posted - 06 Dec 2007 :  18:16:28  Show Profile  Visit rmmarsh's Homepage  Reply with Quote
Hi Davide... there is no "event" that I can use... is there some way I can do this so it disappears after the page fully loads? (it's a small box that tells the viewer to click on a certain bit of text that I want to disappear after a few seconds).
Go to Top of Page

s.dav
Site Admin

Italy
3364 Posts

Posted - 07 Dec 2007 :  11:18:33  Show Profile  Visit s.dav's Homepage  Reply with Quote
Yes, you can use the OnLoad event on the page properties

Regards, Davide
Go to Top of Page

rmmarsh
Super User

USA
396 Posts

Posted - 07 Dec 2007 :  16:32:20  Show Profile  Visit rmmarsh's Homepage  Reply with Quote
Geeze, why didn't I think of that? Thanks...

R
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Hexagora Forum © s.dav Go To Top Of Page
Snitz Forums 2000