haski07 Posted July 31, 2004 Report Share Posted July 31, 2004 Hi all Ich kriege probleme mim einf?gen von einem Javascript auf meiner Startseite... <script language="JavaScript"> /* script edited by David Gardner ([email protected]) Permission granted to Dynamicdrive.com to feature the script For more DHTML scripts, visit Dynamicdrive.com */ //put your text here var theText = "David Gardner"; function nextSize(i,incMethod,textLength) { if (incMethod == 1) return (72*Math.abs( Math.sin(i/(textLength/3.14))) ); if (incMethod == 2) return (255*Math.abs( Math.cos(i/(textLength/3.14)))); } function sizeCycle(text,method,dis) { output = ""; for (i = 0; i < text.length; i++) { size = parseInt(nextSize(i +dis,method,text.length)); output += "<font style='font-size: "+ size +"pt'>" +text.substring(i,i+1)+ "</font>"; } theDiv.innerHTML = output; } function doWave(n) { sizeCycle(theText,1,n); if (n > theText.length) {n=0} setTimeout("doWave(" + (n+1) + ")", 50); } </script> <div ID="theDiv" align="center"> </div> Das ist der Code nur versteh ich nicht wieso das nicht klappt.. :cry: Ich hoffe ihr k??nt mir helfen, achja ich f?ge den code im Admin bereich im Content Manager ein.... MFG KalsCom Elektronik Link to comment Share on other sites More sharing options...
haski07 Posted July 31, 2004 Author Report Share Posted July 31, 2004 Ach und das geh?rt auch noch dazu... Step 2: Add the below onload event handler to the <body> tag, like the following: <body onload="doWave(0)"> Hier gibts das Script.. http://www.dynamicdrive.com/dynamicindex10.../rollertext.htm Link to comment Share on other sites More sharing options...
mzanier Posted July 31, 2004 Report Share Posted July 31, 2004 javascripte m?ssen logischerweise im head eingebaut werden, darum muss das script selbst auch in das javascript file im template. Link to comment Share on other sites More sharing options...
haski07 Posted July 31, 2004 Author Report Share Posted July 31, 2004 H? ?? Versteh ich nicht ganz.. Link to comment Share on other sites More sharing options...
Novalis Posted July 31, 2004 Report Share Posted July 31, 2004 /templates/xtc2/javascript/general.js.php wird automatisch inkludiert und die Methoden k?nnen dann benutzt werden in zB den Content-Inhalten, sind also global verf?gbar. Gru?, Nov Link to comment Share on other sites More sharing options...
haski07 Posted August 1, 2004 Author Report Share Posted August 1, 2004 Also brauch ich nur noch das in die Startseite einzuf?gen... <body onload="doWave(0)"> Link to comment Share on other sites More sharing options...
mzanier Posted August 1, 2004 Report Share Posted August 1, 2004 nein, das muss ja logischerweise in den BODY tag der kompletten seite (header.php) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.