Avatar billede tobby Nybegynder
17. februar 2003 - 12:52 Der er 3 kommentarer og
1 løsning

Script block i MS DHTML editor

Jeg bruger MS DHTML editor.
Jeg har mulighed for at skifte mellem normal og html-view.
Problemet er hvis jeg laver en script-block i html-viewet, og klikker tilbage til normal, så forsvinder mit script.
Er der nogen der ved hvordan man fikser det?
Avatar billede Slettet bruger
17. februar 2003 - 15:07 #1
Det kommer bestemt an på resten af dit script.
Avatar billede tobby Nybegynder
18. februar 2003 - 11:59 #2
Jamen, det kommer så her(!)

<!-- #include file="../../login/_login.asp" -->
<!-- #include file="../include/check_type.asp" -->
<!-- #include file="../../include/DB_connect.asp" -->
<%
Response.Buffer = True

Mode = Request.QueryString("Mode")
ID = Request.QueryString("ID")

if Mode = "Edit" Then

    if UserType = "Administrator" Then
        AccessToEdit = True
    end if
   
    if UserType = "Superbruger" Then
   
        Query = "SELECT * FROM Users_Docs WHERE UserID = '" & UserID & "' AND DocID = '" & ID & "'"
       
        Set RS = Server.CreateObject("ADODB.RecordSet")
        RS.Open Query, Connect, 0
       
        if RS.EOF Then
            AccessToEdit = False
        else
            AccessToEdit = True
        end if
       
        RS.Close
        Set RS = Nothing
   
    end if
   
    if AccessToEdit = True Then
   
        Query = "SELECT Titel, Teaser, ParentID, Saves, Status, MSDoc, Forside, Text FROM Docs WHERE ID = '" & ID & "'"
   
        Set Docs = Server.CreateObject("ADODB.RecordSet")
        Docs.Open Query, Connect, 0
   
        ParentID = Docs("ParentID")
        Saves = Docs("Saves")
   
        Text = Replace(Text, "''", "'")
                       
    Else
   
        Response.Redirect("../NotAllowed.asp")
   
    end if
       
end if
%>
<html>
<head>
<LINK rel="stylesheet" type="text/css" href="../include/style.css">
<style>
.dropdown
    {
    height: 22px;
    top:2;
    font:8pt verdana,arial,sans-serif
    }
td
    {
    font:8pt verdana,arial,sans-serif
    }
.tblCoolbar
    {
    background-color: #EFEDDE; padding:1px; color:menutext;
    border-width:1px; border-style:solid;
    border-color:threedhighlight threedshadow threedshadow threedhighlight;
    }
#idCentent {
    font-family: Verdana, Arial, sans-serif;
}
</style>

<script>
/********************************************************************/
/*                        Init Editor Stuff                               
/********************************************************************/
function initEditor()
    {
   
    var arrHTMLFormatBlock = new Array(
        "<HTML><body>.</body></HTML>",
        "<HTML><h1>.</h1></HTML>",
        "<HTML><h2>.</h2></HTML>",
        "<HTML><h3>.</h3></HTML>",
        "<HTML><h4>.</h4></HTML>",
        "<HTML><h5>.</h5></HTML>",
        "<HTML><h6>.</h6></HTML>",
        "<HTML><pre>.</pre></HTML>")
    for (var i = 0 ; i < arrHTMLFormatBlock.length; i++)
        {       
        idContent.document.body.innerHTML = arrHTMLFormatBlock[i]
        idContent.focus()
        idContent.document.execCommand("SelectAll")
        var h = idContent.document.queryCommandValue('FormatBlock')
       
        op=selectFormatBlock.document.createElement('OPTION');
        op.value=h;
        op.text=h;
        selectFormatBlock.options.add(op);         
        }   

    var sHTML = ""
    sHTML += ""
        + "<STYLE>"
        +    "BODY {border: 1px lightgrey solid; font-family: verdana, arial, sans-serif; font-size: 10px;} TABLE {font-family: verdana, arial, sans-serif; font-size: 10px;} A {COLOR: #EA7A16; FONT-WEIGHT: BOLDER;} A:VISITED {COLOR: #EA7A16; FONT-WEIGHT: BOLDER;}"
        + "</STYLE>"
        + "<BODY ONCONTEXTMENU=\"return false\">"
        +    "<DIV></DIV>"
        + "</BODY>"
    idContent.document.designMode = "on"
    idContent.document.open("text/html","replace")
    idContent.document.write(sHTML)
    idContent.document.close()
   
    //STEP 2b: FILL THE EDITOR AREA WITH DOCUMENT CONTENT   
    idContent.document.body.innerHTML = idContentTemp.innerHTML;   

    for(i=0;i<document.all.length;i++)
        {
        if(document.all(i).unselectable != "off")
        document.all(i).unselectable = "on";
        }

    idContent.unselectable = "off";
   
    btnSave.disabled = false;
    }

