PDA

View Full Version : anylink vertical menu



adbj1145
03-18-2007, 03:25 PM
1) Script Title: anylinkvertical

2) Script URL (on DD):http://www.dynamicdrive.com/dynamicindex1/anylinkvertical.htm

3) Describe problem:
No Problems, works just great ,but I was looking at your forum at-http://www.dynamicdrive.com/forums/archive/index.php/t-13728.html
and I would like to apply to -anylinkverticalmenu- the same feature to open
in a -POP UP WINDOW- the FREE JAVA SCRIPT link in Menu 2 of ANYLINKVERTICALMENU.
Is it possible? Thanks

ddadmin
03-19-2007, 02:25 AM
The easiest way to get a link within the drop down menu to open in a customized pop up is to use the onClick event handler inside the menu item's <a> element. So instead of say:


menu1[0]='<a href="http://www.javascriptkit.com">JavaScript Kit</a>'

Change that to:


menu1[0]='<a href="#" onClick=\'window.open("http://www.javascriptkit.com", "", "width=700px,height=800px,scrollbars,resizable"); return false\' >JavaScript Kit</a>'

Be careful when nesting apostrophes- any slight misstep will cause a JS error. You can find a list of window attributes to use to customize the window (ie: scrollbars) at the bottom of this page: http://www.javascriptkit.com/jsref/window.shtml

adbj1145
03-19-2007, 01:02 PM
Thanks for your reply, I tried it but doesn't work, I got a new idea using your Ajax Widgets at-http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/index.htm
Window 3 (Ajax content)
It would do the same even better, one only problem works with HTML pages, not with PHP pages, mine is a PHP. I remember there is an issue with server side loading on Ajax , do you know the fix? Thanks again

ddadmin
03-19-2007, 10:47 PM
Regarding the code I posted, I had tested it out, and it does work. Can you tell me what error you got when using it?

I've attached a working example below (demo.txt).

adbj1145
03-20-2007, 11:27 AM
I deleted that code trying to get the Ajax going. In anyway I got it back on just to try it but it seems is not working. I posted it on a temp site for you to take a look at it.
www.temp.myhighstreet360.co.uk
since I have a php page, I have replaced that part of code, the rest is copy and paste from your TXT demo.
I believe that the AJAX is still a better choice because doesn't have the detrimental effect of pop ups to disappear if the user clicks somewhere else on the page and also looks cleaner.
Appreciate your help.

adbj1145
03-21-2007, 01:55 PM
Please disregard my posting, I got it solved with AJAX Widgets. It works fine with PHP
Thanks for your help.