JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old April 9th, 2003, 01:12 AM
pgokcen pgokcen is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 44 pgokcen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 29 sec
Reputation Power: 16
Unhappy What's wrong with this code?

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...

Reply With Quote
  #2  
Old April 16th, 2003, 03:57 AM
fakker fakker is offline
The calm b4 the storm
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Manchester, UK
Posts: 404 fakker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 17
Send a message via Yahoo to fakker
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...!!
__________________
Matt 'Fakker' Facer

mattfacer.com

Reply With Quote
  #3  
Old April 16th, 2003, 04:02 AM
pgokcen pgokcen is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 44 pgokcen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 29 sec
Reputation Power: 16
Question I found the solution but now confused with another problem

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....
Attached Files
File Type: zip menu.zip (5.6 KB, 918 views)

Reply With Quote
  #4  
Old April 16th, 2003, 06:39 AM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Posts: 2,056 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 44 m 22 sec
Reputation Power: 0
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?

Reply With Quote
  #5  
Old April 16th, 2003, 06:49 AM
pgokcen pgokcen is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 44 pgokcen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 29 sec
Reputation Power: 16
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...

Reply With Quote
  #6  
Old April 16th, 2003, 06:56 AM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Posts: 2,056 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 44 m 22 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > What's wrong with this code?


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap