|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
I have 2 src files:
and .html page is here: <%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%> <html> <head> <title>Documentation</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script language="JavaScript" src="Script\div_basics.js"></script> <script language="JavaScript" src="Script\menu_basics.js"></script> </head> <body> <script language="JavaScript" src="Script/div_basics.js","Script/menu_basics.js"> var menu=new PopUpMenu(80); menu.setSizes(2,3,2,0); menu.setColors("#C0C0C0","steelblue","yellow","blue","darkblue","silver","lightblue","#000040"); menu.addItem(new PopUpMenuItem("Item1","#")); menu.addItem(new PopUpMenuItem("Item2","#")); window.onload=initMenu; var minX=4; var minY=4; function initMenu(){ menu.create(); menu.setStatic(true); menu.open(minX,minY); repositionMenu(); } function repositionMenu() { var viewTop, viewBottom; var dy; viewTop = getPageScrollY(); viewBottom = viewTop + getWindowHeight(); if (menu.bottom < viewTop) menu.moveTo(minX, viewTop - menu.height); if (menu.top > viewBottom) menu.moveTo(minX, viewBottom); dy = Math.round(Math.abs(viewTop + minY - menu.top) / 2); if (viewTop + minY < menu.top) dy = -dy; menu.moveBy(0, dy); setTimeout("repositionMenu()", 20); } </script> </body> </html> Shows me nothing?????? If you help me I would be very happy thanks... |
|
#2
|
|||
|
|||
|
hey pgokcen,
welcome to the devarticles forum!! can you tell us what is in the JS source files? or attach them? I cant test your code without the files.... cheers...!! |
|
#3
|
|||
|
|||
|
Hi;
I attach you a .js file I want to create a menu with submenus using this js file but how can you help me It's enough just a little example Thanks.... |
|
#4
|
||||
|
||||
|
pgokcen, where did u get the code from - it looks like you've downloaded the source from somewhere, so it must have been working originally... have you got the URL?
|
|
#5
|
|||
|
|||
|
This is a code from somewhereelse
yes I found this code on server.It looks like good.I found the html code also creating the menu,but in that example user didn't create submenus.I wonder how the submenus created?
Thank you... |
|
#6
|
||||
|
||||
|
I dunno if this is the kind of thing you're looking for, but I've used this menu several times in commercial apps lately - it's a fantastic, flexible, and, most importantly, browser friendly!
http://www.dynamicdrive.com/dynamic...vmenu/index.htm |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > What's wrong with this code? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|