/********************************************************************/
/*                        Form Save Stuff                               
/********************************************************************/
//STEP 4: CUSTOMIZE YOUR FORM SUBMIT. You can add form validation here -->
function Save()
    {
    if (displayMode == "HTML"){alert("Please uncheck 'Edit HTML'");return;}
   
    //fill Content Edit hidden input form with content from Edit Area
      Form1.txtContent.value = idContent.document.body.innerHTML;
     
    if (Form1.Titel.value == "")
        {
        alert("Please fill the document Title.");
        return ;
        }
      Form1.submit();
    }   
   
/********************************************************************/
/*                        Utility Stuff                               
/********************************************************************/
var displayMode = "RICH"
function setDisplayMode()
    {
    if(displayMode=='RICH')
        {
        idContent.document.body.clearAttributes;
        idContent.document.body.style.fontFamily = 'Courier New';
        idContent.document.body.style.fontSize = '12px';
        idContent.document.body.innerText = idContent.document.body.innerHTML;
        idContent.document.body.innerHTML = "<DIV>" + idContent.document.body.innerHTML + "</DIV>"
        displayMode = 'HTML';
        idToolbar.style.display = "none"
        }
    else
        {
        idContent.document.body.clearAttributes;
        idContent.document.body.style.fontFamily = '';
        idContent.document.body.style.fontSize = '';
        idContent.document.body.innerHTML = idContent.document.body.innerText;
        displayMode = 'RICH';
        idToolbar.style.display = "block"
        }
    }
function GetElement(oElement,sMatchTag)
    {
    while (oElement!=null && oElement.tagName!=sMatchTag)
        {
        if(oElement.id=="idContent") return null;
        oElement = oElement.parentElement
        }
    return oElement
    }
function insertHTML(sHTML)
    {
    var oSel    = idContent.document.selection.createRange()
    var sType = idContent.document.selection.type   

    if (sType=="Control")
        oSel.item(0).outerHTML = sHTML
    else
        oSel.pasteHTML(sHTML)
    }
function doCmd(button, sCmd, sValue)
    {
    var oSel    = idContent.document.selection.createRange()
    var sType = idContent.document.selection.type   
    var oTarget = (sType == "None" ? idContent.document : oSel)

    if(sCmd=="justify")
        {
        sCmd=sCmd+sValue
        sValue=""           
        }
       
    if(sCmd=="DialogLink")
        {
        oTarget.execCommand("CreateLink",true);
        idContent.focus();
        return true;
        }
    if (sCmd=="DialogExternalImage")
        {
        document.execCommand("InsertImage",true);
        idContent.focus();
        return true;
        } 
    if (sCmd=="DialogLinkToDocument")
        {
        oTarget.execCommand("CreateLink",false,sValue);
        var tempText = oSel.htmlText;
        var tempPos1 = tempText.toLowerCase().indexOf("<a");
        var tempPosition = tempPos1;
        var tempText2 = tempText.substr(tempPos1);
        tempPosition = tempPosition + tempText2.indexOf(">");
        tempText = tempText.substr(0,tempPosition) + " target=\'_blank\'" + tempText.substr(tempPosition);
        oSel.pasteHTML(tempText);
        idContent.focus();
        return true;
        }
    if (sCmd=="DialogInternalLink")
        {
        oTarget.execCommand("CreateLink",false,sValue);
        var tempText = oSel.htmlText;
        var tempPos1 = tempText.toLowerCase().indexOf("<a");
        var tempPosition = tempPos1;
        var tempText2 = tempText.substr(tempPos1);
        tempPosition = tempPosition + tempText2.indexOf(">");
        tempText = tempText.substr(0,tempPosition) + " target=\'_top\'" + tempText.substr(tempPosition);
        oSel.pasteHTML(tempText);
        idContent.focus();
        return true;
        }   
   
    oTarget.execCommand(sCmd, false, sValue)

    idContent.focus()
    return true
    }

