Avatar billede tripwire Nybegynder
07. august 2001 - 17:03 Der er 8 kommentarer og
2 løsninger

Sammenkædning af scripts.......

Hej Alle hjælpsomme mennesker! =)

Jeg er Meget besværlig, og stiller derfor hele 2 spørgsmål:

1. Kan en eller anden lige forklare mig hvorfor følgende 2 scripts ikke gider arbejde sammen? (og evt give en løsning på dette, plz...)

mange tak!

Script 1 - Nyheds scroller

<!--start på nyheds script-->
<html>
<head>
<title>DHTMLCentral.com - Free Dynamic HTML Scripts - NewsSlideFade Demo</title>
<meta name=\"Author\" content=\"Thomas Brattli (webmaster@dhtmlcentral.com)\">
<META NAME=\"Generator\" CONTENT=\"Designer:Thomas Brattli (www.bratta.com)\">
<meta name=\"KeyWords\" content=\"DHTML, HTML, Dynamic HTML, Javascript, Cascading Style Sheets, Cross-browser, Cross browser, Javascripts, DOM, Scripts, Free Scripts,newsslidefade,news,slide,fade,random,newsticker,ticker,text,move,\">
<meta name=\"Description\" content=\"Dynamic HTML Central - The ultimate place to find DHTML scripts, demos, tutorials and help.\">
<style type=\"text/css\">
#divNewsCont{position:absolute; clip:rect(0,300,80,0); width:300; height:80; left:100; top:200; visibility:hidden; overflow:hidden}
#divNews{position:absolute}
</style>
<script language=\"JavaScript\" type=\"text/javascript\">
<!--





/********************************************************************************** 
NewsSlideFade
*  Copyright (C) 2001 <a href=\"/dhtmlcentral/thomas_brattli.asp\">Thomas Brattli</a>
*  This script was released at DHTMLCentral.com
*  Visit for more great scripts!
*  This may be used and changed freely as long as this msg is intact!
*  We will also appreciate any links you could give us.
*
*  Made by <a href=\"/dhtmlcentral/thomas_brattli.asp\">Thomas Brattli</a>
*********************************************************************************/

