Hello,
with no response, I decided to do otherwise but I have a problem ...
I wish that by selecting an image in a listbox to change the background of my area.
I integrated fck with php in this way (fonctiionne very good)
<?php
$sBasePath = 'http://localhost/cpanel/';
$oFCKeditor = new FCKeditor('FCKeditor1') ;
$oFCKeditor->BasePath = $sBasePath ;
$oFCKeditor->Config['SkinPath'] = 'http://localhost/cpanel/editor/skins/office2003/' ;
$oFCKeditor->ToolbarSet = 'Default';
$oFCKeditor->Height = 86;
$oFCKeditor->Weight = 1024 ;
$oFCKeditor->Config['ToolbarLocation'] = 'OutToolbar' ;
$oFCKeditor->Value = $sValue;
$oFCKeditor->Create() ;
?>
my listbox calls a function from the selected image:
<select size="1" name="D1" id="D1" onChange="update_picture(this.options[this.selectedIndex].value)">
and the function:
<script language="JavaScript" type="text/javascript">
function update_picture(newimage) {
document.frames[0].objContent.DOM.body.style.backgroundImage = "http://localhost/cpanel/editor/userfiles/image/entete/" + newimage;
}
</script>
doesnt work
can you help me please?
Fri, 03/20/2009 - 10:25
#1
Re: dynamically change background image with listbox
finally i have test with change color and its work for the color background with this code:
image background work if path is direcly insert:
but DONT WORK if general_entete.gif if pass in param newimage
thanks to help me to find solution