/********************************************************************/
/*                        Table Creation Stuff                               
/********************************************************************/
var oSel_Table //selection state
var sType_Table
function TableInsertRow()
    {
    var oSel = oSel_Table
    var oBlock = (oSel.parentElement != null ? GetElement(oSel.parentElement(),"TABLE") : GetElement(oSel.item(0),"TABLE"))
    var elRow = oBlock.insertRow()
    for (var i=0;i<oBlock.rows[0].cells.length;i++) //num of cols
        {
        var elCell = elRow.insertCell()
        elCell.innerHTML = "&nbsp;"
        }   
    }
function TableInsertCol()
    {
    var oSel = oSel_Table
    var oBlock = (oSel.parentElement != null ? GetElement(oSel.parentElement(),"TABLE") : GetElement(oSel.item(0),"TABLE"))
    for (var i=0;i<oBlock.rows.length;i++) //num of rows
        {
        var elCell = oBlock.rows[i].insertCell()
        elCell.innerHTML = "&nbsp;"
        }   
    }
function TablePopup()
    {
    idContent.focus()
    var oSel    = idContent.document.selection.createRange()
    var sType = idContent.document.selection.type
       
    oSel_Table = oSel
    sType_Table = sType

    var oBlock = (oSel.parentElement != null ? GetElement(oSel.parentElement(),"TABLE") : GetElement(oSel.item(0),"TABLE"))
    if (oBlock!=null)
        {
          var args = new Array();
          var arr = null;
          args["EditTable"] = true
          args["cellPadding"] = oBlock.cellPadding
          args["cellSpacing"] = oBlock.cellSpacing
          args["border"] = oBlock.border
          args["borderColor"] = oBlock.borderColor
          args["background"] = oBlock.background
          args["bgColor"] = oBlock.bgColor
          arr = null;
          arr = showModalDialog("instable.htm",args,"dialogWidth:23em;dialogHeight:22em;");           
        }
    else
        {
          var args = new Array();
          var arr = null;   
          args["EditTable"] = false
          arr = null;
          arr = showModalDialog("instable.htm",args,"dialogWidth:23em; dialogHeight:22em; ");           
        }
    if(arr==null)return;
    if(arr["action"]=="insert")TableInsert(arr);
    if(arr["action"]=="update")TableUpdate(arr);
    if(arr["action"]=="insrow")TableInsertRow();
    if(arr["action"]=="inscol")TableInsertCol();
    }
function TableInsert(arr)
    {
    var sHTML = ""
        + "<TABLE "
        + (((arr["border"]=="") || (arr["border"]=="0")) ? "class=\"NOBORDER\"" : "")
        +    (arr["cellPadding"] != "" ? "cellPadding=\"" + arr["cellPadding"] + "\" " : "")
        +    (arr["cellSpacing"] != "" ? "cellSpacing=\"" + arr["cellSpacing"] + "\" " : "")
        +    (arr["border"] != "" ? "border=\"" + arr["border"] + "\" " : "")
        +    (arr["borderColor"] != "" ? "bordercolor=\"" + arr["borderColor"] + "\" " : "")
        +    (arr["background"] != "" ? "background=\"" + arr["background"] + "\" " : "")
        +    (arr["bgColor"] != "" ? "bgColor=\"" + arr["bgColor"] + "\" " : "")
        + ">"
    for (var i=0; i < arr["rows"]; i++)
        {
        sHTML += "<TR>"
        for (var j=0; j < arr["cols"]; j++)
        sHTML += "<TD>&nbsp;</TD>"
        sHTML += "</TR>"
        }
    sHTML += "</TABLE>"
       
    idContent.focus()
    if (sType_Table=="Control")oSel_Table.item(0).outerHTML = sHTML
    else oSel_Table.pasteHTML(sHTML)
    }
