<!--#include file="OpenConnection.asp"-->
<%
if Session("NwareAdmin") = "" then
response.redirect("index.asp")
end if
%>
<%
'Variable for table labels
dim strLanguage
dim strSection
dim strCountry
dim strActive
dim strDOCNO
dim strTitle
dim strPreview
dim strDescription
dim strLink
dim strLinkGen
if session("Language") = "EN" then
strLanguage = "Language"
strSection = "Document Type"
strCountry = "Country"
strActive = "Record Active"
strDOCNO = "Document No"
strTitle = "Title"
strPreview = "Preview"
strDescription = "Content"
strLink = "Hyperlink"
strLinkGen = "Hyperlink Genarator"
else
strLanguage = "Langue"
strSection = "Type de Document"
strCountry = "Pays"
strActive = "Enregistrement Actif"
strDOCNO = "No de Document"
strTitle = "Titre"
strPreview = "Apperçu"
strDescription = "Contenue"
strLink = "Hyperlien"
strLinkGen = "Générateur de liens"
End if
'Hold Data from the Database
dim strDataLanguage
dim strDataSection 'Type
dim strDataCountry
dim strDataActive
dim strDataDOCNO
dim strDataTitleEN
dim strDataTitleFR
dim strDataPreviewEN
dim strDataPreviewFR
dim strDataDescriptionEN
dim strDataDescriptionFR
dim strDataLink
dim strDataMode
dim strDataPageReq
Dim gstrSQL
Dim objRECSET
Set objRECSET = CreateObject("ADODB.Recordset")
if request("mode") = "New" then
strDataLanguage = ""
strDataSection = ""
strDataCountry = ""
strDataActive = "True"
strDataDOCNO = ""
strDataTitleEN = ""
strDataTitleFR = ""
strDataPreviewEN = ""
strDataPreviewFR = ""
strDataDescriptionEN = ""
strDataDescriptionFR = ""
strDataLink = ""
strDataMode = "Save"
strDataPageReq = "-1"
end if
if request("mode") = "Show" then
strDataPageReq = request("pageReq")
gstrSQL = "SELECT TYPE,DOCNO,TITLE_EN,PREVIEW_EN,CONTENT_EN,TITLE_FR,PREVIEW_FR,CONTENT_FR,ACTIVE,COUNTRY,LINK FROM NWareContent WHERE ID = " & strDataPageReq
Set objRECSET = objConn.Execute(gstrSQL)
while not objRECSET.EOF
strDataLanguage = Session("Language")
strDataSection = objRECSET("TYPE")
strDataCountry = objRECSET("COUNTRY")
strDataActive = objRECSET("ACTIVE")
strDataDOCNO = objRECSET("DOCNO")
strDataTitleEN = objRECSET("TITLE_EN")
strDataTitleFR = objRECSET("TITLE_FR")
strDataPreviewEN = objRECSET("PREVIEW_EN")
strDataPreviewFR = objRECSET("PREVIEW_FR")
strDataDescriptionEN = objRECSET("CONTENT_EN")
strDataDescriptionFR = objRECSET("CONTENT_FR")
strDataLink = objRECSET("LINK")
objRECSET.MoveNext
wend
strDataMode = "Edit"
end if
if request("mode") = "Edit" then
strDataLanguage = request("selLang")
strDataSection = request("selType")
strDataCountry = request("selCountry")
if request("chkActive") = "checked" then
strDataActive = "True"
else
strDataActive = "False"
end if
strDataDOCNO = request("txtDOCNO")
strDataTitleEN = request("txtTitleEN")
strDataTitleFR = request("txtTitleFR")
strDataPreviewEN = request("txtSummaryEN")
strDataPreviewFR = request("txtSummaryFR")
strDataDescriptionEN = request("txtDescriptionEN")
strDataDescriptionFR = request("txtDescriptionFR")
strDataLink = request("txtLink")
strDataMode = "Show"
strDataPageReq = request("pageReq")
gstrSQL = "Update NWareContent set TYPE = '" & strDataSection & "', DOCNO= '" & strDataDOCNO & "', TITLE_EN = '" & replace(strDataTitleEN,"'","''") & "', PREVIEW_EN = '" & replace(strDataPreviewEN,"'","''") & "', CONTENT_EN = '" & replace(strDataDescriptionEN,"'","''") & "', TITLE_FR = '" & replace(strDataTitleFR,"'","''") & "', PREVIEW_FR = '" & replace(strDataPreviewFR,"'","''") & "', CONTENT_FR = '" & replace(strDataDescriptionFR,"'","''") & "', ACTIVE= " & strDataActive & ", COUNTRY= '" & strDataCountry & "', LINK= '" & replace(strDataLink,"'","''") & "' where ID = " & strDataPageReq
Set objRECSET = objConn.Execute(gstrSQL)
response.redirect("Admin.asp?selType=" & request("selType"))
end if
if request("mode") = "Save" then
strDataLanguage = request("selLang")
strDataSection = request("selType")
strDataCountry = request("selCountry")
if request("chkActive") = "checked" then
strDataActive = "True"
else
strDataActive = "False"
end if
strDataDOCNO = request("txtDOCNO")
strDataTitleEN = request("txtTitleEN")
strDataTitleFR = request("txtTitleFR")
strDataPreviewEN = request("txtSummaryEN")
strDataPreviewFR = request("txtSummaryFR")
strDataDescriptionEN = request("txtDescriptionEN")
strDataDescriptionFR = request("txtDescriptionFR")
strDataLink = request("txtLink")
strDataMode = "Show"
strDataPageReq = "-1"
gstrSQL = "INSERT INTO NWareContent (TYPE, DOCNO, TITLE_EN, PREVIEW_EN, CONTENT_EN, TITLE_FR, PREVIEW_FR, CONTENT_FR, ACTIVE ,COUNTRY, LINK ) VALUES ('" & trim(strDataSection) & "', '" & trim(strDataDOCNO) & "', '" & replace(strDataTitleEN,"'","''") & "', '" & replace(strDataPreviewEN,"'","''") & "', '" & replace(strDataDescriptionEN,"'","''") & "', '" & replace(strDataTitleFR,"'","''") & "', '" & replace(strDataPreviewFR,"'","''") & "', '" & replace(strDataDescriptionFR,"'","''") & "', " & strDataActive & ", '" & strDataCountry & "', '" & strDataLink & "')"
'response.write(gstrSQL)
Set objRECSET = objConn.Execute(gstrSQL)
response.redirect("Admin.asp?selType=" & request("selType"))
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Edit Document</title>
<link href="fckeditor/sample.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="fckeditor/fckeditor.js"></script>
<script type="text/javascript">
var oFCKeditor1;
var oFCKeditor2;
var oFCKeditor3;
var oFCKeditor4;
var oFCKeditor5;
var oFCKeditor6;
window.onload = function()
{
var sBasePath = 'fckeditor/' ;
var sToolBar = 'MyToolBar';
oFCKeditor1 = new FCKeditor( 'txtSummaryEN' ) ;
oFCKeditor1.BasePath = sBasePath ;
oFCKeditor1.ToolbarSet = sToolBar;
oFCKeditor1.ReplaceTextarea() ;
oFCKeditor2 = new FCKeditor( 'txtSummaryFR' ) ;
oFCKeditor2.BasePath = sBasePath ;
oFCKeditor2.ToolbarSet = sToolBar;
oFCKeditor2.ReplaceTextarea() ;
oFCKeditor3 = new FCKeditor( 'txtDescriptionEN' ) ;
oFCKeditor3.BasePath = sBasePath ;
oFCKeditor3.ToolbarSet = sToolBar;
oFCKeditor3.ReplaceTextarea() ;
oFCKeditor4 = new FCKeditor( 'txtDescriptionFR' ) ;
oFCKeditor4.BasePath = sBasePath ;
oFCKeditor4.ToolbarSet = sToolBar;
oFCKeditor4.ReplaceTextarea() ;
oFCKeditor5 = new FCKeditor( 'txtTitleEN' ) ;
oFCKeditor5.BasePath = sBasePath ;
oFCKeditor5.ToolbarSet = sToolBar;
oFCKeditor5.ReplaceTextarea() ;
oFCKeditor6 = new FCKeditor( 'txtTitleFR' ) ;
oFCKeditor6.BasePath = sBasePath ;
oFCKeditor6.ToolbarSet = sToolBar;
oFCKeditor6.ReplaceTextarea() ;
}
function onSelLangChange()
{
var show
show = document.getElementById("selLang").value
if (show == "EN")
{
document.getElementById("titleFr").style.display = "none"
document.getElementById("summaryFr").style.display = "none"
document.getElementById("descFr").style.display = "none"
document.getElementById("titleEn").style.display = "block"
document.getElementById("summaryEn").style.display = "block"
document.getElementById("descEn").style.display = "block"
} else {
document.getElementById("titleFr").style.display = "block"
document.getElementById("summaryFr").style.display = "block"
document.getElementById("descFr").style.display = "block"
document.getElementById("titleEn").style.display = "none"
document.getElementById("summaryEn").style.display = "none"
document.getElementById("descEn").style.display = "none"
}
}
function submitForm ()
{
var obj = document.getElementById("frmAddContent")
//alert(obj.selCountry.value)
obj.submit();
}
</script>
</head>
<body>
<script language="javascript">
var popup
function linkGenerator ()
{
popup = window.open("LinkGenerator.asp?Type=" + document.getElementById("frmAddContent").selType.value);
popup.focus();
}
</script>
<!--form id="frmAddContent" name="frmAddContent" action="sampleposteddata.asp" method="POST"-->
<form id="frmAddContent" name="frmAddContent" action="Content.asp" method="POST">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<caption>
<h2>Edit Document</h2>
</caption>
<tr>
<th scope="col"><div align="right"><%= strLanguage %> :</div></th>
<th scope="col">
<div align="left">
<select name="selLang" id="selLang" onchange="onSelLangChange()">
<option selected value="EN" >English</option>
<option value="FR" >French</option>
</select>
</div></th>
</tr>
<tr>
<th scope="row"><div align="right"><%= strSection %> : </div></th>
<td>
<div align="left">
<select name="selType" onChange="onSelTypeChange()" >
<option value='All'>All</option>
<%
'dim gstrSQL
gstrSQL = "SELECT ID, DESCRIPTION FROM NWareDocTypes ORDER BY DESCRIPTION"
'Dim objRECSET
Set objRECSET = CreateObject("ADODB.Recordset")
Set objRECSET = objConn.Execute(gstrSQL)
strDataType = trim(request("selType"))
while not objRECSET.EOF
if objRECSET(0) = strDataType then
Response.Write("<option value='" & objRECSET(0) & "' selected>" & objRECSET(1) & "</option>")
else
Response.Write("<option value='" & objRECSET(0) & "'>" & objRECSET(1) & "</option>")
end if
objRECSET.MoveNext
wend
objRECSET.CLOSE
%>
</select>
</div></td>
</tr>
<tr>
<th scope="row"><div align="right"><%= strCountry %> : </div></th>
<td>
<select id="selCountry" name="selCountry">
<%
dim temp
if request("selCountry") = "" then
temp = "ALL"
end if
if temp = "ALL" then
response.write("<option selected value='ALL'>ALL</option>")
else
response.write("<option value='ALL'>ALL</option>")
end if
if temp = "CA" then
response.write("<option selected value='CA'>Canada</option>")
else
response.write("<option value='CA'>Canada</option>")
end if
if temp = "US" then
response.write("<option selected value='US'>USA</option>")
else
response.write("<option value='US'>USA</option>")
end if
%>
</select>
</td>
</tr>
<tr>
<th scope="row"><div align="right"><%= strActive %> : </div></th>
<td><%
if strDataActive <> "" then
response.Write("<input id='chkActive' name='chkActive' type='checkbox' checked='checked' value='checked' /></td>")
else
response.Write("<input id='chkActive' name='chkActive' type='checkbox' checked='' value='' /></td>")
end if
%>
</tr>
<tr>
<th scope="row"><div align="right"><%= strDOCNO %> : </div></th>
<td><div id="divDOCNO" style="display:block">
<input name="txtDOCNO" type="text" id="txtDOCNO" size="80" value="<%= strDataDOCNO %>" />
</div></td>
</tr>
<tr>
<th scope="row"><div align="right"><%= strTitle %> : </div></th>
<td><div id="titleEn" style="display:block">
<textarea id="txtTitleEN" name="txtTitleEN" cols="40" rows="2" ><%= strDataTitleEN %></textarea>
</div>
<div id="titleFr" style="display:none">
<textarea id="txtTitleFR" name="txtTitleFR" cols="40" rows="2" ><%= strDataTitleFR %></textarea>
</div> </td>
</tr>
<tr>
<th scope="row"><div align="right"><%= strPreview %> : </div></th>
<td><div id="summaryEn" style="display:block">
<textarea id="txtSummaryEN" name="txtSummaryEN" cols="40" rows="5" ><%= strDataPreviewEN %></textarea>
</div>
<div id="summaryFr" style="display:none">
<textarea id="txtSummaryFR" name="txtSummaryFR" cols="40" rows="5" ><%= strDataPreviewFR %></textarea>
</div>
</td>
</tr>
<tr>
<th scope="row"><div align="right"><%= strLink %> : </div></th>
<td><div id="divLink" style="display:block">
<input id="txtLink" name="txtLink" size="80" type="text" value="<%= strDataLink %>" />
<input id="btnLinkGen" name="btnLinkGen" type="button" value="<%= strLinkGen %>" onclick="linkGenerator()" />
</div>
</td>
</tr>
<tr>
<th scope="row"><div align="right"><%= strDescription %> : </div></th>
<td><div id="descEn" style="display:block">
<textarea id="txtDescriptionEN" name="txtDescriptionEN" cols="55" rows="5" ><%= strDataDescriptionEN %></textarea>
</div>
<div id="descFr" style="display:none">
<textarea id="txtDescriptionFR" name="txtDescriptionFR" cols="55" rows="5" ><%= strDataDescriptionFR %></textarea>
</div>
</td>
</tr>
</table>
<p align="center">
<input type="button" onclick='submitForm();return false' value='<%= strDataMode %>'/><input type="button" onclick="history.go(-1)" value='Back' />
</p>
<input name="mode" type="hidden" value="<%= strDataMode %>">
<input name="pageReq" type="hidden" value="<%= strDataPageReq %>">
</form>
<%
objConn.close
set objConn = nothing
%>
</body>
</html>
Mon, 10/22/2007 - 17:26
#1

Re: Hidden 'div' under firefox and Numbered and Bulleted lists
the lists problems could be something in your stylesheet. If the generated HTML is OK then forget about how it was generated and debug just the existing page.
Re: Hidden 'div' under firefox and Numbered and Bulleted lists
Re: Hidden 'div' under firefox and Numbered and Bulleted lists
As I said, if the html is fine, then it's a problem in your page, not in the editor. Browsers are really buggy
Re: Hidden 'div' under firefox and Numbered and Bulleted lists
I wonder what is the problems for bullets ? Maybe it has something to do with the template ?
Re: Hidden 'div' under firefox and Numbered and Bulleted lists
*{
margin:0;
}
and that was the problem with the bullets, but without that code, the website looks either bad on IE or FF. So I created :
I created something like :
li{
margin-left:10px;
}
Re: Hidden 'div' under firefox and Numbered and Bulleted lists
http://dev.fckeditor.net/ticket/321http://www.fckeditor.net/whatsnew
Re: Hidden 'div' under firefox and Numbered and Bulleted lists