Page 1 of 1

How insert JavaScirpt for srolling news ?

Posted: Sat Nov 24, 2007 11:02 am
by percusionista
I'm tryng to convert an static html site into CMSMS one, using ML.

I have an iframe srolling news from an html page with auto srollig Js.

I've tried inserting JS into Page content or in template  but always appear syntax error warnig.

I've tried to do with {literal} {/literal} tags envolving JS but sill goes wrong.

I'll show you the pages and codes:

http://www.iwebnet.com/Aqualife3/esp/novedades_esp.html This is the original srolling page with JS inside

http://www.iwebnet.com/Aqualife3/esp/index-video.htm this is the static html page with iframe scrolling

http://lnx.percusioncreativa.com/ml/index.php?page=novedades&hl=es_ES CMSMS page with warning

Code of template used:


{sitename} - {title}
{metadata}
{stylesheet}









  {content}

{literal} 


/*********************************************** * IFRAME Scroller script- © Dynamic Drive DHTML code library (www.dynamicdrive.com) * This notice MUST stay intact for legal use * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code ***********************************************/
  //Specify speed of scroll. Larger=faster (ie: 5) var scrollspeed=cache=2 
//Specify intial delay before scroller starts scrolling (in miliseconds): var initialdelay=500  function initializeScroller(){ dataobj=document.all? document.all.datacontainer : document.getElementById("datacontainer") dataobj.style.top="5px" setTimeout("getdataheight()", initialdelay) }  function getdataheight(){ thelength=dataobj.offsetHeight if (thelength==0) setTimeout("getdataheight()",10) else scrollDiv() }  function scrollDiv(){ dataobj.style.top=parseInt(dataobj.style.top)-scrollspeed+"px" if (parseInt(dataobj.style.top)

{/literal}







This is the content code inserted by my with wysiwyg off
 


   
         
         Feria CONXEMAR 2007
            Vigo 2-3-4 de Octubre
        ver mas   
     
     
            Sistema Turbo Fogger especial para vitrinas     
ver mas          
              Nuevo Sistema de Control    
ver mas       
    ISO 22000
     
  ver mas    
   

Re: How insert JavaScirpt for srolling news ?

Posted: Sat Nov 24, 2007 1:52 pm
by alby
percusionista wrote: I'm tryng to convert an static html site into CMSMS one, using ML.

I have an iframe srolling news from an html page with auto srollig Js.

I've tried inserting JS into Page content or in template  but always appear syntax error warnig.

I've tried to do with {literal} {/literal} tags envolving JS but sill goes wrong.
Or use {embed} or {piiframe} tag (view in forge) or use a simple javascript (view source of this site)

Alby

Re: How insert JavaScirpt for srolling news ?

Posted: Sat Nov 24, 2007 2:08 pm
by percusionista
Hi Alby

I've been watching source code of that page http://www.cmet.it/

In that case JavaSript is in section  and in mine is inside tag just before

Or use {embed} or {piiframe} tag (view in forge) or use a simple javascript
I don't know how to use and where,

what do you mean by view in forge? (some link)

Re: How insert JavaScirpt for srolling news ?

Posted: Sat Nov 24, 2007 2:41 pm
by alby
percusionista wrote: I've been watching source code of that page http://www.cmet.it/

In that case JavaSript is in section  and in mine is inside tag just before
I don't use iframe but a simple javascript cross browser

percusionista wrote:
Or use {embed} or {piiframe} tag (view in forge) or use a simple javascript
I don't know how to use and where,

what do you mean by view in forge? (some link)
In central repositoriy of CMSMS: DEVELOPMENT link (top-right of page), where you download CMSMS

Alby

Re: How insert JavaScirpt for srolling news ?

Posted: Sat Nov 24, 2007 11:35 pm
by percusionista
Hi Alby

Just looking into forge section I found a new module, special for what I'm looking for, just for srolling news.

The name of module is News Flash Srolling .

I'll drop by the moment the JS way of doing it.

The only problem is that I got some problem with this new module that I've reported in another post.

http://forum.cmsmadesimple.org/index.php/topic,17224.0.html