Start a new discussion

To start a new discussion please visit the discussions section of the GitHub home page of the project.

Discussions on GitHub

You can also search our old self-hosted forums for any useful information below but please note that posting new content here is not possible any more.

Re: Sending Menu selection to an Iframe

Home Forums Older releases 0.9.x Sending Menu selection to an Iframe Re: Sending Menu selection to an Iframe

#1505
admin
Keymaster

Hi, here is one way to do it:

1) Set an id e.g. “iframe2” to your second iframe where the links should be loaded.

2) Add the following JS in your first iframe where the menu is:

$(function() {
	$('#main-menu').bind('select.smapi', function(e, item) {
		var iframe2 = parent.document.getElementById('iframe2');
		if (iframe2) {
			iframe2.src = item.href;
		}
		return false;
	});
});

That’s all and it would affect all your menu links.