Results 1 to 10 of 10

Thread: HV Menu v5.411 help

  1. #1
    Join Date
    Aug 2006
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default HV Menu v5.411 help

    1) Script Title: HV Menu v5.411

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...menu/index.htm

    3) Describe problem: Currently im using this to open up links from this menu in a new window,
    Menu2_1_2_11=new Array("SonyEricsson W660i","javascript:window.open('sony-ericsson-w660i.html','frame_name')","",0,20,150);

    This works great but what i need to do is to be able to remove everything but the scroll bar from the pop up window, is this possible?

  2. #2
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    Put something like this:

    Menu2_1_2_11=new Array("<a style='position:absolute;width:100%' onclick=\"window.open('sony-ericsson-w660i.html','frame_name','width=500, height=200, toolbar=no, menubar=no, directories=no, location=no, left=200, top=10, resizable=yes, status=no, scrollbars=yes')\">SonyEricsson W660i</a>","","",0,20,150);

    This is a slight 'mutilation' of the HV-script, but it's a necessary one, since the script itself doesn't seem to provide means to manipulate the form of new windows. Put no for resizable if that's what you want.

    Arie Molendijk
    Last edited by molendijk; 03-09-2008 at 12:24 AM. Reason: Correction

  3. #3
    Join Date
    Aug 2006
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by molendijk View Post
    Put something like this:

    Menu2_1_2_11=new Array("<a style='position:absolute;width:100%' onclick=\"window.open('sony-ericsson-w660i.html','frame_name','width=500, height=200, toolbar=no, menubar=no, directories=no, location=no, left=200, top=10, resizable=yes, status=no, scrollbars=yes')\">SonyEricsson W660i</a>","","",0,20,150);

    This is a slight 'mutilation' of the HV-script, but it's a necessary one, since the script itself doesn't seem to provide means to manipulate the form of new windows. Put no for resizable if that's what you want.

    Arie Molendijk

    Hi Thanks for your help

    What you gave me does work but with 1 unusual side effect.

    Menu2_1_2_11=new Array("<a style='position:absolute;width:100%' onclick=\"window.open('sony-ericsson-w660i.html','frame_name','width=500, height=200, toolbar=no, menubar=no, directories=no, location=no, left=200, top=10, resizable=yes, status=no, scrollbars=yes')\">SonyEricsson W660i</a>","","",0,20,150);

    The menu item text which i have highlighted in red is pushed nearly completly out of view only the Son of the SonyEricsson is visible.

    Do you have any suggestions for solving this?

    Thanks again for your assistance

  4. #4
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    That might have to do with style='position:absolute;width:100%', which I added to ensure that clicking on the link next to the text would work. Do you have a link to your site?

    (Going to take a quick sleep now; it's almost 2 o'clock (night time) in Holland at this moment).

    Arie.

  5. #5
    Join Date
    Aug 2006
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi

    Heres a the link, obviously though i havent added the new bit of code to the hv menu yet.


    www.dream4mobiles.co.uk/nokia-6500-classic.html

  6. #6
    Join Date
    Aug 2006
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi

    Ive solved it by removing the 'position:absolute;width:100%.

    Thanks again for your help.

  7. #7
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    Dazza,
    I found a more natural way to do it. In your js-file, there is a section where you can put functions. It begins with function BeforeStart. You can add functions there. In your case, I would add:
    function SonyBla(URL,Frame){window.open(URL,Frame, 'width=500, height=500, toolbar=no, menubar=no, directories=no, location=no, left=200, top=10, resizable=yes, status=no, scrollbars=yes')}

    Then replace your item with:
    Menu2_1_2_11=new Array("SonyEricsson W660i", "javascript: SonyBla('sony-ericsson-w660i.html', 'frame_name')","",0,20,150);

    Of course, you can replace 'SonyBla' with whatever you like (in the function AND in the item).

    Arie.
    Last edited by molendijk; 03-09-2008 at 12:14 PM. Reason: Correction

  8. #8
    Join Date
    Aug 2006
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    What benefit is there in changing to the new method?

  9. #9
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    The benefit is that you can do more easily all kind of scripting in the HV-menu (not just open a new window). But if you just want to open links in a new window, you can use the earlier method.
    Arie

  10. #10
    Join Date
    Aug 2006
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ill use the js method then, thanks again!

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
  •