الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

عمل قوائم منسدلة

بدأه lovely_ned في 5 أكتوبر 2010 · 5 رد · 980 مشاهدة · في قسم البرمجة بــ Javascript
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم ورحمة الله

عندي سؤال مهم

اريد ان اعمل قوائم منسدلة في تطبيق الويب الذي اعمله

في صفحة jsp كتبت الكود التالي

<html><head>
<title>Selteco Menu Maker</title>
</head><body>
<script language="javascript" src="Exp.js"></script>

</body></html>

وفي صفحة .js كتبت الكود التاليز

document.write('<STYLE type="text/css">');
document.write('#menuspan21270515 { position:absolute; width:150px; }');
document.write('#menutable21270515 { border-width: 0px; border-color: #000000; border-style:solid}');
document.write('td.menucell21270515 { padding:2px; padding-left:4px; padding-right:4px; background:#76A5E8; border:2px outset #76A5E8; text-align:LEFT; }');
document.write('#submenutable21270515 { background: #A0CAE5; border-width: 1px; border-color: #000000; border-style:solid}');
document.write('td.topcell21270515 {text-decoration:none; color:#FFFFFF; font-weight: 700; font-family: Verdana; font-size: 12px; font-style:normal; text-align:CENTER; }');
document.write('a.topitem21270515 {text-decoration:none; color:#FFFFFF; font-weight: 700; font-family: Verdana; font-size: 12px; font-style:normal; } ');
document.write('a.topitem21270515:hover {text-decoration:none; color:#FFFFFF; font-weight: 700; font-family: Verdana; font-size: 12px; font-style:normal;}');
document.write('a.subitem21270515 {text-decoration:none; color:#000000; font-weight: 400; font-family: Verdana; font-size: 11px; font-style:normal; } ');
document.write('a.subitem21270515:hover {text-decoration:none; color:#FFDD00; font-weight: 400; font-family: Verdana; font-size: 11px; font-style:normal; }');
document.write('P.MN21270515 {margin:0px; color:#FFFFFF; font-weight: 700; font-family: Verdana; font-size:12px; font-style:normal;  }');
document.write('P.SMN21270515 {text-decoration:none; color:#000000; font-weight: 400; font-family: Verdana; font-size:11px; font-style:normal; margin:0px; }');
document.write('#submenu21270515_0 { position:absolute; left:135px; top:28px; visibility:hidden; }');
document.write('</style>');
var thisbrowser21270515
var hidetimer21270515 = null;
if(document.layers){ thisbrowser21270515='NN4'; }
if(document.all){ thisbrowser21270515='IE'; }
if(!document.all && document.getElementById){ thisbrowser21270515='NN6'; }
function showmenu21270515(menuname)
{
if(thisbrowser21270515=='NN4') document.layers[menuname].visibility = 'visible';
if(thisbrowser21270515=='IE') document.all[menuname].style.visibility = 'visible';
if(thisbrowser21270515=='NN6') document.getElementById(menuname).style.visibility = 'visible';
if(hidetimer21270515) clearTimeout(hidetimer21270515);}
function timermenu21270515()
{
if(hidetimer21270515) clearTimeout(hidetimer21270515);hidetimer21270515 = setTimeout("hideall21270515();",1000);
}
function hidemenu21270515(menuname)
{
if(thisbrowser21270515=='NN4') document.layers[menuname].visibility = 'hidden';
if(thisbrowser21270515=='IE') document.all[menuname].style.visibility = 'hidden';
if(thisbrowser21270515=='NN6') document.getElementById(menuname).style.visibility = 'hidden';
}
function hilite21270515(menuitem) 
{
if(typeof(currentpage21270515)!='undefined' && menuitem==currentpage21270515) return;
if(thisbrowser21270515=='IE') document.all[menuitem].style.backgroundColor = '#517389';
if(thisbrowser21270515=='NN6') document.getElementById(menuitem).style.backgroundColor = '#517389';
if(hidetimer21270515) clearTimeout(hidetimer21270515);}
function unhilite21270515(menuitem) 
{
if(typeof(currentpage21270515)!='undefined' && menuitem==currentpage21270515) return;
if(thisbrowser21270515=='IE') document.all[menuitem].style.backgroundColor = '#76A5E8';
if(thisbrowser21270515=='NN6') document.getElementById(menuitem).style. backgroundColor = '#76A5E8';
if(hidetimer21270515) clearTimeout(hidetimer21270515);hidetimer21270515 = setTimeout("hideall21270515();",1000);
}
function hideall21270515()
{
hidemenu21270515('submenu21270515_0');
}
function openmenu21270515(menuname)
{
showmenu21270515(menuname);
if(menuname!='submenu21270515_0') hidemenu21270515('submenu21270515_0');
}
document.write('<table width=150 cellspacing=0 border=0 cellpadding=0>');
document.write('<tr><td align=left valign=top>');
document.write('<span id="menuspan21270515">');
document.write('<table width=150 id="menutable21270515" cellspacing=0 cellpadding=3 >');
document.write('<tr>');
document.write('<td align=center background="l10.gif"> </td>');
document.write('<td class="topcell21270515" align="CENTER" width=150 height=20 background="b10.gif" onMouseOver="hideall21270515()">')
document.write('<table cellspacing=0 cellpadding=0 border=0 width="100%"><tr><td width="90%" align="CENTER">');
document.write('<a href="http://www.selteco.com/menumaker/unregistered.php" target="_self" title="Since 1982, The Weather Channel has brought timely weather information to the world. " class="topitem21270515">Home</a>');
document.write('</td><td><p class="SMN21270515"> </p></td></tr></table>');
document.write('</td>');
document.write('<td align=center background="r10.gif"> </td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td align=center background="l10.gif"> </td>');
document.write('<td class="topcell21270515" align="CENTER" width=150 height=20 background="b10.gif" onMouseOver="openmenu21270515(\'submenu21270515_0\')" onMouseOut="timermenu21270515();">')
document.write('<table cellspacing=0 cellpadding=0 border=0 width="100%"><tr><td width="90%" align="CENTER">');
document.write('<a href="http://www.selteco.com/menumaker/unregistered.php" target="_self" title="" class="topitem21270515">Pictures</a>');
document.write('</td><td><p class="SMN21270515"><font face="webdings" color=#FF6600>4</font></p></td></tr></table>');
document.write('</td>');
document.write('<td align=center background="r10.gif"> </td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td align=center background="l10.gif"> </td>');
document.write('<td class="topcell21270515" align="CENTER" width=150 height=20 background="b10.gif" onMouseOver="hideall21270515()">')
document.write('<table cellspacing=0 cellpadding=0 border=0 width="100%"><tr><td width="90%" align="CENTER">');
document.write('<a href="http://www.selteco.com/menumaker/unregistered.php" target="_self" title="" class="topitem21270515">Contact us</a>');
document.write('</td><td><p class="SMN21270515"> </p></td></tr></table>');
document.write('</td>');
document.write('<td align=center background="r10.gif"> </td>');
document.write('</tr>');
document.write('</table><p>');
document.write('<div id="submenu21270515_0">');
document.write('<table id="submenutable21270515" width=150 cellspacing=0>');
document.write('<tr>');
document.write('<td align="LEFT" class="menucell21270515" height=20 id="s21270515_0_0" onMouseOver="hilite21270515(\'s21270515_0_0\')" onMouseOut="unhilite21270515(\'s21270515_0_0\')">');
document.write('<table cellspacing=0 cellpadding=0 border=0 width="100%"><tr><td width="90%" align="LEFT">');
document.write('<a href="http://www.selteco.com/menumaker/unregistered.php" target="_self" title="" class="subitem21270515" >Pic1</a>')
;document.write('</td><td><p class="SMN21270515"> </p></td></tr></table>');
document.write('</td>');
document.write('</tr>');
document.write('</table></div>');
document.write('</span></td></tr></table>');

