Loading...
 
Skip to main content

Features / Usability


Creating a module with jscript

The code runs;

Image
Copy to clipboard
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> /* EDITABLE VARIABLES */ var msgLoad = 'Please wait...'; var msgError = 'Error: Unable to load recent threads!'; var timeLimit = 3; /* Leave these as they are. */ var timeWaited = 0; var timeIncrement = 100; var timeDivisor = 1000/timeIncrement; function checkStatus() { txt = document.getElementById('recent').innerText; if (txt != msgLoad && txt != msgError) {document.getElementById('loading').style.display = 'none';} else if (txt == msgLoad && timeWaited/timeDivisor >= timeLimit) {document.getElementById('recent').innerText = msgError;} else {setTimeout("timeWaited++;checkStatus()",timeIncrement);} } setTimeout("checkStatus();",1); <div id="recent"> <div id="loading">Please wait...</div> </div>


In action, it can be seen here: http://yourlost.com/telford/recent_threads.htmlQuestion


What I want is to have that script running as a module on the home page of my site (www.yourlost.com). However, when I try to add it, I get this error message

Fatal error: Smarty: in evaluated template line 14: syntax error: invalid attribute name: '=' (Smarty_Compiler.class.php, line 1439) in /home/jaldo/public_html/lib/smarty/Smarty_Compiler.class.php on line 2068


I'm an absolute n00b with Tiki, and I'm stumped. Can anyone suggest to me a way of making the jscript code function within Tiki?

Try putting the javascript code between {literal} and {/literal} .