PDA

View Full Version : making right to left



bakhanbeigi
06-28-2007, 01:56 PM
1) Script Title:
SuckerTree Vertical Menu
SuckerTree Horizontal Menu

2) Script URL (on DD):
http://www.dynamicdrive.com/style/csslibrary/item/suckertree-menu-vertical/#
http://www.dynamicdrive.com/style/csslibrary/item/suckertree-menu-horizontal/#



3) Describe problem:

How can I make it right to left for asian languages ?

Jas
06-28-2007, 08:45 PM
How can I make it right to left for asian languages ?

I'm sorry, but what do you mean by "right to left"? The whole menu, the text-alignment, the characters. . . ?

bakhanbeigi
06-29-2007, 07:31 AM
I only want move the Vertical menu to right of page and so all sub menues should open from left side of menu

Horizontal menu is not important now

Jas
06-29-2007, 07:25 PM
Took me a while to figure out where they are lining it up at, but here it is:
head section (leave your CSS and replace Javascript with this:


<script type="text/javascript">

//SuckerTree Vertical Menu 1.1 (Nov 8th, 06)
//By Dynamic Drive: http://www.dynamicdrive.com/style/

var menuids=["suckertree1"] //Enter id(s) of SuckerTree UL menus, separated by commas

function buildsubmenus(){
for (var i=0; i<menuids.length; i++){
var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
for (var t=0; t<ultags.length; t++){


ultags[t].parentNode.getElementsByTagName("a")[0].className="subfolderstyle"
if (ultags[t].parentNode.parentNode.id==menuids[i]) //if this

is a first level submenu


ultags[t].style.left=ultags[t].parentNode.offsetWidth-330+"px" //dynamically

position first level submenus to be width of main menu item
else //else if this is a sub level submenu (ul)


ultags[t].style.left=ultags[t-1].getElementsByTagName("a")[0].offsetWidth-340

+"px" //position menu to the right of menu item that activated it
ultags[t].parentNode.onmouseover=function(){
this.getElementsByTagName("ul")[0].style.display="block"
}
ultags[t].parentNode.onmouseout=function(){
this.getElementsByTagName("ul")[0].style.display="none"
}
}
for (var t=ultags.length-1; t>-1; t--){ //loop through all

sub menus again, and use "display:none" to hide menus (to prevent possible

page scrollbars
ultags[t].style.visibility="visible"
ultags[t].style.display="none"
}
}
}

if (window.addEventListener)
window.addEventListener("load", buildsubmenus, false)
else if (window.attachEvent)
window.attachEvent("onload", buildsubmenus)
</script>



body is the same.

Hope this helps.

bakhanbeigi
06-29-2007, 10:02 PM
thank you very much

now I need another help

I want add my information from my database I worte a code by PHP but have problem can you help me ?

Jas
07-02-2007, 05:44 PM
Post your code and some more detail and I'll see what I can do :)

bakhanbeigi
07-07-2007, 03:31 PM
So it can not show submenues because have some problem

What is the problem in creating dynamic li and ul in my code ?