ich habe versucht eine artikkelliste als dropdownmenü zu bauen.
dafür habe ich mir das artikelliste modul von Jan Lengowski geschnappt
und eine dreamweaverextention. ich habe jedoch ein kleineres problem
mit dem script.
folgender code steht im header des layouts
Code: Alles auswählen
<script type="text/javascript">
<!--
function MM_jumpMenu(targ,selObj,restore){
if (!(selObj.options[selObj.selectedIndex].value) == "") {
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
}
//-->
</script>
menü aufruft.
der code im contenido modul für die ausgabe sieht folgendermaßen aus
Code: Alles auswählen
<?php
/***********************************************
* CONTENIDO MODUL - OUTPUT
*
* ARTIKELLISTE
*
* Artikelliste Head 1
*
* Erstellt eine Liste mit allen Artikel bis
* auf den Startartikel.
*
* Basierend auf dem Modul von Jan Lengowski
************************************************/
// second db class instance
$db2 = new DB_Contenido;
// selected category
$selcat = "CMS_VALUE[0]";
if($selcat!="0" && $selcat!=""){
// select all articles in category widthout start article
$query = "SELECT ARTLANG.idart, ARTLANG.idartlang FROM ".$cfg["tab"]["cat_art"]." AS CATART, ".
$cfg["tab"]["art_lang"]." AS ARTLANG ".
"WHERE CATART.idcat = '$selcat' AND ARTLANG.idart = CATART.idart AND ARTLANG.idlang = '$lang' AND ".
"ARTLANG.online = '1' ORDER BY ARTLANG.title DESC";
// execute query
$db->query($query);
unset($articleID);
unset($linkID);
// get id's of sub articles
while ($db->next_record()) {
$articleID[] = $db->f("idartlang");
$linkID[] = $db->f("idart");
} // end while
// loop through subarticles
echo '
<form>
<select name="ContactCentre" class="formObj" onChange="MM_jumpMenu('parent',this,0)">
<option value="selected">Bitte auswählen...</option>
';
if (is_array($articleID)) {
foreach ($articleID as $key => $value) {
// select all CMS variables of the article
$sql = "SELECT * FROM ".$cfg["tab"]["content"]." WHERE idartlang = '$value' AND idtype = '1' AND typeid = '1'";
$db->query($sql);
$db->next_record();
$head = $db->f("value");
if ( strlen($head) > "CMS_VALUE[3]") {
$head = substr($head, 0, "CMS_VALUE[3]");
$head .= '..';
}
// link
$link = $sess->url("front_content.php?client=$client&lang=$lang&idcat=$selcat&idart=$linkID[$key]&m=$m&s=$s");
echo '<option value="'.$link.'">'.urldecode($db->f("value")).'</option>';
} // end while
unset($headline);
unset($text);
} // end foreach
} // end if (is_array)
echo '</select></form>';
?>
werden. ich denke es liegt an folgender code zeile:
Code: Alles auswählen
<select name="ContactCentre" class="formObj" onChange="MM_jumpMenu('parent',this,0)">
auf. aber anführungszeichen gehen mit dem javascript nicht. hmpf
hat jemand eine idee?
gruß René