function TableUpdate(arr)
    {
    idContent.focus()
    var oBlock = (oSel_Table.parentElement != null ? GetElement(oSel_Table.parentElement(),"TABLE") : GetElement(oSel_Table.item(0),"TABLE"))
    if (oBlock!=null)
        {
        oBlock.cellPadding = arr["cellPadding"]
        oBlock.cellSpacing = arr["cellSpacing"]
        oBlock.border = arr["border"]
        oBlock.borderColor = arr["borderColor"]
        oBlock.background = arr["background"]
        oBlock.bgColor = arr["bgColor"]
        }
    }


/********************************************************************/
/*            ForeGround and background color picking Stuff                               
/********************************************************************/
var ground = "";   
function changeColor(wcolour)
    {
    if (ground=="bg")
        {
        document.all["colorbox"].style.visibility = 'hidden';   
        idContent.document.execCommand("BackColor",false,wcolour);
        }
    else
        {
        document.all["colorbox"].style.visibility = 'hidden';   
        idContent.document.execCommand("ForeColor",false,wcolour);   
        }
    }
function showColor(posX,posY,what)
    {
    e = window.event;       
    with (document.all["colorbox"])
        {           
        style.left = e.clientX+4;           
        style.top  = e.clientY-18;           
        style.visibility = 'visible';       
        }
    ground = what;
    }


/********************************************************************/
/*                            Toolbar Stuff                               
/********************************************************************/
function btnOver(btn)
    {
    btn.style.pixelTop=-24
    }
function btnDown(btn)
    {
    btn.style.pixelTop=-48
    }
function btnUp(btn)
    {
    btn.style.pixelTop=-24
    }
function btnOut(btn)
    {
    btn.style.pixelTop=0
    }

</script>

<title></title>

</head>

<body onload="initEditor()" style="FONT-SIZE: x-small; FONT-FAMILY: Verdana">

<!--STEP 3: PREPARE YOUR FORM -->
<form method="post" action="../_Edit.asp?Mode=Save&ID=<% = ID %>&UserID=<% = UserID %>&ParentID=<% = ParentID %>&Saves=<% = Saves %>" name="SaveForm" ID=Form1>
<!-- This is Content Edit hidden input form -->
    <input type="hidden" name="txtContent"  ID=Hidden1>
    <input type="hidden" name="txtDocumentID"  value="11" ID=Hidden1>
   
    <!-- Add additional input form here, use unselectable="off" -->
   
    <table width="445" cellpadding=0 bgcolor="#efedde">
        <tr>
            <td>
                Dokument Titel :
            </td>
            <td>
                <INPUT name="Titel" size=23 ID=Text1 maxlength=100 value="<% = Docs("Titel") %>" unselectable="off" >
            </td>
            <td>
                Status
            </td>
            <td>
                <select size="1" name="txtstatus">
                    <option value=<% = Docs("Status") %>><% = Docs("Status") %></option>
                    <option value="Usynlig">Usynlig</option>
                    <option value="Synlig">Synlig</option>
                </select>
            </td>
        </tr>
    </table>
