Problem mit JS nach Typo3 und PHP update
| Autor | Nachricht |
|---|---|
|
Verfasst am: 11. 03. 2010 [19:49]
|
|
|
mad1200
Themenersteller
Dabei seit: 31.08.2004
Beiträge: 112
|
Nach Update auf typo 4.3.1 und php 5.x habe ich ein Problem mit einer Funktion in der Javascript aufgerufen wird. Ich weiß nicht, wie ich es ändern kann. Hoffe, daß mir jemand helfen kann. Hier sollen zwei Bereiche gezeigt werden, wie man es aus em BE kennt. Linke Seite leer oder mit bereits ausgewähltem Inhalt, und rechte Seite mit dem noch zur Verfügung stehenden Inhalt. PHP function selectBoxProcess(){
$sql.='SELECT tx_mgcompetitors_process.uid as uid,
tx_mgcompetitors_process.processname as processname FROM tx_mgcompetitors_process';
if($this->cat){
$sql.=' , tx_mgcompetitors_categories, tx_mgcompetitors_categories_process_mm
WHERE tx_mgcompetitors_categories_process_mm.uid_local = "'.$this->cat.'"
AND tx_mgcompetitors_categories.uid = "'.$this->cat.'"
AND tx_mgcompetitors_categories_process_mm.uid_foreign = tx_mgcompetitors_process.uid ';
}
$sql.=' ORDER BY tx_mgcompetitors_process.processname';
$res=$GLOBALS['TYPO3_DB']->sql_query($sql);
if($this->piVars['action']=='new' || $this->piVars['action']=='editCompany'){
while ($row = mysql_fetch_assoc($res)) {
$options[$row['uid']]=$row['processname'];
}
# debug($options);
if (is_array($options)) {
$alloptions=array_merge($options,$selectedDevices);
}
$content.=$this->make_mulSelForms($this->prefixId.'[input][processUid]',
$selectedDevices,
$options);
unset ($options);
unset ($alloptions);
unset ($selectedDevices);
}else{
$content.='
<select name="'.$this-">prefixId.'[input][processUid]">
<option></option>';
while ($row=$GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
$content.='<option value=".$row[" uid="">'.$row['processname'].'</option>'.chr(10);
}
$content.='</select>';
}
return $content;
}Und hier der Teile, der in der anderen Funktion aufgerufen wird. PHP function make_mulSelForms($name,$selected,$options) {
$selSize=sizeof($selected)+4;
$optSize=(sizeof($options)>7)?'7':sizeof($options);
$return='
<table border="0" cellpadding="0" cellspacing="0" width="1">
<tr>
<td>'.$this->pi_getLL('Selected Processes').':</td>
<td></td>
<td>'.$this->pi_getLL('Possible Processes').':</td>
</tr>
<tr>
<td valign="top">
<select size="'.$selSize.'" multiple="multiple" name="'.$name.'_list" style="width:200px;">';
if (is_array($selected)) {
foreach ($selected as $key=>$value) {
$return.=' <option value="'.$key.'">'.$value.'</option>
';
$hiddenopts.=','.$key;
}
}
$return.=' </select>
</td>
<td valign="top">
<a href="#" onclick="setFormValueManipulate(\''.$name.'\'); return false;">
<img src="/typo3/gfx/group_clear.gif" width="14" height="14" border="0" alt="Remove selected items" title="Remove selected items" />
</a>
</td>
<td valign="top">
<select name="'.$name.'_sel" size="'.$optSize.'" onchange="setFormValueFromBrowseWin(\''.$name.'\',
this.options[this.selectedIndex].value,
this.options[this.selectedIndex].text);
">';
if (is_array($options)) {
foreach ($options as $key=>$value) {
$return.=' <option value="'.$key.'">'.$value.'</option>
';
//$hiddenopts.=','.$key;
}
}
$return.='
</select>
</td>
</tr>
</table>';
// for ($i=0;$i<count($selected);$i++){
$return.='<input type="hidden" name="'.$name.'" value="' ;
if (ereg(" hiddenopts="" return="" else="" /></td>
</tr>';
// }
return $return;
}Ich bekomme auch Fehlermeldungen des IE Details zum Fehler auf der Webseite Benutzer-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.3061 Zeitstempel: Thu, 11 Mar 2010 18:46:58 UTC Meldung: ';' erwartet Zeile: 1172 Zeichen: 129 Code: 0 URI: http://192.168.100.3/index.php?id=10&no_cache=1&tx_mgcompetitors_pi1[action]=new&tx_mgcompetitors_pi1[category]=1 Danke für Hilfe |
|
Verfasst am: 12. 03. 2010 [08:30]
|
|
|
ammannd
Dabei seit: 29.01.2006
Beiträge: 149
|
da hast du wohl irgendwo ein semikolon ( |
|
Verfasst am: 12. 03. 2010 [11:07]
|
|
|
mad1200
Themenersteller
Dabei seit: 31.08.2004
Beiträge: 112
|
Also mit Firebug komme ich nicht weiter. Ich vermute den Fehler hier irgendwo, wo die javascriptfunktion aufgerufen wird. Vielleicht übersehe ich was. PHP $content='
<td valign="top">
<a href="#" onclick="setFormValueManipulate(\''.$name.'\'); return false;">
<img src="/typo3/gfx/group_clear.gif" width="14" height="14" border="0" alt="Remove selected items" title="Remove selected items" />
</a>
</td>
<td valign="top">
<select name="'.$name.'_sel" size="'.$optSize.'"
onchange="setFormValueFromBrowseWin(\''.$name.'\',
this.options[this.selectedIndex].value,
this.options[this.selectedIndex].text);
">';
if (is_array($options)) {
foreach ($options as $key=>$value) {
$content.=' <option value="'.$key.'">'.$value.'</option>
';
}
}
$content='</select>'; |
|
Verfasst am: 12. 03. 2010 [17:18]
|
|
|
mad1200
Themenersteller
Dabei seit: 31.08.2004
Beiträge: 112
|
Ich habe jetzt mal die /* <![CDATA[ */ /* ]]> */ Tags rausgenommen und es funktioniert. Benötigt man diese nicht mehr? |



