Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:30
Opening application in new window through menu link.
Poster: scargin
Dated: Friday April 30 2004 - 9:05:46 BST
I am not quite sure what is the best method for opening an external application through a link.
The application is usually opened by a link and javascript include file:
<script language="JavaScript" type="text/JavaScript" src="http://d8199.i44.quadrahosting.com.au/FAQ/afm.asp"></script><a href="#" onclick="javascript:xlaAFMlaunch();">FAQ</a>
I have tried to use the ClickFunction property but I am not quite sure how to format it.
I have added <script language="JavaScript" type="text/JavaScript" src="http://d8199.i44.quadrahosting.com.au/FAQ/afm.asp"></script> below the body tag and made the following changes to the main menu:
<script>
with(milonic=new menuname("Main Menu")){
style=MainmenuStyle;
alwaysvisible=1;
orientation="horizontal";
position="relative";
itemwidth="100%";
aI("image=Images/misc/Menu_dot.gif;overimage=Images/misc/Menu_dot_over.gif;text=home;url=default.asp;status=Back To Home Page;");
aI("image=Images/misc/Menu_dot.gif;overimage=Images/misc/Menu_dot_over.gif;text=about us;showmenu=about;");
aI("image=Images/misc/Menu_dot.gif;overimage=Images/misc/Menu_dot_over.gif;text=news & events;showmenu=news;");
aI("image=Images/misc/Menu_dot.gif;overimage=Images/misc/Menu_dot_over.gif;text=products;showmenu=products;");
aI("image=Images/misc/Menu_dot.gif;overimage=Images/misc/Menu_dot_over.gif;text=services;showmenu=services;");
aI("image=Images/misc/Menu_dot.gif;overimage=Images/misc/Menu_dot_over.gif;text=faq;clickfunction=yourfunction('javascript:xlaAFMlaunch();');status=FAQ;");
aI("image=Images/misc/Menu_dot.gif;overimage=Images/misc/Menu_dot_over.gif;text=links;url=links.asp;status=links;");
aI("image=Images/misc/Menu_dot.gif;overimage=Images/misc/Menu_dot_over.gif;text=contact us;url=content/anmviewer.asp?a=11&z=2;status=contact us;");
}
drawMenus();
</script>
My Javascript knowledge is a quite limited and I am not sure what I am doing wrong.
To see what I am hoping to do click the "Browse FAQ" link on the home page:
http://d8199.i44.quadrahosting.com.au/
Thanks in advance,
Stuart
Poster: Maz
Dated: Friday April 30 2004 - 14:59:56 BST
image and overimage can go once in your global style 'MainmenuStyle' if they are all the same.
image="/Images/misc/Menu_dot.gif";
overimage="/Images/misc/Menu_dot_over.gif";
Code:
with(milonic=new menuname("Main Menu")){
style=MainmenuStyle;
alwaysvisible=1;
orientation="horizontal";
position="relative";
itemwidth="100%";
aI("text=about us;showmenu=about;");
aI("text=news & events;showmenu=news;");
aI("text=products;showmenu=products;");
aI("text=services;showmenu=services;");
aI("text=faq;status=FAQ;");
aI("text=links;url=links.asp;status=links;");
aI("text=contact us;url=/content/anmviewer.asp?a=11&z=2;status=contact us;");
}
style=MainmenuStyle;
alwaysvisible=1;
orientation="horizontal";
position="relative";
itemwidth="100%";
aI("text=about us;showmenu=about;");
aI("text=news & events;showmenu=news;");
aI("text=products;showmenu=products;");
aI("text=services;showmenu=services;");
aI("text=faq;status=FAQ;");
aI("text=links;url=links.asp;status=links;");
aI("text=contact us;url=/content/anmviewer.asp?a=11&z=2;status=contact us;");
}
I took this out of faq because its wrong:
clickfunction=yourfunction('javascript:xlaAFMlaunch();');
But I don't know what it should be.
maz
Poster: kevin3442
Dated: Friday April 30 2004 - 21:14:44 BST
Hi Stuart,
Try like this:
Code:
aI("text=faq;url=javascript:xlaAFMlaunch();status=FAQ;");
Or like this:
Code:
aI("text=faq;clickfunction=xlaAFMlaunch();status=FAQ;");
Either should work. (Note, I removed the image settings in these examples, to save space and also because, as Maz pointed out, they could be moved into the style since they're the same for each menu item)
Hope that helps,
Kevin
Poster: scargin
Dated: Tuesday May 4 2004 - 9:54:38 BST
Sorry about the delay in getting back to you. The forum was not accepting my username and password a few days ago. I generated a new password and it still was not working. Everything appears back to normal now.
Anyway your suggestion worked perfectly.
Thanks again for all your help,
Stuart