</form>
<!-- CONTENT EDITOR START -->
<!-- Toolbar -->
<table class="tblCoolbar" width="445" height=61 id="idToolbar">
    <tr>
        <td>
            <nobr>
            <span style="WIDTH: 25px; HEIGHT: 24px">
                <span style="CLIP: rect(0px 25px 24px 0px); POSITION: absolute">
                    <IMG onmouseup=btnUp(this) onmousedown=btnDown(this) id =btnCut onmouseover=btnOver(this) title="Klip ud" style="LEFT: 0px; POSITION: absolute; TOP: 0px" onclick="doCmd(this,'cut');" onmouseout=btnOut(this) height=120 src="tbar.gif" width=797>
                </span>
            </span>
            <span style="WIDTH: 25px; HEIGHT: 24px">
                <span style="CLIP: rect(0px 25px 24px 0px); POSITION: absolute">
                    <IMG onmouseup=btnUp(this) onmousedown=btnDown(this) id=btnCopy onmouseover=btnOver(this) title=Kopier style="LEFT: -25px; POSITION: absolute; TOP: 0px" onclick="doCmd(this,'copy');" onmouseout=btnOut(this) height=120 src="tbar.gif" width=797>
                </span>
            </span>
            <span style="WIDTH: 25px; HEIGHT: 24px">
                <span style="CLIP: rect(0px 25px 24px 0px); POSITION: absolute">
                    <IMG onmouseup=btnUp(this) onmousedown=btnDown(this) id=btnPaste onmouseover=btnOver(this) title=Indsæt style="LEFT: -50px; POSITION: absolute; TOP: 0px" onclick="doCmd(this,'paste');" onmouseout=btnOut(this) height=120 src="tbar.gif" width=797>
                </span>
            </span>
            <span style="WIDTH: 8px; HEIGHT: 24px">
                <span style="CLIP: rect(0px 8px 24px 0px); POSITION: absolute">
                    <IMG style="LEFT: -75px; POSITION: absolute; TOP: 0px" height=120 src="tbar.gif" width=797>
                </span>
            </span>
            <span style="WIDTH: 25px; HEIGHT: 24px">
                <span style="CLIP: rect(0px 25px 24px 0px); POSITION: absolute">
                    <IMG onmouseup=btnUp(this) onmousedown=btnDown(this) id =btnInsertOrderedList onmouseover=btnOver(this) title="Indsæt nummerliste" style="LEFT: -610px; POSITION: absolute; TOP: 0px" onclick="doCmd(this,'insertorderedlist');" onmouseout=btnOut(this) height=120 src="tbar.gif" width=797>
                </span>
            </span>
            <span style="WIDTH: 25px; HEIGHT: 24px">
                <span style="CLIP: rect(0px 25px 24px 0px); POSITION: absolute">
                    <IMG onmouseup=btnUp(this) onmousedown=btnDown(this) id =btnInsertUnorderedList onmouseover=btnOver(this) title="Indsæt liste" style="LEFT: -635px; POSITION: absolute; TOP: 0px" onclick="doCmd(this,'insertunorderedlist');" onmouseout=btnOut(this) height=120 src="tbar.gif" width=797>
                </span>
            </span>
            <span style="WIDTH: 25px; HEIGHT: 24px">
                <span style="CLIP: rect(0px 25px 24px 0px); POSITION: absolute">
                    <IMG onmouseup=btnUp(this) onmousedown=btnDown(this) id=btnOutdent onmouseover=btnOver(this) title=Udryk style="LEFT: -660px; POSITION: absolute; TOP: 0px" onclick="doCmd(this,'outdent');" onmouseout=btnOut(this) height=120 src="tbar.gif" width=797>
                </span>
            </span>
            <span style="WIDTH: 25px; HEIGHT: 24px">
                <span style="CLIP: rect(0px 25px 24px 0px); POSITION: absolute">
                    <IMG onmouseup=btnUp(this) onmousedown=btnDown(this) id=btnIndent onmouseover=btnOver(this) title=Indryk style="LEFT: -685px; POSITION: absolute; TOP: 0px" onclick="doCmd(this,'indent');" onmouseout=btnOut(this) height=120 src="tbar.gif" width=797>
                </span>
            </span>
            <span style="WIDTH: 8px; HEIGHT: 24px">
                <span style="CLIP: rect(0px 8px 24px 0px); POSITION: absolute">
                    <IMG style="LEFT: -710px; POSITION: absolute; TOP: 0px" height=120 src="tbar.gif" width=797>
                </span>
            </span>
            <span style="WIDTH: 25px; HEIGHT: 24px">
                <span style="CLIP: rect(0px 25px 24px 0px); POSITION: absolute">
                    <IMG onmouseup=btnUp(this) onmousedown=btnDown(this) id  =btnInsertHorizontalRule onmouseover=btnOver(this) title="Indsæt horisontal linie" style="LEFT: -83px; POSITION: absolute; TOP: 0px" onclick="doCmd(this,'InsertHorizontalRule');" onmouseout=btnOut(this) height=120 src="tbar.gif" width=797>
                </span>
            </span>
            <span style="WIDTH: 25px; HEIGHT: 24px">
                <span style="CLIP: rect(0px 25px 24px 0px); POSITION: absolute">
                    <IMG onmouseup=btnUp(this) onmousedown=btnDown(this) id =btnInsertTable onmouseover=btnOver(this) title="Lav/Ret tabel" style="LEFT: -108px; POSITION: absolute; TOP: 0px" onclick=TablePopup(); onmouseout=btnOut(this) height=120 src="tbar.gif" width=797>
                </span>
            </span>
            <span style="WIDTH: 25px; HEIGHT: 24px">
                <span style="CLIP: rect(0px 25px 24px 0px); POSITION: absolute">
                    <IMG onmouseup=btnUp(this) onmousedown=btnDown(this) id =btnInsertLink onmouseover=btnOver(this) title="Indsæt Link" style="LEFT: -133px; POSITION: absolute; TOP: 0px" onclick="doCmd(this,'DialogLink');" onmouseout=btnOut(this) height=120 src="tbar.gif" width=797>
                </span>
            </span>
            <span style="WIDTH: 25px; HEIGHT: 24px">
                <span style="CLIP: rect(0px 25px 24px 0px); POSITION: absolute">
                    <IMG onmouseup=btnUp(this) onmousedown=btnDown(this) id =btnInternalLink onmouseover=btnOver(this) title="Link til intern side" style="LEFT: -158px; POSITION: absolute; TOP: 0px" onclick="window.open('ilink.asp','NewWindow','scrollbars,width=350,height=300')" onmouseout=btnOut(this) height=120 src="tbar.gif" width=797>
                </span>
            </span>

