Loading Menus from Ajax Webservice after page has loaded

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
jnigtin
Advanced
Advanced
Posts: 18
Joined: Wed Nov 29, 2006 3:55 pm

Loading Menus from Ajax Webservice after page has loaded

Post by jnigtin »

Hi,

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.
jnigtin
Advanced
Advanced
Posts: 18
Joined: Wed Nov 29, 2006 3:55 pm

Post by jnigtin »

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?
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Hi,

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.

Cheers,
Andy
jnigtin
Advanced
Advanced
Posts: 18
Joined: Wed Nov 29, 2006 3:55 pm

Post by jnigtin »

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.
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Hi,

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.

Cheers,
Andy
bdumes
Beginner
Beginner
Posts: 2
Joined: Thu Feb 22, 2007 6:23 pm

Post by bdumes »

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