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:11
Linking to a page outside of my site
Poster: ldeeder
Dated: Saturday March 11 2006 - 0:31:04 GMT
On my menu I want to be able to launch a page in its' own window. Like the function target_new. Not sure how to do it in the following code in my menu.
aI("text=Network Services;url=/services_network_services.html;");
TIA Larry
Poster: Migru
Dated: Saturday March 11 2006 - 1:04:37 GMT
Hi
try
Code:
aI("text=Network Services;url=/services_network_services.html;target=_blank;");
hope this helps
Michael
WOW, that was fast. Thanks, but...
Poster: ldeeder
Dated: Saturday March 11 2006 - 1:12:15 GMT
What if I wanted to launch a link in its' own window like below:
<a href="javascript: window.open('/myip.asp','','status=no, toolbar=no, resizable=yes, scrollbars=yes, location=no, width=700, height=300'); void('');" class="5">Your IP Address is...</a>
Thanks again.
Poster: Migru
Dated: Saturday March 11 2006 - 1:17:27 GMT
Hi
pls see the sample page
http://www.milonic.com/menusample11.php
comments, see the source etc.
hope this helps.
Michael
Re: WOW, that was fast. Thanks, but...
Poster: les35
Dated: Saturday March 11 2006 - 16:55:45 GMT
ldeeder wrote:
What if I wanted to launch a link in its' own window like below:
<a href="javascript: window.open('/myip.asp','','status=no, toolbar=no, resizable=yes, scrollbars=yes, location=no, width=700, height=300'); void('');" class="5">Your IP Address is...</a>
Thanks again.
<a href="javascript: window.open('/myip.asp','','status=no, toolbar=no, resizable=yes, scrollbars=yes, location=no, width=700, height=300'); void('');" class="5">Your IP Address is...</a>
Thanks again.
just put the javascript after the "url=" part of the aI()
So the that link would be:
Code:
aI("text=Your IP Address is...;url=javascript:window.open('/myip.asp','','status=no, toolbar=no, resizable=yes, scrollbars=yes, location=no, width=700, height=300');");
New Open Window
Poster: VictorKush
Dated: Tuesday March 28 2006 - 23:07:08 BST
When I use that javascript code to open a new window as described above, a strange situation occurs. The new window opens properly, however, the original page goes blank and the text: [object] shows up. In FireFox, it is [object Window].
Is there a setting that should be entered to prevent the original page in the original window from changing?
Thanks,
Victor
Poster: Ruth
Dated: Wednesday March 29 2006 - 2:27:05 BST
Hi,
Why don't you try putting the function at the top of the menu data file, and then just call it in the aI string. I think it would be something like this.
Code:
fixMozillaZIndex=true; //Fixes Z-Index problem with Mozilla browsers but causes odd scrolling problem, toggle to see if it helps
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=2;
_subOffsetLeft=-2;
var newwindow;
function poptastic(url)
{
newwindow=window.open(url,'name','height=300,width=700,left=100,
top=100,resizable=yes,scrollbars=yes,toolbar=no,location=no,status=no');
}
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=2;
_subOffsetLeft=-2;
var newwindow;
function poptastic(url)
{
newwindow=window.open(url,'name','height=300,width=700,left=100,
top=100,resizable=yes,scrollbars=yes,toolbar=no,location=no,status=no');
}
Then in whatever menu, in the aI string it would be
Code:
aI("text=item;url=javascript:newwindow('http://whatever/');");
Ruth