السلام عليكم ورحمة الله وبركاته ..
مساء/ صباح الخير
أخواني لدي كود جافا سكربت للقائمة يعمل بشكل جيد مع الانترنت اكسبلورر
لكن ظهرت لي مشكلة مع الفايرفوكس ..
في الفايرفوكس القائمة مفتوحة على طووول ..
ياليت أحصل الحل عندكم
HEAD
<style>
<!--
#foldheader{cursor:hand; font-weight:bold;
list-style-image:url(fold.gif)}
#foldinglist{list-style-image:url(list.gif)}
//-->
</style>
<script language="JavaScript1.2">
<!--
/**
* Based on Folding Menu Tree
* Dynamic Drive (<A href="http://www.dynamicdrive.com">www.dynamicdrive.com</A>)
* For full source code, installation instructions,
* 100's more DHTML scripts, and Terms Of
* Use, visit dynamicdrive.com
*
* Updated to support arbitrarily nested lists
* by Mark Quinn (<A href="mailto:mark@robocast.com">mark@robocast.com</A>) November 2nd 1998
*
* Translated By <A href="http://www.star28.com/">www.star28.com/</A>
* Visit our site at <A href="http://www.star28.com/">http://www.star28.com/</A> for more code
*/</P>
var head="display:''"
img1=new Image()
img1.src="fold.gif"
img2=new Image()
img2.src="open.gif"</P>
function change(){
if(!document.all)
return
if (event.srcElement.id=="foldheader") {
var srcIndex = event.srcElement.sourceIndex
var nested = document.all[srcIndex+1]
if (nested.style.display=="none") {
nested.style.display=''
event.srcElement.style.listStyleImage="url(open.gif)"
}
else {
nested.style.display="none"
event.srcElement.style.listStyleImage="url(fold.gif)"
}
}
}</P>
document.onclick=change</P>
//-->
</script>BODY
<ul>
<li id="foldheader">المجموعة الأولى</li>
<ul id="foldinglist" style="display:none" style=&{head};>
<li><a href="<A href='http://www.">رابط'>http://www.">رابط</A> 1</a></li>
<li><a href="<A href='http://www.">رابط'>http://www.">رابط</A> 2</a></li>
<li><a href="<A href='http://www.">رابط'>http://www.">رابط</A> 3</a></li>
</ul></P>
<li id="foldheader">المجموعة الثانية</li>
<ul id="foldinglist" style="display:none" style=&{head};>
<li><a href="<A href='http://www.">رابط'>http://www.">رابط</A> 1</a></li>
<li><a href="<A href='http://www.">رابط'>http://www.">رابط</A> 2</a></li>
<li><a href="<A href='http://www.">رابط'>http://www.">رابط</A> 3</a></li>
</ul></P>
<li id="foldheader">المجموعة الثالثة</li>
<ul id="foldinglist" style="display:none" style=&{head};>
<li><a href="<A href='http://www.">رابط'>http://www.">رابط</A> 1</a></li>
<li><a href="<A href='http://www.">رابط'>http://www.">رابط</A> 2</a></li>
<li id="foldheader">مجموعة فرعية</li>
<ul id="foldinglist" style="display:none" style=&{head};>
<li><a href="<A href='http://www.">رابط'>http://www.">رابط</A> 1</a></li>
<li><a href="<A href='http://www.">رابط'>http://www.">رابط</A> 2</a></li>
</ul>
<li><a href="<A href='http://www.">رابط'>http://www.">رابط</A> 3</a></li>
<li><a href="<A href='http://www.">رابط'>http://www.">رابط</A> 4</a></li>
</ul>
</ul></P>
<script language="JavaScript1.2">
<!--
/**
* Get cookie routine by Shelley Powers
* (<A href="mailto:shelley.powers@ne-dev.com">shelley.powers@ne-dev.com</A>)
*/
function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
// if cookie exists
if (offset != -1) {
offset += search.length
// set index of beginning of value
end = document.cookie.indexOf(";", offset);
// set index of end of cookie value
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}</P>
if (get_cookie(window.location.pathname) != ''){
var openresults=get_cookie(window.location.pathname).split(" ")
for (i=0; i < openresults.length; i++){
foldinglist[openresults].style.display=''
document.all[foldinglist[openresults].sourceIndex -
1].style.listStyleImage="url(open.gif)"
}
}</P>
if (document.all){
var nodelength=foldinglist.length-1
var nodes=new Array(nodelength)
var openones=''
}</P>
function check(){
for (i=0; i <= nodelength; i++){
if (foldinglist.style.display=='')
openones=openones + " " + i
}
document.cookie=window.location.pathname+"="+openones
}</P>
if (document.all)
document.body.onunload=check
//-->
</script>