Linking to a page outside of my site

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
ldeeder
Super Advanced
Super Advanced
Posts: 30
Joined: Fri Mar 10, 2006 2:06 am

Linking to a page outside of my site

Post by ldeeder »

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
Migru
Milonic Guru
Milonic Guru
Posts: 669
Joined: Tue Nov 01, 2005 8:22 pm
Location: Hamburg - Germany
Contact:

Post by Migru »

Hi

try

Code: Select all

aI("text=Network Services;url=/services_network_services.html;target=_blank;"); 

hope this helps

Michael
ldeeder
Super Advanced
Super Advanced
Posts: 30
Joined: Fri Mar 10, 2006 2:06 am

WOW, that was fast. Thanks, but...

Post by ldeeder »

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.
Migru
Milonic Guru
Milonic Guru
Posts: 669
Joined: Tue Nov 01, 2005 8:22 pm
Location: Hamburg - Germany
Contact:

Post by Migru »

Hi

pls see the sample page

http://milonic.com/menusample11.php

comments, see the source etc.

hope this helps.

Michael
les35
Advanced
Advanced
Posts: 12
Joined: Mon Feb 20, 2006 6:46 pm

Re: WOW, that was fast. Thanks, but...

Post by les35 »

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.
just put the javascript after the "url=" part of the aI()

So the that link would be:

Code: Select all

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');");
VictorKush
Beginner
Beginner
Posts: 3
Joined: Tue Mar 28, 2006 1:46 am
Contact:

New Open Window

Post by VictorKush »

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
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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: Select all

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'); 

} 
Then in whatever menu, in the aI string it would be

Code: Select all

aI("text=item;url=javascript:newwindow('http://whatever/');");
Ruth
Post Reply