function lib_bwcheck(){ //Browsercheck (needed)
    this.ver=navigator.appVersion
    this.agent=navigator.userAgent
    this.dom=document.getElementById?1:0
    this.opera5=this.agent.indexOf(\"Opera 5\")>-1
    this.ie5=(this.ver.indexOf(\"MSIE 5\")>-1 && this.dom && !this.opera5)?1:0;
    this.ie6=(this.ver.indexOf(\"MSIE 6\")>-1 && this.dom && !this.opera5)?1:0;
    this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
    this.ie=this.ie4||this.ie5||this.ie6
    this.mac=this.agent.indexOf(\"Mac\")>-1
    this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;
    this.ns4=(document.layers && !this.dom)?1:0;
    this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
    return this
}
var bw=new lib_bwcheck()


/***************************************************************************
Use the style tag to change the placement and width of the layers.
If you are trying to place this into a table cell or something make the
position of the divNewsCont layer relative...Remeber that that might crash
Netscape 4 though, Good luck!
********************************************************************************/

/****
Variables to set
****/

//How do you want the script to work?
//0 = Fade in - Fade out
//1 = Slide in - Fade out
//2 = Random
nWorks=1

//If you use the slide set these variables:
nSlidespeed=5 //in px
nNewsheight=80 //This is how long down it should start the slide

nBetweendelay=1000 //The delay before fading out.
nFont=\'arial,helvetiva\' //The font for the news
nFontsize=12 //font size in pixel
nFadespeed=100 //The speed to fade in, in milliseconds

//Set the colors, first color is same as background, last color is the color it stops at:
//You can have as many colors you want
nColor=new Array(\'#FFFFFF\', \'#EEEEEE\',\'#CCCCCC\',\'#999999\',\'#666666\',\'#333333\',\'#000000\')

//This is the news you wanna have, set the link and the text. If you don\'t wan\'t it to link anywhere
//use a # as the link
nNews=new Array()
//Copy there three lines and change the info and numbers to get more news.
nNews[0]=new Array()
nNews[0][\"text\"]=\"New scripts www.dhtmlcentral.com is updated with more scripts then ever!\"
nNews[0][\"link\"]=\"http://www.dhtmlcentral.com/\"

nNews[1]=new Array()
nNews[1][\"text\"]=\"Dynamic HTML scripts can be found here! ZoomText, FadeNews, TextChange and lot\'s lot\'s more..\"
nNews[1][\"link\"]=\"http://www.dhtmlcentral.com/\"

nNews[2]=new Array()
nNews[2][\"text\"]=\"Search the web with yahoo!\"
nNews[2][\"link\"]=\"http://www.yahoo.com\"

/********************************************************************************
Object code...Object constructors and functions...
********************************************************************************/
function makeNewsObj(obj,nest,font,size,color,news,fadespeed,betweendelay,slidespeed,works,newsheight){
    nest=(!nest) ? \"\":\'document.\'+nest+\'.\'
      this.css=bw.dom? document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+\"document.layers.\" +obj):0;   
      this.writeref=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+\"document.layers.\" +obj+\".document\"):0;
    if(font){this.color=new Array(); this.color=eval(color); this.news=new Array(); this.news=eval(news)
        this.font=font; this.size=size; this.speed=fadespeed; this.delay=betweendelay; this.newsheight=newsheight;
        this.fadeIn=b_fadeIn;this.fadeOut=b_fadeOut; this.newsWrite=b_newsWrite; this.y=1
        this.slideIn=b_slideIn; this.moveIt=b_moveIt; this.slideSpeed=slidespeed; this.works=works
        if(bw.dom || bw.ie4){this.css.fontFamily=this.font; this.css.fontSize=this.size; this.css.color=this.color[0]}
    }
    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}

function b_newsWrite(num,i){
    if(bw.ns4){
        this.writeref.write(\"<a href=\\\"\"+this.news[num][\'link\']+\"\\\" target=\\\"myTarget\\\" style=\\\"text-decoration:none; font-size:\"+this.size+\"px\\\">\"
            +\"<font face=\\\"\"+this.font+\"\\\" color=\\\"\"+this.color[i]+\"\\\">\"+this.news[num][\'text\']+\"</font></a>\")
        this.writeref.close()
    }else this.writeref.innerHTML=\'<a id=\"\'+this.obj+\'link\' +\'\" target=\"myTarget\"  style=\"text-decoration:none; font-size:\'+this.size+\'px; color:\'+this.color[i]+\'\" href=\"\'+this.news[num][\'link\']+\'\">\'+this.news[num][\'text\']+\'</a>\'
}
//Slide in
function b_slideIn(num,i){
    if(this.y>0){
        if(i==0){this.moveIt(0,this.newsheight); this.newsWrite(num,this.color.length-1)}
        this.moveIt(this.x,this.y-this.slideSpeed); i++
        setTimeout(this.obj+\".slideIn(\"+num+\",\"+i+\");\",50)
    }else setTimeout(this.obj+\".fadeOut(\"+num+\",\"+(this.color.length-1)+\")\",this.delay)
}
//The fade functions
function b_fadeIn(num,i){
    if(i<this.color.length){
        if(i==0 || bw.ns4)    this.newsWrite(num,i)
        else{obj=bw.ie4?eval(this.obj+\"link\"):document.getElementById(this.obj+\"link\");obj.style.color=this.color[i]}
        i++; setTimeout(this.obj+\".fadeIn(\"+num+\",\"+i+\")\",this.speed)
    }else setTimeout(this.obj+\".fadeOut(\"+num+\",\"+(this.color.length-1)+\")\",this.delay)
}
function b_fadeOut(num,i){
    if(i>=0){
        if(i==0 || bw.ns4)    this.newsWrite(num,i)   
        else{obj=bw.ie4?eval(this.obj+\"link\"):document.getElementById(this.obj+\"link\");obj.style.color=this.color[i]}
        i--; setTimeout(this.obj+\".fadeOut(\"+num+\",\"+i+\")\",this.speed)
    }else{
        num++; if(num==this.news.length) num=0
        works=!this.works?0:this.works==1?1:Math.round(Math.random())
        if(works==0) setTimeout(this.obj+\".fadeIn(\"+num+\",0)\",500)
        else if(works==1){this.y=1; setTimeout(this.obj+\".slideIn(\"+num+\",0)\",500)
        }
    }
}
/********************************************************************************************
The init function. Calls the object constructor and set some properties and starts the fade
*********************************************************************************************/
function fadeInit(){
    oNews=new makeNewsObj(\'divNews\',\'divNewsCont\',nFont,nFontsize,\"nColor\",\"nNews\",nFadespeed,nBetweendelay,nSlidespeed,nWorks,nNewsheight)
    oNewsCont=new makeNewsObj(\'divNewsCont\')
    works=!oNews.works?0:oNews.works==1?1:Math.round(Math.random())
    if(works==0) oNews.fadeIn(0,0)
    else if(works==1) oNews.slideIn(0,0)
    oNewsCont.css.visibility=\'visible\'
}

//Calls the init function on pageload.
if(bw.bw) onload=fadeInit;
//-->
</script>
</head>

<body marginleft=\"0\" marginheight=\"0\">
<div id=\"divNewsCont\" style=\"\">
  <div id=\"divNews\"> Default text, this is the text that 3.x browsers will see
    You can have lot\'s of ˜ here in stead. Or you can use a script to write in
    text only if it\'s Netscape 4 (you have to do that so that the layer gets some
    content or the written in text won\'t show correct. </div>
</div>
<table width=\"774\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
  <tr>
    <td width=\"38\" height=\"50\"></td>
    <td width=\"205\"></td>
    <td width=\"300\"></td>
    <td width=\"106\"></td>
    <td width=\"125\"></td>
  </tr>
  <tr>
    <td height=\"54\"></td>
    <td></td>
    <td valign=\"top\">
      <table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
        <tr>
          <td width=\"300\" height=\"54\" valign=\"top\">&nbsp;</td>
        </tr>
      </table>
    </td>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td height=\"30\"></td>
    <td colspan=\"3\" valign=\"top\">
      <table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
        <tr>
          <td width=\"172\" height=\"30\" valign=\"top\"><img src=\"buttons/om.jpg\" width=\"153\" height=\"30\" hspace=\"7\" name=\"Image1\"></td>
          <td width=\"103\" valign=\"top\">&nbsp;</td>
          <td width=\"90\" valign=\"top\">&nbsp;</td>
          <td width=\"106\" valign=\"top\">&nbsp;</td>
          <td width=\"69\" valign=\"top\">&nbsp;</td>
          <td width=\"71\" valign=\"top\">&nbsp;</td>
        </tr>
      </table>
    </td>
    <td></td>
  </tr>
  <tr>
    <td height=\"312\"></td>
    <td>
      <!--Layers der indeholder stregen der linker JS menuen, og hovedmenu knappen-->
      <div id=\"om\" style=\"position:absolute; width:487px; height:15px; z-index:1; left: 39px; top: 129px; visibility: hidden\"><img src=\"slices/om.png\" width=\"595\" height=\"8\"></div>
      <div id=\"Faciliteter\" style=\"position:absolute; width:550px; height:15px; z-index:1; left: 39px; top: 129px; visibility: hidden\"><img src=\"slices/faciliteter.png\" width=\"595\" height=\"8\"></div>
      <div id=\"Nyheder\" style=\"position:absolute; width:200px; height:15px; z-index:1; left: 39px; top: 129px; visibility: hidden\"><img src=\"slices/nyheder.png\" width=\"400\" height=\"8\"></div>
      <div id=\"Kontakt\" style=\"position:absolute; width:200px; height:15px; z-index:1; left: 39px; top: 129px; visibility: hidden\"><img src=\"slices/kontakt.png\" width=\"595\" height=\"8\"></div>
      <div id=\"Cases\" style=\"position:absolute; width:200px; height:15px; z-index:1; left: 39px; top: 129px; visibility: hidden\"><img src=\"slices/cases.png\" width=\"595\" height=\"8\"></div>
      <div id=\"Link\" style=\"position:absolute; width:200px; height:15px; z-index:1; left: 39px; top: 129px; visibility: hidden\"><img src=\"slices/links.png\" width=\"600\" height=\"8\"></div>
      <!--Slut på layers der indeholder stregen der linker JS menuen, og hovedmenu knappen-->
    </td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
</table>
</body>
</html>

<!--slut på nyheds script-->

Script 2 - Tekst Scroller (med manueal scroll)

<html>
<head>
<title>DHTMLCentral.com - Free Dynamic HTML Scripts - PageSlideFade Demo</title>
<meta name=\"Author\" content=\"Thomas Brattli (webmaster@dhtmlcentral.com)\">
<META NAME=\"Generator\" CONTENT=\"Designer:Thomas Brattli (www.bratta.com)\">
<meta name=\"KeyWords\" content=\"DHTML, HTML, Dynamic HTML, Javascript, Cascading Style Sheets, Cross-browser, Cross browser, Javascripts, DOM, Scripts, Free Scripts,pageslidefade,slide,fade,page,scroll,text,textscroll,filters,\">
<meta name=\"Description\" content=\"Dynamic HTML Central - The ultimate place to find DHTML scripts, demos, tutorials and help.\">
<style type=\"text/css\">
a {font-family:verdana,arial,helvetica,sans-serif; font-size:11px; color:#666666; text-decoration:none;}
a:hover {text-decoration:underline; color:#cccccc;}
body {background-color:White; overflow:hidden; border-left-width:0px; border-right-width:0px; color:#999999; font-size:11px; font-family:verdana,arial,helvetica,sans-serif; line-height:130%;}

#divScroller1 {position:absolute; overflow:hidden; z-index:9; left:100px; top:90px; width:400px; height:300px; clip:rect(0px, 400px, 300px, 0px); visbility:visible; border-width:0px 0px 0px 1px; border-color:#666666; border-style:dashed;}
.dynPage {position:absolute; z-index:10; left:200px; top:200px; width:400px; visibility:hidden; padding-left:15px; font-family:arial,helvetica,sans-serif; font-size:10px; color:black}
#arrows {position:absolute; z-index:11; left:74px; top:355px; width:20px;}
#links {position:absolute; z-index:11; left:77px; top:301px; width:20px;}
</style>
<script language=\"JavaScript\" type=\"text/javascript\">
/********************************************************************************** 
PageSlideFade
*  Copyright (C) 2001 <a href=\"/dhtmlcentral/michael_van_ouwerkerk.asp\">Michael van Ouwerkerk</a>
*  This script was released at DHTMLCentral.com
*  Visit for more great scripts!
*  This may be used and changed freely as long as this msg is intact!
*  We will also appreciate any links you could give us.
*
*  Made by <a href=\"/dhtmlcentral/michael_van_ouwerkerk.asp\">Michael van Ouwerkerk</a>
*********************************************************************************/

function lib_bwcheck(){ //Browsercheck (needed)
    this.ver=navigator.appVersion
    this.agent=navigator.userAgent
    this.dom=document.getElementById?1:0
    this.opera5=this.agent.indexOf(\"Opera 5\")>-1
    this.ie5=(this.ver.indexOf(\"MSIE 5\")>-1 && this.dom && !this.opera5)?1:0;
    this.ie6=(this.ver.indexOf(\"MSIE 6\")>-1 && this.dom && !this.opera5)?1:0;
    this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
    this.ie=this.ie4||this.ie5||this.ie6
    this.mac=this.agent.indexOf(\"Mac\")>-1
    this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;
    this.ns4=(document.layers && !this.dom)?1:0;
    this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
    return this
}
var bw=new lib_bwcheck()


/*** variables to configure... ***/

var numScrollPages = 3        //Set the number of pages (layers) here.
var transitionOut = 1;        //The \'out\' effect... 0= no effect, 1= fade
var transitionIn = 2;          //The \'in\' effect... 0= no effect, 1= fade, 2= slide
var slideAcceleration = 0.2;  //If you use the slide animation, set this somewhere between 0 and 1.

/*** Please note that there are no effects available in ns4 and ie4, or explorers on the Mac! ***/


if(document.layers){ //NS4 resize fix...
    scrX= innerWidth; scrY= innerHeight;
    onresize= function(){if(scrX!= innerWidth || scrY!= innerHeight){history.go(0)} }
}

//object constructor...
function scrollerobj(obj,nest){
    nest = (!nest)?\"\":\'document.\'+nest+\'.\'
    this.elm = bw.ie4?document.all[obj]:bw.ns4?eval(nest+\'document.\'+obj):document.getElementById(obj)
    this.css = bw.ns4?this.elm:this.elm.style
    this.doc = bw.ns4?this.elm.document:document
    this.obj = obj+\'scrollerobj\'; eval(this.obj+\'=this\')
    this.x = (bw.ns4||bw.opera5)?this.css.left:this.elm.offsetLeft
    this.y = (bw.ns4||bw.opera5)?this.css.top:this.elm.offsetTop
    this.w = (bw.ie4||bw.ie5||bw.ie6||bw.ns6)?this.elm.offsetWidth:bw.ns4?this.elm.clip.width:bw.opera5?this.css.pixelWidth:0
    this.h = (bw.ie4||bw.ie5||bw.ie6||bw.ns6)?this.elm.offsetHeight:bw.ns4?this.elm.clip.height:bw.opera5?this.css.pixelHeight:0
}

//object methods...
scrollerobj.prototype.moveTo = function(x,y){
    if(x!=null){this.x=x; this.css.left=x}
    if(y!=null){this.y=y; this.css.top=y}
}
scrollerobj.prototype.moveBy = function(x,y){this.moveTo(this.x+x,this.y+y)}
scrollerobj.prototype.hideIt = function(){this.css.visibility=\'hidden\'}
scrollerobj.prototype.showIt = function(){this.css.visibility=\'visible\'}

/****************************************************************
scroll functions...
****************************************************************/
var scrollTimer = null;
function scroll(step){
    clearTimeout(scrollTimer);
    if ( !busy && (step<0&&activePage.y+activePage.h>scroller1.h || step>0&&activePage.y<0) ){
        activePage.moveBy(0,step);
        scrollTimer = setTimeout(\'scroll(\'+step+\')\',40);
    }
}
function stopScroll(){
    clearTimeout(scrollTimer);
}

/****************************************************************
activating the correct layers...
****************************************************************/
var activePage = null;
var busy = 0;
function activate(num){
    if (activePage!=pages[num] && !busy){
        busy = 1;
        if (transitionOut==0 || !bw.opacity){ activePage.hideIt(); activateContinue(num); }
        else if (transitionOut==1) activePage.blend(\'hidden\', \'activateContinue(\'+num+\')\');
    }
}
function activateContinue(num){
    busy = 1;
    activePage = pages[num];
    activePage.moveTo(0,0);
    if (transitionIn==0 || !bw.opacity){ activePage.showIt(); busy=0; }
    else if (transitionIn==1) activePage.blend(\'visible\', \'busy=0\');
    else if (transitionIn==2) activePage.slide(0, slideAcceleration, 40, \'busy=0\');
}


/****************************************************************
Slide methods...
****************************************************************/
scrollerobj.prototype.slide = function(target, acceleration, time, fn){
    this.slideFn= fn?fn:null;
    this.moveTo(0,scroller1.h);
    if (bw.ie4&&!bw.mac) this.css.filter = \'alpha(opacity=100)\';
    if (bw.ns6) this.css.MozOpacity = 1;
    this.showIt();
    this.doSlide(target, acceleration, time);
}
scrollerobj.prototype.doSlide = function(target, acceleration, time){
    this.step = Math.round(this.y*acceleration);
    if (this.step<1) this.step = 1;
    if (this.step>this.y) this.step = this.y;
    this.moveBy(0, -this.step);
    if (this.y>0) this.slideTim = setTimeout(this.obj+\'.doSlide(\'+target+\',\'+acceleration+\',\'+time+\')\', time);
    else {   
        eval(this.slideFn);
        this.slideFn = null;
    }
}


/****************************************************************
Opacity methods...
****************************************************************/
scrollerobj.prototype.blend= function(vis, fn){
    if (bw.ie5||bw.ie6 && !bw.mac) {
        if (vis==\'visible\') this.css.filter= \'blendTrans(duration=0.9)\';
        else this.css.filter= \'blendTrans(duration=0.6)\';
        this.elm.onfilterchange = function(){ eval(fn); };
        this.elm.filters.blendTrans.apply();
        this.css.visibility= vis;
        this.elm.filters.blendTrans.play();
    }
    else if (bw.ns6 || bw.ie&&!bw.mac){
        this.css.visibility= \'visible\';
        vis==\'visible\' ? this.fadeTo(100, 7, 40, fn) : this.fadeTo(0, 9, 40, fn);
    }
    else {
        this.css.visibility= vis;
        eval(fn);
    }
};

scrollerobj.prototype.op= 100;
scrollerobj.prototype.opacityTim= null;
scrollerobj.prototype.setOpacity= function(num){
    this.css.filter= \'alpha(opacity=\'+num+\')\';
    this.css.MozOpacity= num/100;
    this.op= num;
}
scrollerobj.prototype.fadeTo= function(target, step, time, fn){
    clearTimeout(this.opacityTim);
    this.opacityFn= fn?fn:null;
    this.op = target==100 ? 0 : 100;
    this.fade(target, step, time);
}
scrollerobj.prototype.fade= function(target, step, time){
    if (Math.abs(target-this.op)>step){
        target>this.op? this.setOpacity(this.op+step):this.setOpacity(this.op-step);
        this.opacityTim= setTimeout(this.obj+\'.fade(\'+target+\',\'+step+\',\'+time+\')\', time);
    }
    else {
        this.setOpacity(target);
        eval(this.opacityFn);
        this.opacityFn= null;
    }
}


/**************************************************************
Init function...
**************************************************************/
var pageslidefadeLoaded = 0;
function initPageSlideFade(){
    scroller1 = new scrollerobj(\'divScroller1\');
   
    pages = new Array();
    pages[0] = null;
    for (var i=1; i<=numScrollPages; i++){
        pages[i] = new scrollerobj(\'dynPage\'+i, \'divScroller1\');
        pages[i].moveTo(0,0);
    }
    bw.opacity = ( bw.ie && !bw.ie4 && navigator.userAgent.indexOf(\'Windows\')>-1 ) || bw.ns6
    if (bw.ie5||bw.ie6 && !bw.mac) pages[1].css.filter= \'blendTrans(duration=0.6)\'; // Loads the windows 9.x filters module.
    activateContinue(1);

    if (bw.ie) for(var i=0;i<document.links.length;i++) document.links[i].onfocus=document.links[i].blur;
    pageslidefadeLoaded = 1;
}
//if the browser is ok, the script is started onload..
if(bw.bw && !pageslidefadeLoaded) onload = initPageSlideFade;
</script>
</head>

<body marginleft=\"0\" marginheight=\"0\">
<br>
<br><br>
<!-- END DELETE -->

<div id=\"divScroller1\" style=\"left: 200px; top: 200px\">
  <div id=\"dynPage1\" class=\"dynPage\">
The Cask of Amontillado<br><br>by Edgar Allan Poe<br><br>...<br><br>The thousand injuries of Fortunato I had borne as I best could, but when he ventured upon insult, I vowed revenge. You, who so well know the nature of my soul, will not suppose, however, that I gave utterance to a threat. At length I would be avenged; this was a point definitely settled--but the very definitiveness with which it was resolved, precluded the idea of risk. I must not only punish, but punish with impunity. A wrong is unredressed when retribution overtakes its redresser. It is equally unredressed when the avenger fails to make himself felt as such to him who has done the wrong.<br><br>It must be understood that neither by word nor deed had I given Fortunato cause to doubt my good will. I continued, as was my wont, to smile in his face, and he did not perceive that my smile now was at the thought of his immolation.<br><br>He had a weak point--this Fortunato--although in other regards he was a man to be respected and even feared. He prided himself on his connoisseurship in wine. Few Italians have the true virtuoso spirit. For the most part their enthusiasm is adopted to suit the time and opportunity-- to practise imposture upon the British and Austrian millionaires. In painting and gemmary, Fortunato, like his countrymen, was a quack-- but in the matter of old wines he was sincere. In this respect I did not differ from him materially: I was skillful in the Italian vintages myself, and bought largely whenever I could.<br><br>It was about dusk, one evening during the supreme madness of the carnival season, that I encountered my friend. He accosted me with excessive warmth, for he had been drinking much. The man wore motley. He had on a tight-fitting parti-striped dress, and his head was surmounted by the conical cap and bells. I was so pleased to see him, that I thought I should never have done wringing his hand.<br><br>I said to him--\"My dear Fortunato, you are luckily met. How remarkably well you are looking to-day! But I have received a pipe of what passes for Amontillado, and I have my doubts.\"<br><br>\"How?\" said he. \"Amontillado? A pipe? Impossible! And in the middle of the carnival!\"<br><br>\"I have my doubts,\" I replied; \"and I was silly enough to pay the full Amontillado price without consulting you in the matter. You were not to be found, and I was fearful of losing a bargain.\"<br><br>\"Amontillado!\"<br><br>\"I have my doubts.\"<br><br>\"Amontillado!\"<br><br>\"And I must satisfy them.\"<br><br>\"Amontillado!\"<br><br>\"As you are engaged, I am on my way to Luchesi. If any one has a critical turn, it is he. He will tell me--\"<br><br>\"Luchesi cannot tell Amontillado from Sherry.\"<br><br>\"And yet some fools will have it that his taste is a match for your own.\"<br><br>\"Come, let us go.\"<br><br>\"Whither?\"<br><br>\"To your vaults.\"<br><br>\"My friend, no; I will not impose upon your good nature. I perceive you have an engagement. Luchesi--\"<br><br>\"I have no engagement;--come.\"<br><br>\"My friend, no. It is not the engagement, but the severe cold with which I perceive you are afflicted. The vaults are insufferably damp. They are encrusted with nitre.\"<br><br>\"Let us go, nevertheless. The cold is merely nothing. Amontillado! You have been imposed upon. And as for Luchesi, he cannot distinguish Sherry from Amontillado.\"<br><br>Thus speaking, Fortunato possessed himself of my arm. Putting on a mask of black silk, and drawing a roquelaire closely about my person, I suffered him to hurry me to my palazzo.<br><br>There were no attendants at home; they had absconded to make merry in honour of the time. I had told them that I should not return until the morning, and had given them explicit orders not to stir from the house. These orders were sufficient, I well knew, to insure their immediate disappearance, one and all, as soon as my back was turned.<br><br>I took from their sconces two flambeaux, and giving one to Fortunato, bowed him through several suites of rooms to the archway that led into the vaults. I passed down a long and winding staircase, requesting him to be cautious as he followed. We came at length to the foot of the descent, and stood together on the damp ground of the catacombs of the Montresors.<br><br>The gait of my friend was unsteady, and the bells upon his cap jingled as he strode.<br><br>\"The pipe,\" said he.<br><br>\"It is farther on,\" said I; \"but observe the white web-work which gleams from these cavern walls.\"<br><br>He turned towards me, and looked into my eyes with two filmy orbs that distilled the rheum of intoxication.<br><br>\"Nitre?\" he asked, at length.<br><br>\"Nitre,\" I replied. \"How long have you had that cough?\"<br><br>\"Ugh! ugh! ugh!--ugh! ugh! ugh!--ugh! ugh! ugh!--ugh! ugh! ugh!--ugh! ugh! ugh!\"<br><br>My poor friend found it impossible to reply for many minutes.<br><br>\"It is nothing,\" he said, at last.<br><br>\"Come,\" I said, with decision, \"we will go back; your health is precious. You are rich, respected, admired, beloved; you are happy, as once I was. You are a man to be missed. For me it is no matter. We will go back; you will be ill, and I cannot be responsible. Besides, there is Luchesi--\"<br><br>\"Enough,\" he said; \"the cough is a mere nothing; it will not kill me. I shall not die of a cough.\"<br><br>\"True--true,\" I replied; \"and, indeed, I had no intention of alarming you unnecessarily--but you should use all proper caution. A draught of this Medoc will defend us from the damps.\"<br><br>Here I knocked off the neck of a bottle which I drew from a long row of its fellows that lay upon the mould.<br><br>\"Drink,\" I said, presenting him the wine.<br><br>He raised it to his lips with a leer. He paused and nodded to me familiarly, while his bells jingled.<br><br>\"I drink,\" he said, \"to the buried that repose around us.\"<br><br>\"And I to your long life.\"<br><br>He again took my arm, and we proceeded.<br><br>\"These vaults,\" he said, \"are extensive.\"<br><br>\"The Montresors,\" I replied, \"were a great and numerous family.\"<br><br>\"I forget your arms.\"<br><br>\"A huge human foot d\'or, in a field azure; the foot crushes a serpent rampant whose fangs are imbedded in the heel.\"<br><br>\"And the motto?\"<br><br>\" Nemo me impune lacessit.\"<br><br>\"Good!\" he said.<br>
</div>



  <div id=\"dynPage2\" class=\"dynPage\" style=\"\"> The wine sparkled in his eyes and
    the bells jingled. My own fancy grew warm with the Medoc. We had passed through
    walls of piled bones, with casks and puncheons intermingling, into the inmost
    recesses of catacombs. I paused again, and this time I made bold to seize
    Fortunato by an arm above the elbow.<br>
    <br>\"The nitre!\" I said; \"see, it increases. It hangs like moss upon the vaults. We are below the river\'s bed. The drops of moisture trickle among the bones. Come, we will go back ere it is too late. Your cough--\"<br>
<br>\"It is nothing,\" he said; \"let us go on. But first, another draught of the Medoc.\"<br> <br>I broke and reached him a flagon of De Grave. He emptied it at a breath. His eyes flashed with a fierce light. He laughed and threw the bottle upwards with a gesticulation I did not understand.<br><br>I looked at him in surprise. He repeated the movement--a grotesque one.<br> <br>\"You do not comprehend?\" he said.<br> <br>\"Not I,\" I replied.<br> <br>\"Then you are not of the brotherhood.\"<br> <br>\"How?\"<br> <br>\"You are not of the masons.\"<br> <br>\"Yes, yes,\" I said; \"yes, yes.\"<br> <br>\"You? Impossible! A mason?\"<br> <br>\"A mason,\" I replied.<br> <br>\"A sign,\" he said, \"a sign.\"<br> <br>\"It is this,\" I answered, producing a trowel from beneath the folds of my roquelaire.<br> <br>\"You jest,\" he exclaimed, recoiling a few paces. \"But let us proceed to the Amontillado.\"<br> <br>\"Be it so,\" I said, replacing the tool beneath the cloak and again offering him my arm. He leaned upon it heavily. We continued our route in search of the Amontillado. We passed through a range of low arches, descended, passed on, and descending again, arrived at a deep crypt, in which the foulness of the air caused our flambeaux rather to glow than flame.<br><br>At the most remote end of the crypt there appeared another less spacious. Its walls had been lined with human remains, piled to the vault overhead, in the fashion of the great catacombs of Paris. Three sides of this interior crypt were still ornamented in this manner. From the fourth side the bones had been thrown down, and lay promiscuously upon the earth, forming at one point a mound of some size. Within the wall thus exposed by the displacing of the bones, we perceived a still interior recess, in depth about four feet in width three, in height six or seven. It seemed to have been constructed for no especial use within itself, but formed merely the interval between two of the colossal supports of the roof of the catacombs, and was backed by one of their circumscribing walls of solid granite.<br><br>It was in vain that Fortunato, uplifting his dull torch, endeavoured to pry into the depth of the recess. Its termination the feeble light did not enable us to see.<br><br>\"Proceed,\" I said; \"herein is the Amontillado. As for Luchesi--\"<br> <br>\"He is an ignoramus,\" interrupted my friend, as he stepped unsteadily forward, while I followed immediately at his heels. In an instant he had reached the extremity of the niche, and finding his progress arrested by the rock, stood stupidly bewildered. A moment more and I had fettered him to the granite. In its surface were two iron staples, distant from each other about two feet, horizontally. From one of these depended a short chain, from the other a padlock. Throwing the links about his waist, it was but the work of a few seconds to secure it. He was too much astounded to resist. Withdrawing the key I stepped back from the recess.<br><br>\"Pass your hand,\" I said, \"over the wall; you cannot help feeling the nitre. Indeed, it is very damp. Once more let me implore you to return. No? Then I must positively leave you. But I must first render you all the little attentions in my power.\"<br><br>\"The Amontillado!\" ejaculated my friend, not yet recovered from his astonishment.<br> <br>\"True,\" I replied; \"the Amontillado.\"<br> <br>As I said these words I busied myself among the pile of bones of which I have before spoken. Throwing them aside, I soon un- covered a quantity of building stone and mortar. With these materials and with the aid of my trowel, I began vigorously to wall up the entrance of the niche.<br><br>I had scarcely laid the first tier of the masonry when I discovered that the intoxication of Fortunato had in a great measure worn off. The earliest indication I had of this was a low moaning cry from the depth of the recess. It was not the cry of a drunken man. There was then a long and obstinate silence. I laid the second tier, and the third, and the fourth; and then I heard the furious vibrations of the chain. The noise lasted for several minutes, during which, that I might hearken to it with the more satisfaction, I ceased my labours and sat down upon the bones. When at last the clanking subsided, I resumed the trowel, and finished without interruption the fifth, the sixth, and the seventh tier. The wall was now nearly upon a level with my breast. I again paused, and holding the flambeaux over the mason-work, threw a few feeble rays upon the figure within.<br><br>A succession of loud and shrill screams, bursting suddenly from the throat of the chained form, seemed to thrust me violently back. For a brief moment I hesitated-- I trembled. Unsheathing my rapier, I began to grope with it about the recess; but the thought of an instant reassured me. I placed my hand upon the solid fabric of the catacombs, and felt satisfied. I reapproached the wall; I replied to the yells of him who clamoured. I re-echoed-- I aided-- I surpassed them in volume and in strength. I did this, and the clamourer grew still.<br><br>It was now midnight, and my task was drawing to a close. I had completed the eighth, the ninth, and the tenth tier. I had finished a portion of the last and the eleventh; there remained but a single stone to be fitted and plastered in. I struggled with its weight; I placed it partially in its destined position. But now there came from out the niche a low laugh that erected the hairs upon my head. It was succeeded by a sad voice, which I had difficulty in recognizing as that of the noble Fortunato. The voice said--<br><br>\"Ha! ha! ha!--he! he! he!--a very good joke indeed--an excellent jest. We shall have many a rich laugh about it at the palazzo--he! he! he!--over our wine--he! he! he!\"<br><br>\"The Amontillado!\" I said.<br> <br>\"He! he! he!--he! he! he!--yes, the Amontillado. But is it not getting late? Will not they be awaiting us at the palazzo, the Lady Fortunato and the rest? Let us be gone.\"<br><br>\"Yes,\" I said, \"let us be gone.\"<br> <br>\" For the love of God, Montresor!\"<br> <br>\"Yes,\" I said, \"for the love of God!\"<br> <br>But to these words I hearkened in vain for a reply. I grew impatient. I called aloud--<br> <br>\"Fortunato!\"<br> <br>No answer. I called again--<br> <br>\"Fortunato--\"<br> <br>No answer still. I thrust a torch through the remaining aperture and let it fall within. There came forth in reply only a jingling of the bells. My heart grew sick on account of the dampness of the catacombs. I hastened to make an end of my labour. I forced the last stone into its position; I plastered it up. Against the new masonry I re-erected the old rampart of bones. For the half of a century no mortal has disturbed them. In pace requiescat!<br>
</div>



  <div id=\"dynPage3\" class=\"dynPage\" style=\"\"> Content, content content content
    content content content <br>
<br>
<br>

<a href=\"#\" onclick=\"transitionIn=transitionIn==2?1:2; return false;\" onfocus=\"if(this.blur)this.blur()\">switch transitions</a>
</div>

</div>


<div id=\"arrows\">
<a href=\"#\" onclick=\"return false;\" onmouseover=\"scroll(7);\" onmouseout=\"stopScroll();\"><img src=\"arrows_rounded_up.gif\" width=\"20\" height=\"17\" alt=\"\" border=\"0\"></a>
<a href=\"#\" onclick=\"return false;\" onmouseover=\"scroll(-7);\" onmouseout=\"stopScroll();\"><img src=\"arrows_rounded_down.gif\" width=\"20\" height=\"17\" alt=\"\" border=\"0\"></a>
</div>

<div id=\"links\" style=\"\"> <a href=\"#\" onclick=\"activate(1); return false;\" onfocus=\"if(this.blur)this.blur()\">I</a><br>
<a href=\"#\" onclick=\"activate(2); return false;\" onfocus=\"if(this.blur)this.blur()\">II</a><br>
<a href=\"#\" onclick=\"activate(3); return false;\" onfocus=\"if(this.blur)this.blur()\">III</a><br>
</div>



</body>
</html>


spørgsmål 2:

i en ekstern Javascriptfil (indeholdende dele af en menu), har jeg følgende linier at arbejde med:

<!--start på del af menu-->
HM_Array3 = [
[120,      // menu width
200,      // left_position
300,      // top_position
\"black\",  // font_color
\"red\",  // mouseover_font_color
\"transparent\",  // background_color
\"transparent\",  // mouseover_background_color
\"blue\",  // border_color
\"transparent\",    // separator_color
0,        // top_is_permanent
0,        // top_is_horizontal
0,        // tree_is_horizontal
1,        // position_under
1,        // top_more_images_visible
1,        // tree_more_images_visible
\"null\",    // evaluate_upon_tree_show
\"null\",    // evaluate_upon_tree_hide
,          // right-to-left
],    // display_on_click
[\"Experts\",\"http://www.webreference.com/experts/\",1,0,1],
[\"Contents\",\"http://www.webreference.com/index2.html\",1,0,0],
[\"Services\",\"http://www.webreference.com/index2.html\",1,0,1],
[\"About\",\"http://www.webreference.com/about.html\",1,0,0]
]
<!--Slut på del af menu-->

(kan ikke køres uden resten)
Hvis jeg nu ville vise et layer i den teksscroller vi så på før, frem for at linke til fx. www.webreference.com/experts?

Mange tak for jeres tid!

MVH:
TripWire


Avatar billede Tony Juniormester
07. august 2001 - 18:48 #1
Ad sp. 1:

Begge scripts aktiveres af hver sin onLoad, det skal rettes til en samlet onLoad.

/Tony
Avatar billede Tony Juniormester
07. august 2001 - 19:00 #2
Til slut i 1. script slettes:
onload=fadeInit;

Til slut i 2. script slettes:
onload = initPageSlideFade;

Erstattes af:

<body onload=\"fadeinit; initPageSlideFade;\" resten af din body

Hvad er det lige du mener med sp. 2 ?

/Tony
Avatar billede roenving Novice
07. august 2001 - 19:16 #3
>> 2

Så kører du noget lignende (I stedet for linket):

\"java script:parent.frameNavn.dynPage1.innerHtml=\'<HTML><HEAD></HEAD><BODY>noget</BODY></HTML>\'\"

hth
jes
Avatar billede jakoba Nybegynder
07. august 2001 - 19:55 #4
rettelse til tonys. når de kaldes som funktioner skal der () efter funktionsnavnene:
<body onload=\"fadeinit(); initPageSlideFade();\" resten af din body
Avatar billede Tony Juniormester
07. august 2001 - 20:01 #5
Tak JakobA - godt vi har dig :)

/Tony
Avatar billede tripwire Nybegynder
07. august 2001 - 22:08 #6
Hej igen... =)

I har ret: det er onload funktionen der koliderer, men jeg kan ikke få:
<body onload=\"fadeinit(); initPageSlideFade();\"
til at virke...

jeg kan end ikke include det ene script og få det til at loade via \"body load\"...? Er det bare mig der skejer helt ud? =)

Mangler lidt kreativitet, drenge... hvad gør vi?

Endnu en venlig hilsen fra:
TripWire
Avatar billede jakoba Nybegynder
07. august 2001 - 22:32 #7
\"body load\" hvad er det?
har du mulighed for at lægge siden på nettet med gegge scripts i (selvom osse de ikke virker)?
Avatar billede Tony Juniormester
08. august 2001 - 07:36 #8
Jeg har sat det op til dig, så det virker nu. Smid lige din e-mail adr. da det jo er et stort dokument, og vi alle bør spare på pladsen i Ekspertens database.

Du kan selv flytte rundt på dine layers, så de kommer til at passe på din side.

Til en anden gang. Syntaksen for et HTML dokument er:

<html> Det fortæller browseren at det er et html dokument.

<head> Begyndelsen på dokumentet - bruger kan ikke se denne del.
    <title>Her skrives dokumentets titel</title>

Her indsættes scripts og styles - hvis ikke andet er nævnt i dem.
</head> Hovedet afsluttes.

<body> Her begynder den del bruger kan se.

</body> Delen afsluttes.
</html> Dokumentet afsluttes.

Prøv at købe nogle bøger om HTML og søg på nettet for at få mere viden.

Jeg synes, det er fint, du kaster dig ud i det inden du helt har lært \"at svømme\" :), men prøv også at suppler med lidt lærestof ...

En anden ting, der også ville have gjort det lettere for os alle, var om du i dit spørgsmål havde nævnt, at du intet vidste om html. Og der er bestemt ikke en skam eller vanære i at være begynder. Det har vi alle været. Vi har alle siddet i same situation som dig og prøvet os frem.

Når de rigtig hard-core nørder begynder med deres (for nogle af os :) indviklede problemløsning, er vi mange der stadig \"falder af i svinget\", men det gør ikke noget, bare vi hele tiden prøver at forstå og lære. Og du kan tro, man kan lære meget herinde, bare ved at se på andres løsninger, og den måde de griber problemer an.

Så \"Don\'t give up - stay tuned\".

Hvis der er andre, der også vil have en kopi, så smid lige jeres e-mail adr. (tripwire - Når man svarer, er det \"god tone\" at give andre mulighed for at se løsningen, det er ikke for at ...)

/Tony
Avatar billede tripwire Nybegynder
08. august 2001 - 20:40 #9
I skal alle sammen have tak for jeres hjælp. Jeg behøver ikke at få det sendt, da jeg fik det til at virke selv (med jeres hjælp selvfølgelig) Det var bare fordi den havde problemer med to onLoad funktioner.

Body load, der skulle nok have stået body onload (min fejl), men jeg er skam ikke ny i html faget. Jeg kan meget html, men det er JavaScript jeg ikke er så god til.... såvidt jeg kan læse, så er dette spørgsmål også stillet under javascript???

TripWire
Avatar billede Tony Juniormester
08. august 2001 - 21:37 #10
Ok - tak for pointene.

Held & Lykke - Tony
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester