dreamweaverfan
Gebruiker
- Lid geworden
- 16 jun 2010
- Berichten
- 226
Beste dreamweaver kenners
dit is eigenlijk niet echt een dreamweaver vraag maar misschien moet ik iets in dreamweaver veranderen om het werkend te krijgen
hier ziet u een vrij lange code
nu ga ik dat naderhand met de externalize javascript aanroepen
maar hij werkt niet
waar kan dat aan liggen?
graag advies
dit is eigenlijk niet echt een dreamweaver vraag maar misschien moet ik iets in dreamweaver veranderen om het werkend te krijgen
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welkom op mijn pagina</title>
<style type="text/css">
<!--
-->
</style>
<link href="stylesheet/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
text = "Welkom bij de testsite "; // The text to scroll
color1 = "white"; // original text color
color2 = "yellow"; // new character color
fontsize = "8"; // font size of text
speed = 200; // how fast to rotate to next character
// time is in milliseconds, (i.e. 1000 = 1 second)
i = 0;
if (navigator.appName == "Netscape") {
document.write("<layer id=a visibility=show></layer><br><br><br>");
}
else {
document.write("<div id=a></div>");
}
function changeCharColor() {
if (navigator.appName == "Netscape") {
document.a.document.write("<center><font size =" + fontsize + "><font color=" + color1 + ">");
for (var j = 0; j < text.length; j++) {
if(j == i) {
document.a.document.write("<font color=" + color2 + ">" + text.charAt(i) + "</font>");
}
else {
document.a.document.write(text.charAt(j));
}
}
document.a.document.write('</font></font></center>');
document.a.document.close();
}
if (navigator.appName == "Microsoft Internet Explorer") {
str = "<center><font size=" + fontsize + "><font color=" + color1 + ">";
for (var j = 0; j < text.length; j++) {
if( j == i) {
str += "<font color=" + color2 + ">" + text.charAt(i) + "</font>";
}
else {
str += text.charAt(j);
}
}
str += "</font></font></center>";
a.innerHTML = str;
}
(i == text.length) ? i=0 : i++; // reset after going through all letters
}
setInterval("changeCharColor()", speed);
// End -->
</script>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welkom op mijn pagina</title>
<style type="text/css">
<!--
-->
</style>
<link href="stylesheet/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
text = "Welkom bij de testsite "; // The text to scroll
color1 = "white"; // original text color
color2 = "yellow"; // new character color
fontsize = "8"; // font size of text
speed = 200; // how fast to rotate to next character
// time is in milliseconds, (i.e. 1000 = 1 second)
i = 0;
if (navigator.appName == "Netscape") {
document.write("<layer id=a visibility=show></layer><br><br><br>");
}
else {
document.write("<div id=a></div>");
}
function changeCharColor() {
if (navigator.appName == "Netscape") {
document.a.document.write("<center><font size =" + fontsize + "><font color=" + color1 + ">");
for (var j = 0; j < text.length; j++) {
if(j == i) {
document.a.document.write("<font color=" + color2 + ">" + text.charAt(i) + "</font>");
}
else {
document.a.document.write(text.charAt(j));
}
}
document.a.document.write('</font></font></center>');
document.a.document.close();
}
if (navigator.appName == "Microsoft Internet Explorer") {
str = "<center><font size=" + fontsize + "><font color=" + color1 + ">";
for (var j = 0; j < text.length; j++) {
if( j == i) {
str += "<font color=" + color2 + ">" + text.charAt(i) + "</font>";
}
else {
str += text.charAt(j);
}
}
str += "</font></font></center>";
a.innerHTML = str;
}
(i == text.length) ? i=0 : i++; // reset after going through all letters
}
setInterval("changeCharColor()", speed);
// End -->
</script>
</body>
</html>
hier ziet u een vrij lange code
nu ga ik dat naderhand met de externalize javascript aanroepen
maar hij werkt niet
waar kan dat aan liggen?
graag advies