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

أين الخطأ هنا

مغلق
بدأه أحمد عدلي في 22 يناير 2003 · 4 رد · 557 مشاهدة · في منتدى تصميم صفحات الويب
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

الكود بسيط و هو من صنع الاخ محمد خليل ابو صلاح لعمل قائمة بسيطة

المشكلة انه عند وضعها داخل لووب تحدث المشكلة ولا تعمل القائمة وهذا هو الكود:

<!--#include file="connection.inc"-->

<html dir="rtl">

<head>

<meta name="GENERATOR" content="Microsoft FrontPage 5.0">

<meta name="ProgId" content="FrontPage.Editor.Document">

<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">

<title>index2</title>



<script language="javascript">

   function show(){

   // This code written by MOHD. ABU SALAH

   // e-mail : mohd_kh_80@hotmail.com

         var lesimg=""

         if(lessons.className=="plus"){

         lessons.innerHTML="هذه هي الدروس  " +

         "     <OL> "+

         "[img=opdrct.gif]



<style type="text/css">

<!--

 a:actived{color:red; text-decoration:none;}

 a:link{color:red; text-decoration:none;}

 a:visited{color:red; text-decoration:none;}

 a:hover{color:#123456; text-decoration:underline;}

 -->

 </style>



</head>

<body>

      

  

<% selectSQL="select * from  adds order by add_date desc"

set rs=ADO.execute(selectSQL)

    %>





<table align=center border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="31%">

  <tr>

    <td width="100%">

    [img=../images/drct.gif]

    <font face="Tahoma" style="font-size: 8pt; font-weight: 700" color="#FF9900">

    <span lang="ar-sa" id=lessons class="plus">الدروس</span>

    </font></td>

  </tr>

</table>



 <% do while not rs.eof

  rs.movenext

loop 

     %> 

</body></html>
#3

انا قرأت الشرح و فهمته بس المشكلة ما تزال قائمة اللوب الخاص بالasp بيكرر السكربت كويس بس بعد كدة لا يعمل و مش عارف ايه السبب :o:o:o:o

#4

اذا كان كودك كما هو فوق فلا توجد مشكلة .. اما ان وضعت الوصلة التي تنسدل منها الوصلات داخل دوارة من اجل الحصول على عدد منها فمن المؤكد انك ستجد مشكلة و السبب لو نظرت هنا:

<span lang="ar-sa" id=lessons   class="plus">

ان العنصر له id و كلاس و إن وضعتها في دوارة سيتكرر و بالتالي ستحدث المشكلة لانه تكرر كلاس ال minus مثلا لنفس العنصر مع انه بنفس الاسم بحالة plus في الوصلة الاخرى لنفس ال id لذا يجب ان تغير ال id لكل عنصر ..

طبعا كيف؟؟ هذه متروكة لك انت ...

You can fly while you can touch the sky

#5

نعمل دالة بداخل الاستعلام تضيف واحد على كل id وبالتالي لا يتغير كالتالي مثلا :

dim c

c = 1

selectSQL="select * from  adds order by add_date desc"

set rs=ADO.execute(selectSQL)

do while not rs.eof

c = c+1

و نضيف المتغير c على الid بحيثانه يتغير

صح ؟؟؟ :o:o:o:o

هذا الموضوع مغلق.

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