و وضعت الملفين .jsp and .js في نفس الفولدر webContent

لكن القائمة لا تظهر اين المشكل؟؟

#2

أعتقد أنه من الأفضل أن تسأل في قسم ال JS .....

#3

السلام عليكم شكرا على الرد لكن اليس لهذا علاقة ب السيرفر tomcat

#4

لا من قريب ... ولا من بعيد ...

تم النقل...

#5

السلام عليكم ورحمة الله

هناك صور في الكود فهل الصور أيضا لا تظهر؟

إن كانت لا تظهر فإما أن هناك مشكلة في المسار أو أن الصور ليست موجودة لديك

في حال ذلك فباحضار الصور تحل المشكلة ﻷن الكتابة الموجودة لونها أبيض و عند احضار الصور ستظهر الكتابة الموجودة إذا كان لون الصور مغاير عن الأبيض

إن لم يكن لديك الصور و لا يوجد لديك ما تضعينه مكانها ابحثي في كود الملف Exp.js

عن كل كتابة كهذه :

color:#FFFFFF

فغيريها إلى الشكل :

color:#000000

فتظهر الكتابة بلون أسود

على كل حال المشكلة كما سبق و ذكرت هو نقص بعض عناصر الصفحة (الصور) فهنا مثلا نجد :

<td class="topcell21270515" align="CENTER" width=150 height=20 background="b10.gif" onMouseOver="hideall21270515()">

يتطلب ظهور هذا السطر بشكل طبيعي إلى وجود هذه الصورة b10.gif في ذات المجلد الذي يتضمن هذه الصفحة

بتوفيق الله..

تم تعديل هذه المشاركة بواسطة MoHaMMaD Pro في 6 أكتوبر 2010 في 21:23

Everything will be fine when we TALK LESS, DO MORE


#6

هل توجد مشكلة من اعطاء نمط قوالب ابسط بكثير واجمل بكثير

صراحة متت من الكود :(

لم يعد لي ضيان على الجافا سكريبت :D

مجرد سؤال : هل يمكنك وضع صورة عن القائمة اي اين رايتها ام من ابداع الذات ؟؟

In bad state

مواضيع مشابهة