Board Logo

RE-Active menu by pressing a button(RELOAD)
thiagopt - 8/22/2007 at 02:18 PM

Hi, I have a question, is there a way for me to active my menu pressing a button?

In my case when I start the index.html I show for the user the default menu (and it's works), but I update the MENU_ITEMS and I need to reload the menu, I tried to put a button in the html and call menu again, but it reloads a new page and the menu don't appear. What could I do to reload the menu with those new data(Items) ?

Thanks a lot!
Thiago Pelikan


thiagopt - 8/22/2007 at 05:19 PM

Hi, I don't know if I was clear enough, so I will explain i little better.

In my HTML file when it's open, I call the default values for menu

new menu (MENU_ITEMS, MENU_TPL);

then I set the var MENU_ITEMS with a new value and I need to reload the menu, so I put a button and in this button I call menu or new menu I this time, the menu don't update it's values and shows me a new blank page!

What could I do? please! help me! :)

tks
Thiago Pelikan Teixeira


tigra - 8/22/2007 at 06:50 PM

Current version of menu will not update its hierarchy without the page reload. Menu writes its elements into the document using document.write(..) method at the page initialization time. After the document is loaded document.write(..) no longer works for that.


thiagopt - 8/22/2007 at 06:59 PM

So, there is no way to update the menu pressing a button?


tigra - 8/22/2007 at 09:22 PM

Not unless the script is specifically modified for that. For this all existing menu elements must be dynamically removed from the document and new elements must be dynamically created. This will require intermediate to advanced DHTML skills.


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/