Get lightbox combo text... Urgent


#21

Ok i have an error:

“An unknown character has found in a text contents”

<?xml version='1.0' encoding='utf-8' ?>
	<data>
		<coll_options for='idEmp'>
			<item value='2' label='MILARD Marc'></item>
			<item value='8' label='CHAPUIS Bastien'></item>
			<item value='9' label='DEPOLLIER Martial'></item>
			<item value='10' label='DETOURBE René'></item>
		</coll_options>
		<coll_options for='idLigne'>
			<item value='1' label='Chambery/St Expury'></item>
			<item value='2' label='Collectes'></item>
		</coll_options>
	</data>

#22

‘DETOURBE René’
Most probably this on is not utf-8
You can change header of xml as

<?xml version='1.0' encoding='iso-8859-1' ?>

#23

I tried to change the header but nothing happends, even, it’s worth on Chrome.

I never see encoding=‘iso-8859-1’ on my code.

I replaced “é” by “e” and it’s working but it isn’t a good solution.

My DB is in utf-8, and all my website is in utf-8, so i don’t understand why “é” isn’t handled.


#24

My DB is in utf-8
Double check that.
Not sure about your DB, but in MySQL collation can be set on tables, so DB can be created as UTF, but separate tables as iso-8859-1


#25

now it did’t work! i same try to use combo in unit view.(another section work perfect but not combo)
and reciev error
Uncaught TypeError: Cannot read property ‘length’ of undefined
at Object.scheduler.getLabel (dhtmlxscheduler.js:1872)
at Object.scheduler.templates.event_text (report.php?id=20:454)
at Object.scheduler.render_event (dhtmlxscheduler.js:3309)
at Object.scheduler.render_data (dhtmlxscheduler.js:3047)
at Object.scheduler.render_data (dhtmlxscheduler_year_view.js:60)
at Object.scheduler.render_view_data (dhtmlxscheduler.js:2999)
at Object.scheduler.update_view (dhtmlxscheduler.js:1589)
at Object.scheduler.updateView (dhtmlxscheduler.js:1630)
at Object. (report.php?id=20:520)
at Object.z [as ev_onxle] (dhtmlxscheduler.js:407)

if i type return event.f7220, i reciev id, but if i want output label used your code below it not work.
this code return event.text + " ("+scheduler.getLabel(“f7220”,event.f7220) +")"; don’t work


#26

Could you please, provide a snippet of the using code. So I can help you to find the reason of the problem.


#27

i have big project. big database. But all work perfect and combo.
only when i try recieve label…!

combo server side:
<?php header(“Content-type:text/xml”);

require_once("…/dhtml/codebase/connector/combo_connector.php");
require_once("…/dhtml/codebase/connector/db_mysql.php");
$res=mysql_connect(“localhost”,“fintura2ru_medik”,“Qawsedrf”);
//
mysql_select_db(“fintura2ru_medik”);
mysql_query(“SET NAMES ‘utf8’”);
mysql_query(“SET CHARACTER SET ‘utf8’”);
mysql_query(“SET SESSION collation_connection = ‘utf8_general_ci’”);
//
$combo = new ComboConnector($res, “MySQL”);

$combo->event->attach(“beforeFilter”, “by_id”);
function by_id($filter) {
if (isset($_GET[‘id’]))
$filter->add(“id”, $_GET[‘id’], ‘=’);
}

$combo->dynamic_loading(10);
$combo->render_table(“cb_data290”,“id”,“f8260”);
?>

this code js:
scheduler.attachEvent(“onMouseDown”, function (id,eve){
scheduler.templates.event_text = function(start, end, event){
return event.text + " ("+scheduler.getLabel(“clients”,event.f7220) +")";
//return event.text + " ("+event.f7220+")";

}

and lightbox:
{name: “Врач”, height: 21, map_to: “f7240”, type: “select”, options:scheduler.serverList(“personal”),default_value: “”},
{ name: “Пациент”,height: 41, map_to: “f7220”, type: “combo”, script_path: “dhtml/combo.php”,filtering:true },
{name:“Первичный”, height:21,options:pervich, map_to:“f8880”,type:“radio”},
{name:“time”,width:100, height:72, type:“time”, map_to:“auto” },
{ name:“status”, height:38, options:status,map_to:“f7430”, type:“select”,default_value: “Записан”},
{name:“Доп.Инфо”, height:43, map_to:“text”, type:“textarea” , focus:false}