WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 WebFXMenuItem How to point to an Iframe, Brendan Peng, January 26, 2004
     Re:WebFXMenuItem How to point to an Iframe, Michael, January 26, 2004
         Re:WebFXMenuItem How to point to an Iframe, Brendan Peng, January 27, 2004

Subject: Re:WebFXMenuItem How to point to an Iframe From: Brendan Peng Date: January 27, 2004

Thanks for that.

That is you had to create a local variable called item, give its href and then add a target attribute to it and then write the object.  A bit more code than I expected but it does the job and I'm happy.
eg.

var myBar = new WebFXMenuBar;
var item = new WebFXMenuButton("Home", "main.html",null);
item.target = "Main";
myBar.add(item)

// Main is the name of my iframe and it works.

I'm sorry I can't help you on that mouseover problem though, I'm still new to this.

From: Michael
Sent: January 27, 2004
Subject: Re:WebFXMenuItem How to point to an Iframe

Im not sure how iFrames work, but this may help you work it out.

By the way, Im having issues with the menu myself. When I mouseover items they expand, but when I take the mouse away from the menu the menu remains expanded on the last option i was on.

// Creates a menu called myMenub
var myMenub = new WebFXMenuItem;

// Creates a WebFXMenuItem called Cars that links to cars.html
var item = new WebFXMenuItem("Cars", "cars.html", "Cars"); 

// Tells the item to open up in the target '_blank' (A new page).
item.target = "_blank";

// Adds the item to myMenub
myMenub.add(item);

 

From: Brendan Peng
Sent: January 27, 2004
Subject: Re:WebFXMenuItem How to point to an Iframe

I understand the constructor on a basic level
how to add a WebFXMenuItem(sText, sHref, sToolTip, oSubMenu)

var myMenub = new WebFXMenu;
myMenub.add(new WebFXMenuItem("Cars", "cars.html","Cars"));

But how do I add the properties to it

That is I want this link (html page) to open in a iFrame called 'Main' but I don't know how to apply the 'target' property because there are no examples.






Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX