Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:47

Loading Menus from Ajax Webservice after page has loaded

Poster: jnigtin
Dated: Wednesday November 29 2006 - 15:23:57 GMT


I am new to using the menu and am having trouble getting it to work exactly how I want.

My page loads a placeholder 'loading' image.
When the page loads, I use ASP.Net Ajax to issue a webservice call.
My webservice makes a request to an aspx page where I have my actual image and the top level menu text.
My webservice screen scrapes the page and returns the image and <script> tag top level menu.
My page handles the returned data and put the real image and menu into the appropriate table cell.

My problem is that if I leave 'drawMenus();' in the <script> tag it will not get exec after it is returned to the client. However if I exec 'drawMenus();' after the cell has been populated then the whole page is overwritten and becomes the div for the menu. I have also tried calling 'drawMenus()' before 'popup('Main Menu')' on my image and that overwrites the page too.

Is there a way to build all the menus on my page at the point in code when I am ready to buld them?

To throw an extra spanner in the works, I will need multiple buttons on my page which will flyout menus. Plus I need to Ajaxify the last level of the menus :D the menu is far too big to load all at once.

Poster: jnigtin
Dated: Wednesday November 29 2006 - 21:00:04 GMT

I got this part workign but cannot find out how to add a new submenu dynamically using ajax.

Has anyone got an example of adding a new submenu dynamically when you mouse over a menu?

Poster: Andy
Dated: Sunday January 14 2007 - 19:34:17 GMT


Might be an idea to hold out for the new Ajax menus coming soon. Hope to have something ready for next week.

What Server Side Scripting language do you have access to?

Also, if you've got any sample data that you'd like us to try and integrate that would also help us to be able to help you.


Poster: jnigtin
Dated: Monday January 15 2007 - 13:08:02 GMT

We use C# on the server here.

All of our data comes from databases and involves dynamically loading the last level. If we load everythign but the last level we have about 500 nodes. The last level contains between 7,000 and 15,000 nodes however the user is never likely to load more than a few hundred of those.

No out of th ebox solutions have worked for us in our current environment. We send a blank page with loading images back to the client. After the page renders we make a call to a webservice which then either directly returns data, or goes to screen scrape an aspx page and returns an HTML string. Normal ASP.Net AJAX controls do not work in this envritonment, nor does anything from most vendors.

I would suggest keeping it as generic as possible, or allow a way for us to access the javascript string that is needed, so we can 'eval' it after we pass it back as a string.

Poster: Andy
Dated: Tuesday January 16 2007 - 16:48:47 GMT


I have now perfected the AJAX menu but I need some data to test it.

If you can send over a copy of your menu data I should be able to integrate it into an AJAX style menu for you.


Poster: bdumes
Dated: Monday February 26 2007 - 18:29:24 GMT

It's been more than a month since that last post. Any word on Milonic with AJAX?