Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.


prince.gen
Beginner Modder
ranks
useravatar
User Info

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

Administrator has disabled public posting
metamodguy
useravatar
User Info

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

Administrator has disabled public posting
prince.gen
Beginner Modder
ranks
useravatar
User Info

Re: How to unload a module automatically

Thanks Stephen,

I found a solution with java script.


Administrator has disabled public posting
metamodguy
useravatar
User Info

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

Administrator has disabled public posting
prince.gen
Beginner Modder
ranks
useravatar
User Info

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>


Administrator has disabled public posting
metamodguy
useravatar
User Info

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

Administrator has disabled public posting

Board Info

Board Stats:   Total Users: 3184  Total Topics: 1207  Total Polls: 7  Total Posts: 4488  Total Posts Today: 1
User Info:   Newest User :  Cterminal   Members Online: 1   Guests Online: 115
Online 
Cterminal
Topic
New
Locked
Topic
New
Locked
Sticky
Active
New/Active
Sticky
Active
New/Active
New/Closed
New Sticky
Closed/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky Active Locked
Active/Sticky
Sticky/Locked
Sticky/Active/Locked