PDA

View Full Version : HV Menu v5.411 help



Dazza30
03-08-2008, 05:32 PM
1) Script Title: HV Menu v5.411

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/hvmenu/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?

molendijk
03-09-2008, 12:08 AM
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

Dazza30
03-09-2008, 12:38 AM
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

molendijk
03-09-2008, 12:47 AM
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.

Dazza30
03-09-2008, 10:01 AM
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

Dazza30
03-09-2008, 10:34 AM
Hi

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

Thanks again for your help.

molendijk
03-09-2008, 12:08 PM
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.

Dazza30
03-09-2008, 01:11 PM
What benefit is there in changing to the new method?

molendijk
03-09-2008, 02:08 PM
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

Dazza30
03-09-2008, 05:04 PM
Ill use the js method then, thanks again!