Hy Guys! I´m trying use a js to random my banner´s position. When i paste the JS code in the editor, he changes the code and them the code stop to work.
ORIGINAL CODE:
<script type="text/javascript">
function randOrd()
{
return (Math.round(Math.random())-0.5);
}
function randBan(){
var parceiros = new Array();
parceiros[0]='<a href="http://www.caixapretta.com.br" target="_blank" title="Caixa Pretta - Desligue a TV e vá ler um blog!"><img border="0"
src="http://www.caixapretta.com.br/wp-content/themes/caixapretta/imagens/banner_cp.jpg"/></a>';
parceiros[1]='<a href="http://www.ocioso.com.br/default.asp" target="_blank" title="Está no seu momento de descanso né? Entao clique aqui!"><img border="0"
alt="Está no seu momento de descanso né? Entao clique aqui!" src="http://www.ocioso.com.br/imagens/icone.gif"/></a>';
parceiros[2]='<a href="http://www.chongas.com.br" target="_blank"><img border="0" alt="As novidades da internet"
src="http://i178.photobucket.com/albums/w268/lamenza/selo_chongas_120x60px.gif"/></a>';
parceiros.sort( randOrd );
for(i=0;i<=parceiros.length-1;i++) document.write(parceiros[i] + '<br>');
return;
}
randBan();
</script>
AFTER THE NING TEXT EDITOR
<script type="text/javascript">// <![CDATA[
function randOrd()
{
return (Math.round(Math.random())-0.5);
}
function randBan(){
var parceiros = new Array();
parceiros[0]='<a href="http://www.caixapretta.com.br" target="_blank" title="Caixa Pretta - Desligue a TV e vá ler um blog!"><img border="0"
src="http://www.caixapretta.com.br/wp-content/themes/caixapretta/imagens/banner_cp.jpg" /><\/a>';
parceiros[1]='<a href="http://www.ocioso.com.br/default.asp" target="_blank" title="Está no seu momento de descanso né? Entao clique aqui!"><img border="0"
alt="Está no seu momento de descanso né? Entao clique aqui!" src="http://www.ocioso.com.br/imagens/icone.gif" /><\/a>';
parceiros[2]='<a href="http://www.chongas.com.br" target="_blank"><img border="0" alt="As novidades da internet"
src="http://i178.photobucket.com/albums/w268/lamenza/selo_chongas_120x60px.gif" /><\/a>';
parceiros.sort( randOrd );
for(i=0;i<=parceiros.length-1;i++) document.write(parceiros[i] + '
');
return;
}
randBan();
// ]]></script>HELLLLLLP ! :)
Permalink Reply by Emmanuel Ace on May 30, 2012 at 5:41pm Try in Custom Code

Permalink Reply by Patrick Chappelle on May 30, 2012 at 8:49pm Try wrapping it in a div tag.
Mike Collins replied to Rafael's discussion 'Multiple Chat rooms for Ning 3.0'
Michael Goebel replied to Michael Goebel's discussion 'Where have the text boxes on the profile pages gone ?!?!'
Melinda Orr replied to Michael Goebel's discussion 'Where have the text boxes on the profile pages gone ?!?!'
Melinda Orr replied to Michael Goebel's discussion 'Where have the text boxes on the profile pages gone ?!?!'
Melinda Orr replied to Michael Goebel's discussion 'Where have the text boxes on the profile pages gone ?!?!'
Kos replied to soaringeagle's discussion 'killer penguins'© 2013 Created by Ning.