<!-- STEP 4: You can use your own Image Library Lookup. See admin_ImageList.asp to learn how to insert image into the editor area -->

            <span style="WIDTH: 25px; HEIGHT: 24px">
                <span style="CLIP: rect(0px 25px 24px 0px); POSITION: absolute">
                    <IMG onmouseup=btnUp(this) onmousedown=btnDown(this) id =btnInsertInternalImage onmouseover=btnOver(this) title="Indsæt billede" style="LEFT: -183px; POSITION: absolute; TOP: 0px" onclick="window.open('admin_ImageList.asp','NewWindow','scrollbars,width=550,height=400')" onmouseout=btnOut(this) height=120 src="tbar.gif" width=797>
                </span>
            </span>
            <span style="WIDTH: 25px; HEIGHT: 24px">
                <span style="CLIP: rect(0px 25px 24px 0px); POSITION: absolute">
                    <IMG onmouseup=btnUp(this) onmousedown=btnDown(this) id =btnBackground onmouseover=btnOver(this) title="Baggrunds farve" style="LEFT: -718px; POSITION: absolute; TOP: 0px" onclick="showColor(this.x,this.y,'bg');" onmouseout=btnOut(this) height=120 src="tbar.gif" width=797>
                </span>
            </span>
            <span style="WIDTH: 25px; HEIGHT: 24px">
                <span style="CLIP: rect(0px 25px 24px 0px); POSITION: absolute">
                    <IMG onmouseup=btnUp(this) onmousedown=btnDown(this) id =btnForeground onmouseover=btnOver(this) title="Tekst farve" style="LEFT: -743px; POSITION: absolute; TOP: 0px" onclick="showColor(this.x,this.y,'fg');" onmouseout=btnOut(this) height=120 src="tbar.gif" width=797>
                </span>
            </span>
            <span style="WIDTH: 25px; HEIGHT: 24px">
                <span style="CLIP: rect(0px 25px 24px 0px); POSITION: absolute">
                    <IMG onmouseup=btnUp(this) onmousedown=btnDown(this) id =btnInsertExternalDocument onmouseover=btnOver(this) title="Indsæt dokument" style="LEFT: -768px; POSITION: absolute; TOP: 0px" onclick="window.open('admin_docList.asp','NewWindow','scrollbars,width=750,height=500')" onmouseout=btnOut(this) height=120 src="tbar.gif" width=797>
                </span>
            </span>
            <span style="WIDTH: 8px; HEIGHT: 24px">
                <span style="CLIP: rect(0px 8px 24px 0px); POSITION: absolute">
                    <IMG style="LEFT: -601px; POSITION: absolute; TOP: 0px" height=120 src="tbar.gif" width=797>
                </span>
            </span>
        </nobr>
    </td>
