• Das Erstellen neuer Accounts wurde ausgesetzt. Bei berechtigtem Interesse bitte Kontaktaufnahme über die üblichen Wege. Beste Grüße der Admin

XHTML Doctype

bount

New member
XHTML Doctype Problem und keinen Idee :/

Hoi,

ich hab eine Frage:

Wie muss ich das Script
http://www.jswelt.de/index.php?opencat=JavaScripts&artid=1001523181
anpassen, wenn es auch mit

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

funktionieren soll.

Mit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

funktionierts.
Was ist bei XHTML anders? Hat jemand Tipps fuer mich? Danke.


Gruss
bount

Hier noch der Code meiner Baustelle:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<STYLE type="text/css">  
#divASContainer{position:absolute; width:741; height:20; overflow:hidden; top:10; left:10; clip:rect(0,741,20,0); visibility:hidden; background-color: #FFFFFF} 
#divASContent{position:absolute; top:0; left:0; background-color: #FFFFFF} 
</STYLE>
<SCRIPT language="JavaScript">
// begin absolutely positioned autoscroll area object scripts 

/*
Extension developed by David G. Miles ([url]www.z3roadster.net/dreamweaver[/url])
Original Scrollable Area code developed by Thomas Brattli ([url]www.bratta.com[/url])
To add more shock to your site, visit [url]www.DHTML[/url] Shock.com
*/

function verifyCompatibleBrowser(){ 
	this.ver=navigator.appVersion 
	this.dom=document.getElementById?1:0 
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; 
	this.ie4=(document.all && !this.dom)?1:0; 
	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0; 
	this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5) 
	return this 
} 
bw=new verifyCompatibleBrowser() 
lstart=20 
loop=true  
speed=250 
pr_step=5 
function ConstructObject(obj,nest){ 
    nest=(!nest) ? '':'document.'+nest+'.' 
	this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0; 
  	this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0; 
	this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight 
	this.newsScroll=newsScroll; 
	this.moveIt=b_moveIt; this.x; this.y; 
    this.obj = obj + "Object" 
    eval(this.obj + "=this") 
    return this 
} 
function b_moveIt(x,y){ 
	this.x=x;this.y=y 
	this.css.left=this.x 
	this.css.top=this.y 
} 
//Makes the object scroll up 
function newsScroll(speed){ 
	if(this.y>-this.scrollHeight){ 
		this.moveIt(0,this.y-pr_step) 
		setTimeout(this.obj+".newsScroll("+speed+")",speed) 
	}else if(loop) { 
		this.moveIt(0,lstart) 
		eval(this.obj+".newsScroll("+speed+")") 
	  } 
} 
//Makes the object 
function InitialiseAutoScrollArea(){ 
	objContainer=new ConstructObject('divASContainer') 
	objContent=new ConstructObject('divASContent','divASContainer') 
	objContent.moveIt(0,lstart) 
	objContainer.css.visibility='visible' 
	objContent.newsScroll(speed) 
} 
// end absolutely positioned scrollable area object scripts 

</SCRIPT>
</head>
<BODY bgcolor="#999999" onLoad="InitialiseAutoScrollArea();">

<!-- begin absolutely positioned autoscroll area object--> 
<DIV id="divASContainer"> 
  <DIV id="divASContent">
<B>Scroll Area Content 
    Start</B> 
    <P> Lorem ipsum dolor sit amet, consectetur adipscing elit, sed diam nonnumy eiusmod tempor incidunt ut labore et dolore magna aliquam erat volupat.</P>
    <P>Et harumd dereud facilis est er expedit distinct. Nam liber a tempor cum soluta nobis eligend optio comque nihil quod a impedit anim id quod maxim placeat facer possim omnis es voluptas assumenda est, omnis dolor repellend. Temporem autem quinsud et aur office debit aut tum rerum necesit atib saepe eveniet ut er repudiand sint et molestia non este recusand.</P>
    <P>Lorem ipsum dolor sit amet, consectetur adipscing elit, sed diam nonnumy eiusmod tempor incidunt ut labore et dolore magna aliquam erat volupat.</P>
    <P>Et harumd dereud facilis est er expedit distinct. Nam liber a tempor cum soluta nobis eligend optio comque nihil quod a impedit anim id quod maxim placeat facer possim omnis es voluptas assumenda est, omnis dolor repellend. Temporem autem quinsud et aur office debit aut tum rerum necesit atib saepe eveniet ut er repudiand sint et molestia non este recusand.</P>
    <B>Scroll Area Content End</B>
  </DIV>
</DIV>
<!-- end absolutely positioned autoscroll area object --> 
</body>
</html>
 
Zuletzt bearbeitet:
Zurück
Oben