ورود

View Full Version : ثابت نگه داشتن منو



arsalansalar
یک شنبه 29 دی 1387, 09:56 صبح
با سلام
دوستان عزیز من یک منو با javascript تهیه کردم که در عکسهای زیر مشخص است.و درست هم کار میکند.ولی مشکل من این است که زمانی که website بالا می آید منو به شکل عکس زیر است و زمانی که کاربر بر رویکی از این آیتمها کلیک میکند به حالت شکل 2 در می آید.و زمانی که سایت به یک صفحه دیگر می رود دوباره منو به حالت شکل یک در می آید.چگونه می شود که منو را به همین شکل نگه داشت(البته بدون ajax)
کدهای که نوشتم:


<DIVclass=style19onmouseover="this.style.color= 'black'"width="160"hieght="21"
onclick=javascript:mymenu(f0)
onmouseout="this.style.color= '#004ca2'">+<spanclass="style32"> Our Company</span></DIV>
<DIVid=f0style="DISPLAY: none"class="style20">
<DIVclass=style23id=aboutus
onmouseover="this.style.color= 'black'"
onclick="window.location='About.aspx'"
onmouseout="this.style.color= '#004ca2'">ABOUT US</DIV>
<DIVclass=style23id=policyonmouseover="this.style.color= 'black'"
onclick="window.location='Policy.aspx'"
onmouseout="this.style.color= '#004ca2'">POLICY</DIV></DIV>
<DIVclass=style19onmouseover="this.style.color= 'black'"
onclick=javascript:mymenu(f1)
onmouseout="this.style.color= '#004ca2'">+ Products</DIV>
<DIVid=f1style="DISPLAY: none"class="style20">
<DIVclass=style23onmouseover="this.style.color= 'black'"
onclick=javascript:mmenu(sf0)
onmouseout="this.style.color= '#004ca2'">SYRINGES</DIV>
<DIVid=sf0style="DISPLAY: none"><SPANid=Anthem_lblSyring__><SPAN
id=lblSyring>
<DIVclass=style22id=sub13onmouseover="this.style.color= '#9d0b0e'"
onclick="window.location='Syringe10 ml .aspx'"
onmouseout="this.style.color= '#004ca2'">Syringe 10 ml</DIV>
<DIVclass=style22id=sub15onmouseover="this.style.color= '#9d0b0e'"
onclick="window.location='Syringe 2, 5 ml .aspx'"
onmouseout="this.style.color= '#004ca2'">Syringe 2&amp;5 ml</DIV>
<DIVclass=style22id=sub16onmouseover="this.style.color= '#9d0b0e'"
onclick="window.location='Insulin .aspx'"
onmouseout="this.style.color= '#004ca2'">Insulin syringes</DIV></SPAN></SPAN></DIV>
<DIVclass=style23onmouseover="this.style.color= 'black'"
onclick=javascript:mmenu(sf1)
onmouseout="this.style.color= '#004ca2'">FILTERS</DIV>
<DIVid=sf1style="DISPLAY: none"><SPANid=Anthem_lblFilters__><SPAN
id=lblFilters>
<DIVclass=style22id=sub10onmouseover="this.style.color= '#9d0b0e'"
onclick="window.location='Low flux.aspx'"
onmouseout="this.style.color= '#004ca2'">Low Flux</DIV>
<DIVclass=style22id=sub11onmouseover="this.style.color= '#9d0b0e'"
onclick="window.location='High flux.aspx'"
onmouseout="this.style.color= '#004ca2'">High Flux</DIV></SPAN></SPAN></DIV>
<DIVclass=style23onmouseover="this.style.color= 'black'"
onclick=javascript:mmenu(sf2)
onmouseout="this.style.color= '#004ca2'">NEEDLES</DIV>
<DIVid=sf2style="DISPLAY: none"><SPANid=Anthem_lblNeedles__><SPAN
id=lblNeedles>
<DIVclass=style22id=sub5onmouseover="this.style.color= '#9d0b0e'"
onclick="window.location='Dental Needle.aspx'"
onmouseout="this.style.color= '#004ca2'">Dental Needle</DIV></SPAN></SPAN></DIV>
<DIVclass=style23onmouseover="this.style.color= 'black'"
onclick=javascript:mmenu(sf3)
onmouseout="this.style.color= '#004ca2'">ALL SETS</DIV>
<DIVid=sf3style="DISPLAY: none"><SPANid=Anthem_lblAllset__><SPAN
id=lblAllset>
<DIVclass=style22id=sub1onmouseover="this.style.color= '#9d0b0e'"
onclick="window.location='Microset.aspx'"
onmouseout="this.style.color= '#004ca2'">Microset</DIV>
<DIVclass=style22id=sub3onmouseover="this.style.color= '#9d0b0e'"
onclick="window.location='Blood Tubing Set.aspx'"
onmouseout="this.style.color= '#004ca2'">Blood Tubing Set</DIV>
<DIVclass=style22id=sub9onmouseover="this.style.color= '#9d0b0e'"
onclick="window.location='Infusion Set .aspx'"
onmouseout="this.style.color= '#004ca2'">Infusion Set</DIV>
<DIVclass=style22id=sub12onmouseover="this.style.color= '#9d0b0e'"
onclick="window.location='Leukocyte Filter.aspx'"
onmouseout="this.style.color= '#004ca2'">Leukocyte Filter</DIV>
<DIVclass=style22id=sub14onmouseover="this.style.color= '#9d0b0e'"
onclick="window.location='Fistula needle.aspx'"
onmouseout="this.style.color= '#004ca2'">Fistula needle</DIV></SPAN></SPAN></DIV>
<DIVclass=style23id=ivcatheter
onmouseover="this.style.color= 'black'"
onclick="window.location='IV-Catheter .aspx'"
onmouseout="this.style.color= '#004ca2'">IV CATHETER</DIV>
<DIVclass=style23onmouseover="this.style.color= 'black'"
onclick=javascript:mmenu(sf4)
onmouseout="this.style.color= '#004ca2'">NEW PRODUCTS</DIV>
<DIVid=sf4style="DISPLAY: none"><SPANid=Anthem_lblNew__><SPAN
id=lblNew>
<DIVclass=style22id=sub2onmouseover="this.style.color= '#9d0b0e'"
onclick="window.location='Blood Bag.aspx'"
onmouseout="this.style.color= '#004ca2'">Blood Bag</DIV>
<DIVclass=style22id=sub6onmouseover="this.style.color= '#9d0b0e'"
onclick="window.location='so-wash.aspx'"
onmouseout="this.style.color= '#004ca2'">So-Wash</DIV>
<DIVclass=style22id=sub7onmouseover="this.style.color= '#9d0b0e'"
onclick="window.location='So cart.aspx'"
onmouseout="this.style.color= '#004ca2'">So-Cart</DIV>
<DIVclass=style22id=sub8onmouseover="this.style.color= '#9d0b0e'"
onclick="window.location='So Bag.aspx'"
onmouseout="this.style.color= '#004ca2'">So-Bag</DIV></SPAN></SPAN></DIV></DIV>