</tr>
<tr>
    <td>
        <nobr>
            <span style="HEIGHT: 24px">
                <table style="HEIGHT: 24px" cellpadding=1 cellspacing=1 border=0>
                    <tr>
                        <td valign=bottom>
                            <select style="WIDTH: 90px" class="dropdown" onchange="doCmd(this,'FormatBlock',this[this.selectedIndex].value);event.cancelBubble=true;" id=selectFormatBlock name=selectFormatBlock>
                            </select>
                        </td>
                    </tr>
                </table>
            </span>
            <span style="WIDTH: 8px; HEIGHT: 24px">
                <span style="CLIP: rect(0px 8px 24px 0px); POSITION: absolute">
                    <IMG style="LEFT: -436px; POSITION: absolute; TOP: 0px" height=120 src="tbar.gif" width=797>
                </span>
            </span>
            <span style="WIDTH: 25px; HEIGHT: 24px">
                <span style="CLIP: rect(0px 25px 24px 0px); POSITION: absolute">
                    <IMG onmouseup=btnUp(this) onmousedown=btnDown(this) id =btnBold onmouseover=btnOver(this) title="Fed skrift" style="LEFT: -444px; POSITION: absolute; TOP: 0px" onclick="doCmd(this,'bold');" onmouseout=btnOut(this) height=120 src="tbar.gif" width=797>
                </span>
            </span>
            <span style="WIDTH: 25px; HEIGHT: 24px">
                <span style="CLIP: rect(0px 25px 24px 0px); POSITION: absolute">
                    <IMG onmouseup=btnUp(this) onmousedown=btnDown(this) id =btnItalic onmouseover=btnOver(this) title="Kursiv skrift" style="LEFT: -469px; POSITION: absolute; TOP: 0px" onclick="doCmd(this,'italic');" onmouseout=btnOut(this) height=120 src="tbar.gif" width=797>
                </span>
            </span>
            <span style="WIDTH: 25px; HEIGHT: 24px">
                <span style="CLIP: rect(0px 25px 24px 0px); POSITION: absolute">
                    <IMG onmouseup=btnUp(this) onmousedown=btnDown(this) id =btnUnderline onmouseover=btnOver(this) title="Understreget tekst" style="LEFT: -494px; POSITION: absolute; TOP: 0px" onclick="doCmd(this,'underline');" onmouseout=btnOut(this) height=120 src="tbar.gif" width=797>
                </span>
            </span>
            <span style="WIDTH: 8px; HEIGHT: 24px">
                <span style="CLIP: rect(0px 8px 24px 0px); POSITION: absolute">
                    <IMG style="LEFT: -519px; POSITION: absolute; TOP: 0px" height=120 src="tbar.gif" width=797>
                </span>
            </span>
            <span style="WIDTH: 25px; HEIGHT: 24px">
                <span style="CLIP: rect(0px 25px 24px 0px); POSITION: absolute">
                    <IMG onmouseup=btnUp(this) onmousedown=btnDown(this) id=btnJustifyLeft onmouseover=btnOver(this) title=Venstrestil style="LEFT: -527px; POSITION: absolute; TOP: 0px" onclick="doCmd(this,'justify','left');" onmouseout=btnOut(this) height=120 src="tbar.gif" width=797>
                </span>
            </span>
            <span style="WIDTH: 25px; HEIGHT: 24px">
                <span style="CLIP: rect(0px 25px 24px 0px); POSITION: absolute">
                    <IMG onmouseup=btnUp(this) onmousedown=btnDown(this) id =btnJustifyCenter onmouseover=btnOver(this) title="Centrer tekst" style="LEFT: -552px; POSITION: absolute; TOP: 0px" onclick="doCmd(this,'justify','center');" onmouseout=btnOut(this) height=120 src="tbar.gif" width=797>
                </span>
            </span>
            <span style="WIDTH: 25px; HEIGHT: 24px">
                <span style="CLIP: rect(0px 25px 24px 0px); POSITION: absolute">
                    <IMG onmouseup=btnUp(this) onmousedown=btnDown(this) id =btnJustifyRight onmouseover=btnOver(this) title="Højrestil tekst" style="LEFT: -577px; POSITION: absolute; TOP: 0px" onclick="doCmd(this,'justify','right');" onmouseout=btnOut(this) height=120 src="tbar.gif" width=797>
                </span>
            </span>
            <span style="WIDTH: 8px; HEIGHT: 24px">
                <span style="CLIP: rect(0px 8px 24px 0px); POSITION: absolute">
                    <IMG style="LEFT: -601px; POSITION: absolute; TOP: 0px" height=120 src="tbar.gif" width=797>
                </span>
            </span>
        </nobr>
    </td>
