Hello,
I have a grid populate with a connector. To edit a record, i open a window where the record detail is loaded (php file).
In this windows appear a dhtmltabbar with some input fields and in the last tab a dhtmlxeditor. All works fine except that i can’t access the editor to insert or modify text.
Can you help me ?
this code open the widows
function edit_actualite(ajoute){
if (grille.getSelectedRowId()!=null || ajoute==true){
var url=“Fiche.php”;
var winedit = parent.wins.createWindow(“win2”,0,0,600,400);
winedit.center();
winedit.setModal(true);
winedit.button(“park”).hide();
winedit.button(“minmax1”).hide();
winedit.button(“minmax2”).hide();
winedit.denyResize();
winedit.setText(“Fiche actualit�”);
if (ajoute==false){
url=“Fiche.php?Actu=”+grille.getSelectedRowId();
}
winedit.attachURL(url);}
else
alert(“S�lectionner d’abord un enregistrement”);
}
and this code is the file Fiche.php
<?php
include (‘class.eyemysqladap.inc.php’);
$db = new EyeMySQLAdap(‘localhost’, ‘root’, ‘’, ‘cosic’);
if (isset($_GET[‘Actu’])){
$actu=$db->selectOne("*", “news”, “IdNews=’”.$_GET[‘Actu’]."’");
$actif = stripslashes($actu[‘Actif’]);
$titre = stripslashes($actu[‘Titre’]);
$texte = stripslashes($actu[‘Texte’]);
$date = stripslashes($actu[‘Date’]);
$datedebut = stripslashes($actu[‘Datedebut’]);
$datefin = stripslashes($actu[‘Datefin’]);
$idauteur = stripslashes($actu[‘IdAuteur’]);
$idnews = stripslashes($actu[‘IdNews’]);
}
else{
$titre = ‘’;
$texte = ‘’;
$date = date(“Y-m-d”);
$datedebut = date(“Y-m-d”);;
$datefin = date(“Y-m-d”);;
$idauteur = 0;
$idnews = 0;
}
?>
Titre :
Date :
<input type=“text” size=“15” readonly id=“p_date” value="<?php echo date("d/m/Y", strtotime($date));?>" />
Page d’accueil :
<input id=“p_actif” type=“checkbox” value=“Oui” <?php if ($actif=='Oui') echo 'Checked';php?>>
<?php
$aut=$db->selectOne("", “utilisateurs”,“IdUtilisateur=’”.$idauteur."’");
if ($aut[‘Mute’]==‘Oui’)
{
$auts=$db->select("", “utilisateurs”);
}
else
{
$auts=$db->select("*", “utilisateurs”,“Mute!=‘Oui’”);
}
?>
Auteur :
<select size=“1” style=“width:65%” id=“p_idauteur” <?php if ($aut['Mute']=='Oui') echo 'disabled';?>>
<?php
foreach($auts as $rec=>$valeur)
{
?>
<option value="<?php echo $valeur[IdUtilisateur];?>" <?php if ($idauteur==$valeur[IdUtilisateur]) {echo ' selected';}?>><?php echo $valeur[Nom].' '.$valeur[Prenom];?>
<?php }
?>
D�but :
<input type=“text” class=“inputWithImage1” id=“p_datedebut” value="<?php echo date("d/m/Y", strtotime($datedebut)); ?>" />
Fin :
<input type=“text” class=“inputWithImage2” id=“p_datefin” value="<?php echo date("d/m/Y", strtotime($datefin));?>" />