css ها هم در ضمیمه هست:

emad_67
یک شنبه 29 دی 1387, 17:45 عصر
مطممئنی درست ضمیمه کردی؟ تو ضمیمه که فقط 1 فایل js بود. css و عکس ندیدم من.

arsalansalar
دوشنبه 30 دی 1387, 08:15 صبح
ببخشید اینم عکسها:
از همان فایل js منو کار می کند.

hamidreza66
جمعه 11 بهمن 1387, 23:36 عصر
سلام به همه

دوستان برای طراحی منویی مثل: http://www.yazdjdu.ac.ir باید چیکار کنم؟

منظورم از منویی که دیدید منویی با پشتیبانی از اصول فارسی نویسی (از راست به چپ) هست، و وقتی که بصورت داینامیک گزینه ای اضافه میشه، منو باز به همین صورت باز بشه (یعنی به چپ یا راست جابجا نشه)

من قبلاً با برنامه هایی مثل: Sothink DHTML Menu 8 کار کردم که اصول rtl رو نداره و مجبور شدم دستی موقعیت بدم و این باعث میشه با تغییر گزینه ها ظاهر منو بهم بریزه
برنامه های دیگه ای هم امتحان کردم اما وقتی به کد http://www.yazdjdu.ac.ir نگاه کردم دیدم روش ساده تری استفاده کرده