Advanced Search

Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: JS drop down menu issues

  1. #1
    Join Date
    Nov 2005
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default JS drop down menu issues

    I'm working on a drop-down menu for this site:

    http://www.freewebs.com/beckwithma/l...%20Schools.htm


    There are a few things I need to know how to do, or if someone could do them for me it would be greatly apreciated.


    1: When you mouse over the menu for the first time, a thing pops up that sais 'trial version' I want to remove whatever is causing that from the code.
    2: I want slightly larger horizontal space between the items on the list
    3: I need to know how to have some of the links in the drop down menue target a frame and some target a new window.

    Here are the .JS files:

    http://www.freewebs.com/beckwithma/library/apymenu.js
    http://www.freewebs.com/beckwithma/library/newdata1.js


    This is a project for my school's library website, so I don't have any sortof budget to hire a menu builder or pay for some software, so i borrowed the code for this from another site.

    thank you.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    27,641
    Thanks
    42
    Thanked 2,897 Times in 2,869 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by rohis
    1: When you mouse over the menu for the first time, a thing pops up that sais 'trial version' I want to remove whatever is causing that from the code.
    Get a freeware, creditware or PD menu, there are so many, none of them have this type of junk. Removing it without paying for the script is illegal, a violation of copyright and perhaps against the rules of this forum.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Nov 2005
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    sorry, I was unaware.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    27,641
    Thanks
    42
    Thanked 2,897 Times in 2,869 Posts
    Blog Entries
    12

  5. #5
    Join Date
    Nov 2005
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I think what we are going to do is purchase this menu bar if I can make it work right.

    Can anyone tell me how to target specific links on the JS menu to open in an iframe?

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    27,641
    Thanks
    42
    Thanked 2,897 Times in 2,869 Posts
    Blog Entries
    12

    Default

    One would hope that there are some instructions for this menu but, it looks like here:

    Code:
    var menuItems = [
       ["Pathfinders","http://www.apycom.com","","","",,,],
    ["|Language Arts","http://dhtml-menu.com","","","",,,],
    ["|Poetry","http://dhtml-menu.com","","","",,,],
    ["|Science","http://dhtml-menu.com","","","",,,],
    ["|Math","http://dhtml-menu.com","","","",,,],
    ["|History","http://dhtml-menu.com","","","",,,],
    ["|Health","http://dhtml-menu.com","","","",,,],
    ["|World Language","http://dhtml-menu.com","","","",,,],
    ["|Vietnam","http://dhtml-menu.com","","","",,,],
    ["|Buisines ED","http://dhtml-menu.com","","","",,,],
    ["|Family Consumer Science","http://dhtml-menu.com","","","",,,],
    and similar in the newdata1.js file that one can use the javascript: convention to run code instead of simply supplying an address. This is a common feature of these types of menus, usually. It also looks like a target may be able to be specified in one of the empty "" sections, which empty "" section that is, I can't say for sure. I'd start with the first and try them all just to see. Again, instructions for this menu would make these things clearer. Here is what I would try:

    Code:
    var menuItems = [
       ["Pathfinders","http://www.apycom.com","","","",,,],
    ["|Language Arts","javascript:window.open('http://dhtml-menu.com')","","","",,,],
    ["|Poetry","javascript:parent.frameName.location.href='http://dhtml-menu.com'","","","",,,],
    ["|Science","http://dhtml-menu.com","_blank","","",,,],
    ["|Math","http://dhtml-menu.com","frameName","","",,,],
    ["|History","http://dhtml-menu.com","","","",,,],
    ["|Health","http://dhtml-menu.com","","","",,,],
    ["|World Language","http://dhtml-menu.com","","","",,,],
    ["|Vietnam","http://dhtml-menu.com","","","",,,],
    ["|Buisines ED","http://dhtml-menu.com","","","",,,],
    ["|Family Consumer Science","http://dhtml-menu.com","","","",,,],
    and then just see what happens when those links are clicked. Where I have 'frameName' use an assigned name of a frame or iframe. If it is an iframe, the 'parent' bit can be skipped. Also 'window.parent' may be required in place of just 'parent' or 'document.frameName' in the case of an iframe.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Nov 2005
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks, it was this one that worked
    "javascriptarent.frameName.location.href='http://dhtml-menu.com'"

    any idea on how to make the h spacing between the 5 main groups wider?

  8. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    27,641
    Thanks
    42
    Thanked 2,897 Times in 2,869 Posts
    Blog Entries
    12

    Default

    I'd try adjusting this variable in the newdata1.js file:

    Code:
    var itemBorderWidth=1;
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  9. #9
    Join Date
    Nov 2005
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Adjusting the border width vertically elongates it too wich I want to avoid and there is a thin red border higlight that I have that gets to thick when I adjust the border width.

    Theres no tag to adjust the Hspace of the parent items in the menu?


    There are instructions for this menu, but they are weak and don't have information on doing this.

  10. #10
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    27,641
    Thanks
    42
    Thanked 2,897 Times in 2,869 Posts
    Blog Entries
    12

    Default

    I'd also play with these:

    Code:
    var itemSpacing=0;
    var itemPadding=0;
    However, both of those may add to the vertical height as well. This entry in the configuration looks interesting:

    Code:
    var itemStyles = [
       ["fontStyle=bold 7pt Verdana",],
       ["itemBackColor=red,red","itemBorderColor=red,red",],
    ];
    Unfortunately, 'itemBackColor' and 'itemBorderColor' are not valid css or valid standard javascript css notation, 'fontStyle' is valid for javascript css but is here used in an invalid manner, suggesting that it has been co-opted by the script for its own purposes. Once again, the documentation might help, could I have a look at it?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •