Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

How to unload a module automatically

How to unload a module automatically

How to unload a module automatically in 10 seconds. Thanks.

Edited By: prince.gen
12-Apr-10 07:20:05

prince.gen
Beginner Modder
ranks
useravatar
Offline
10 Posts
Administrator has disabled public posting

Re: How to unload a module automatically

Do you mean this:

- user loads page
- they see the module
- after 10 seconds the module just disappears, using javascript

?

If so, MetaMod can't help you. MetaMod only controls the initial inclusion of modules. You would need some clever Javascript to make modules disappear dynamically. There may be other extensions on the Joomla Extension DIrectory that may be able to help with this - otherwise, it's a JavaScript coding task.

Sorry,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3313 Posts
User info in posts
Administrator has disabled public posting

Re: How to unload a module automatically

Thanks Stephen,

I found a solution with java script.

prince.gen
Beginner Modder
ranks
useravatar
Offline
10 Posts
Administrator has disabled public posting

Re: How to unload a module automatically

Hi prince.gen,

that sounds great - can you share how you did that? I am sure you aren't the only user who wants to be able to do it smile

Cheers,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3313 Posts
User info in posts
Administrator has disabled public posting

Re: How to unload a module automatically

Actually this is not unloading a module. but div. So we can use this code to unload a div inside a module. This means all content or partial of content in a module can be unload or hide by using this code.

The code is :

<head>

<script type = "text/javascript">

function hideMessage() {
document.getElementById("Your div id").style.display="none";
}

function startTimer() {
var tim = window.setTimeout("hideMessage()", 5000);  // 5000 milliseconds = 5 seconds
}

</script>
</head>



<body onload = "startTimer()">

<div id = "Your div id" style="display:block">Welcome Message</div>

</body>

prince.gen
Beginner Modder
ranks
useravatar
Offline
10 Posts
Administrator has disabled public posting

Re: How to unload a module automatically

Hey that's great prince.gen. Thanks for sharing!

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3313 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5913
Dormant:
User Info:
 
Total Users:
10796
Newest User:
mokao3
Members Online:
0
Guests Online:
148

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked