rewrite menu in parent frame

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
dgrafx
Beginner
Beginner
Posts: 3
Joined: Sat Mar 28, 2009 4:35 pm

rewrite menu in parent frame

Post by dgrafx »

Hi Guys,
I'm looking for help rewriting the menu (which is in parent frame) from an iframe.
1) I use the menu to show category structure (parent / child)
2) when on a category edit form and click update (the forms target is the iframe) I want to rewrite the menu so it shows the changes.
I don't need help with "rewriting" the menu - just "how to reload the menu" without reloading the page.

Thanks ...
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Re: rewrite menu in parent frame

Post by Andy »

Hi,

Reloading the menu without reloading the page is possible but can can be quite tricky. However, what I think what you need is the menu API found here: http://milonic.com/mm_menueditapi.js

It will allow you to add, edit and delete menus and menu items after the page has loaded and contains its own menu reloading utilities built-in so that you do not need to worry about it.

HTH,
Andy
dgrafx
Beginner
Beginner
Posts: 3
Joined: Sat Mar 28, 2009 4:35 pm

Re: rewrite menu in parent frame

Post by dgrafx »

Hi Andy,
Sorry - I didn't realize you had responded - I was expecting an email I guess if someone responded.
Anyway - thanks ...

I assume you refer to mm_reloadMenu() in the api - is that correct?
If so - I can't get it to work - any clues as to how to?
main menu name is TN5 so am doing parent.mm_reloadMenu("TN5");

any help is greatly appreciated
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Re: rewrite menu in parent frame

Post by Andy »

Hi,

Do you have anything that we can see? Something that you've already done perhaps that we can work on.

-- Andy
dgrafx
Beginner
Beginner
Posts: 3
Joined: Sat Mar 28, 2009 4:35 pm

Re: rewrite menu in parent frame

Post by dgrafx »

not really
It's in an admin only area.
Plus you wouldn't be able to see the forms action page as it's in a hidden iframe target.
But if you could post some example code I'm confident that I could make it work IF it's possible to do such a thing.
So since my menus name is "TN5" - what function would I call? - I've tried a few with no luck - and what syntax?
Thanks
Post Reply