Få gammel fck-editor til at virke igen
Hej med jer,Jeg har noget meget gammelt cms, som jeg selv lavede for 12 år siden.
Det benytter en gammel version af FCK-editoren der ikke understøttes af chrome i dag, men det virker i IE når jeg kører kombalitetsvisning.
Kan man rette i javascriptet på siden så det igen virker?
På forhånd tak
Mvh
Siden kommer her:
---
<!-- #include virtual="/fckeditor/fckeditor.asp" -->
<html>
<head>
<title>Home Page</title>
<link href="../sample.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
function FCKeditor_OnComplete( editorInstance )
{
var oCombo = document.getElementById( 'cmbSkins' ) ;
// Get the active skin.
var sSkin = editorInstance.Config['SkinPath'] ;
sSkin = sSkin.match( /[^\/]+(?=\/$)/g ) ;
oCombo.value = sSkin ;
oCombo.style.visibility = '' ;
}
function ChangeSkin( skinName )
{
window.location.href = window.location.pathname + "?Skin=" + skinName ;
}
function SubmitContent()
{
document.editor.submit();
}
</script>
</head>
<% If Request.Querystring("mode") = "2" Then
Dim Connect, nyhederRS, Query, nyheder, profil, profil2
Set Connect = Server.CreateObject("ADODB.Connection")
Connect.Open "DBQ="&Server.MapPath("/db/nyheder.mdb")&";Driver={Microsoft Access Driver (*.mdb)};"
nyheder = Trim(Request("id"))
Set nyhederRS = Server.Createobject("ADODB.Recordset")
Query = "SELECT * FROM nyheder where id= "& nyheder
nyhederRS.Open Query, Connect
session("id")= nyhederRS("id")
End If %>
<% If Request.Querystring("mode") = "" Then
Set Connect = Server.CreateObject("ADODB.Connection")
Connect.Open "DBQ="&Server.MapPath("/db/nyheder.mdb")&";Driver={Microsoft Access Driver (*.mdb)};"
Set nyhederRS= Connect.Execute ("SELECT TOP 1 nyheder.id, nyheder.gl, nyheder.bpos, nyheder.vis, nyheder.rkf, nyheder.ref, nyheder.overskrift, nyheder.dato, nyheder.text FROM nyheder ORDER BY nyheder.id DESC")
End If %>
<%
session("ifram")= nyhederRS("id") '''Request.querystring("id")
session("id")= nyhederRS("id")
%>
<body bgcolor="#E0E0E0" link="#FFFFFF" alink="#FFFFFF" vlink="#FFFFFF" topmargin="0" leftmargin="0">
<form name="editor" method="post" action="nyhedproc_u.asp">
<input type="hidden" name="id" size="3" value="<% =nyhederRS("id")%>">
<div align="center">
<center>
<table border="0" cellpadding="6" cellspacing="0" width="900">
<tr>
<td valign="top" align="left" width="665" bgcolor="#666666" colspan="3">
<div align="left">
<table border="0" cellpadding="0" cellspacing="0" width="750">
<tr>
<td width="1"><strong><font face="Verdana" color="#FFFFFF" size="1">Dato </font></strong></td>
<td align="left" width="233"><font face="Verdana" size="1" color="#FFFFFF"><b>Ref. </b></font></td>
<td align="left" width="70"><b><font face="Verdana" size="1" color="#FFFFFF">vis</font></b></td>
<td align="left" width="51"><font size="1" color="#FFFFFF" face="Verdana"><b>Orden</b></font></td>
<td width="51"><font size="1" color="#FFFFFF" face="Verdana"><b>galleri</b></font></td>
<td width="100" rowspan="2" valign="bottom" align="center">
<table border="0" bgcolor="#C0C0C0" cellspacing="0" style="border-style: outset; border-width: 1" cellpadding="2" width="0" height="0">
<tr>
<td width="100%" align="center"><a href="../upload/Gallery/uploadgfx.asp" target="popup" onclick="window.open('','popup', 'scrollbars=yes,location=no,menubar=no,toolbar=no,resizable=no,personalbar=no,status=no,left=0,top=0,width=450,height=400,left=0,top=0,' )"><font size="1" color="#0000FF" face="Verdana">Rediger<br>galleri</font></a></td>
</tr>
</table>
</td>
<td align="left" width="350" rowspan="2"><b><font face="Arial" size="3"><a href="indtastning.asp?us=1&id=<% =Request.querystring("id") %>&ov=<% =nyhederRS("overskrift")%>"><font color="#FFFFFF">Tilføj underside</font></a></font></b>
</td>
</tr>
<tr>
<td align="left" width="82">
<input size=8 name="dato" type="text" ReadOnly value=<% =nyhederRS("dato")%>>
</td>
<td align="left" width="226"><font face="arial" size="2" color="#000000"><strong><font face="Verdana" size="1" color="#FFFFFF"><input name="ref" type="edit" size="29" value="<% =nyhederRS("ref")%>"></font></strong>
</font></td>
<td align="left" width="70">
<% If nyhederRS("vis")= "vis" Then %>
<input type="checkbox" checked name="vis" value="vis">
<% else %>
<input type="checkbox" name="vis" value="vis">
<% End If %>
</td>
<td align="left" width="51">
<input type="text" name="rkf" value="<%=nyhederRS("rkf")%>" size="1">
</td>
<td width="51">
<% If nyhederRS("gl")=1 Then %>
<input type="checkbox" checked name="gl" value=1>
<% else %>
<input type="checkbox" name="gl" value=1>
<% End If %>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td width="750" colspan="3">
<div align="left">
<table border="0" cellpadding="0" cellspacing="0" width="900">
<tr>
<td width="302"><strong><font face="Verdana" color="#000000" size="1">Overskrift</font></strong><input type="hidden" name="ttt">
</td>
<td width="18"></td>
<td width="4"></td>
<td width="302"></td>
</tr>
<tr>
<td><strong><font face="Verdana" size="1" color="#000000"><input name="overskrift" type="edit" size="42" value="<% =nyhederRS("overskrift")%>"></font></strong> </td>
<td width="60"> </td>
<td><b><font color="#000000" face="Verdana" size="1"> </font></b></td>
<td>
<b><font color="#000000" face="Verdana" size="1">Sæt billeder til venstre </font></b><input type="radio" value="V" <% If nyhederRS("bpos")="V" Then%> checked<%end If%> name="bpos"><b><font color="#000000" face="Verdana" size="1">Højre</font></b><input type="radio" <% If nyhederRS("bpos")="H" Then%> checked<%end If%> value="H" name="bpos">
</td>
</tr>
<tr>
<td width="302"></td>
<td width="18"></td>
<td width="4"></td>
<td width="302"></td>
</tr>
<tr>
<td width="302"><b><font color="#000000" face="Verdana" size="1">Tekst</font></b></td>
<td width="18"></td>
<td width="4"></td>
<td width="302"></td>
</tr>
<tr>
<td colspan="4" width="900"><font face="Verdana" size="1" color="#000000">
<!--editor------------------------------------------------------------------->
<input type=hidden select id="cmbSkins" onchange="ChangeSkin(this.value);" style="VISIBILITY: hidden">
<!--option value="default" selected>Default</option>
<option value="silver">Silver</option>
<option value="office2003">Office 2003</option>
</select-->
<!--Editor starts here -->
<!--form name="editor" method="post" action="nyhedproc.asp"-->
<!--form action="/fckeditor/sampleposteddata.asp" method="post" target="_blank"-->
<%
' Automatically calculates the editor base path based on the _samples directory.
' This is usefull only for these samples. A real application should use something like this:
' oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
Dim sBasePath
''sBasePath = Request.ServerVariables("PATH_INFO")
sBasePath = "/fckeditor/"
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath = "/fckeditor/"
If Request.QueryString("Skin") <> "" Then
oFCKeditor.Config("SkinPath") = sBasePath + "editor/skins/" & Request.QueryString("Skin") + "/"
Else
oFCKeditor.Config("SkinPath") = sBasePath + "editor/skins/" & "silver" & "/"
End If
%>
<!----------------------------area text begin-------------------------------------------->
<!-- #INCLUDE file="ifram.asp" -->
<!----------------------------area text end-------------------------------------------->
<%
oFCKeditor.Value = xxx
oFCKeditor.Create "FCKeditor1"
%>
<input type="submit" value="Submit">
<!--/form-->
<!-- editor ends here -->
<!--editor slut-------------------------------------------------------------->
</font></td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td width="25%" height="1">
<table border="0" cellspacing="0" height="8" style="border: 1 solid #000000" cellpadding="2">
<tr>
<td bgcolor="#FFFFFF"><b><!--a href="/upload/uploadgfx.asp"--><a href="#" onclick="document.editor.ttt.value= 123; SubmitContent();"><font color="#000000" face="Verdana" size="1">Indsæt billede/dokument</font></a></b></td>
</tr>
</table>
</td>
<td width="20%" height="1">
<table border="0" cellpadding="2" cellspacing="0" height="8" style="border: 1 solid #000000">
<tr>
<td bgcolor="#FFFFFF"><b><a href="/retbillede.asp?bid=<%=session("id")%>" ><font color="#000000" face="Verdana" size="1">Rediger
billeder</font></a></b></td>
</tr>
</table>
</td>
<td width="50%" height="1"></form>
xxxxxxxxxxxxxx
</td>
</tr>
<tr>
<td width="750" bgcolor="#808080" colspan="3">
<div align="left">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="317" style="border-bottom: 1 solid #FFFFFF"><font face="Verdana" size="1" color="#FFFFFF"><b>
<%
If InStr(1,Request.ServerVariables("HTTP_REFERER"),"indtastning.asp",1) THEN
Response.redirect "/Upload/Uploadgfx.asp?id=" & session("ifram")
End If %>
Billednavn</b></font></td>
<td width="67" style="border-bottom: 1 solid #FFFFFF"><font face="Verdana" size="1" color="#FFFFFF"><b> </b></font></td>
<td width="483" style="border-bottom: 1 solid #FFFFFF"><font face="Verdana" size="1" color="#FFFFFF"><b>Billedtekst</b></font></td>
<td width="103" style="border-bottom: 1 solid #FFFFFF"><b><font color="#FFFFFF" face="Verdana" size="1">Orden</font></b></td>
</tr>
<%
Dim conn, nid, sql, listRS
set conn = Server.createObject("ADODB.Connection")
Conn.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.Mappath("/db/nyheder.mdb")
nid=session("id")
sql = "SELECT * FROM billeder where nid= "& nid
Set listRS = Server.CreateObject("ADODB.Recordset")
listRS.Open sql, conn, 1, 1
%>
<% do while not listRS.eof %>
<form action="retbillede.asp method="post">
<tr><td width="317"><input type="hidden" name="bid" value="<%=listRS("bid")%>"><font face="Verdana" size="1" color="#FFFFFF"><%=listRS("billednavn")%></font></td><td width="67"><font face="Verdana" color="#FFFFFF" size="1"> </font></td><td width="483"><font face="Verdana" color="#FFFFFF" size="1"><%=listRS("billedtekst")%></font><td width="103"><font face="Verdana" color="#FFFFFF" size="1"><%=listRS("brkf")%></font></tr>
</form>
<% listRS.movenext
loop
%>
</table>
</div>
</td>
</tr>
<tr>
<td width="665" colspan="3">
</td>
</tr>
</table>
</center>
</div>
</body>
</html>
<%
Conn.Close
set Conn = nothing
Connect.Close
set Connect = nothing
%>