</tr>
</table>

<!-- /Toolbar -->

<!-- Colour box -->
<div id="colorbox" style="VISIBILITY: hidden; POSITION: absolute">
    <table border="0" cellpadding="0" cellspacing="0" width="252" bgcolor="#000000">
        <tr>
            <td>   
                <table border="0" bordercolor="#000000" cellpadding="0" cellspacing="1">
                    <tbody>
                        <tr>
                            <script language="JavaScript">
                                c = new Array();                               
                                c[1] = "FF"; c[2] = "CC";               
                                c[3] = "99"; c[4] = "66";               
                                c[5] = "33"; c[6] = "00";               
                                d = 0;                               
                                for (i=1;i <=6;i++)
                                    {                   
                                    if (i >1)
                                        {document.write( "</tr>\n<tr>\n");}                   
                                    for (m=1;m <=6;m++)
                                        {                               
                                        for (n=1;n <=6;n++)
                                            {                               
                                            d++;                           
                                            colour = c[i] + c[m] + c[n];   
                                            document.write("<td bgcolor=\"#"+colour+"\" width=7 class=\"text\"><a href=\"#\" onClick=\"changeColor('"+colour+"')\"><img src=\"images/pixel.gif\" width=7 height=7 name=\"a"+d+"\" border=0></td>\n");
                                            }                   
                                        }               
                                    }   
                            </script>
                        </tr>       
                    </tbody>     
                </table>
            </td>
        </tr>
    </table>
</div>
<!-- /Colour box -->
    <IFRAME NAME="idContent" id="idContent" contentEditable="true" WIDTH="445" HEIGHT="60%">
    </IFRAME>

    <!-- STEP 2a: WRITE THE DOCUMENT CONTENT INTO TEMPORARY STORAGE -->
    <div id=idContentTemp style="DISPLAY: none">
        <% = Docs("Text") %>
    </div>
    <table class=tblCoolbar width="445">
        <tr>
            <td align=left>
                <INPUT type="checkbox" onclick="setDisplayMode()" id=chkDisplayMode name=chkDisplayMode> HTML
            </td>
            <td align=right>
                <% if UserType = "Administrator" Then %>
                    <input type=button value="Rettigheder" onclick="window.open('UserRights.asp?DocID=<% = ID %>','NewWindow','noscrollbars,width=530,height=210')">
                <% end if %>
                <% Response.Write("<input type=button value=""Kalender"" onclick=""location.href='/admin/kalender.asp?Mode=Tilknyt&DocID=" & ID & "'"">") %>
                <input type=button value="Annuller" onclick="location.href='../blank.asp'">
                <INPUT type="button" value="Gem og luk" onClick="Save()" id=btnSave name=btnSave disabled>
            </td>
        </tr>
    </table>
<!-- CONTENT EDITOR END -->
</body>
</html>
<%
Docs.Close
Set Docs = Nothing
%>
<!-- #include file="../../include/DB_Close.asp" -->
Avatar billede Slettet bruger
18. februar 2003 - 16:08 #3
I et link tak, man kan jo ikke bruge det dér til noget.
Avatar billede tobby Nybegynder
11. juni 2004 - 01:22 #4
lukker
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