» Forums
» DynarchMenu forum
» Support
» Display popup then redirect
Display popup then redirect
2005/11/18 13:40
Viewed 3455 times
Replies: 1/2

Hello,

I would like some of my menu options to display a popup before actually redirecting to the next page.

I have tried :

<li>
<a href="Mypage.asp" onClick="MM_popupMsg('test text')" >Some Option</a>
</li>

But this doesn't work.

Also, I would like to be able to diaplay a hidden layer called "hiddenlayer" and redirect the user. This is becaue the redirect page performs a large sql calculation before directing onto a page that the user sees and at the moment it looks like nothing is happening, so a nice "please wait" layer would look good.

I hope you unserdtand my two problems and can help me with this excellent product...

Regards,

Mark Handford
CEO, cooltxt.com

Re: Display popup then redirect
2005/11/18 13:48
Viewed 5054 times
Replies: 1/1

Well, both problems can be solved by using a JS action rather than combining the two.  Indeed, we don't support the "onclick" argument on the links inside a menu item—that's because the whole link gets replaced with some complicated DOM elements that make up the menu item.

Anyway, here's a possible solution to your problem:

<li>
<a href="javascript:goToSlowAddress('Mypage.asp')">Some Option</a>
</li>

and include this script somewhere in your JavaScript files:

function goToSlowAddress(url) {
// here you can popup whatever you want:
MM_popupMsg('test text');

// and now redirect:
window.location = url;
}

Hope this helps.

last
does the function exist to display menu manually?
2005/12/23 14:14
Viewed 5882 times
Replies: 0/0

Hi, your forum is very tricky ;). I failed to find an option to create new post so I'm writing reply to this message. I need a function to display menus at any time. I've tried to find it in hmenu.js but it seems that have no such function. Please show me the way to do it. Thanks in advance.

last
Google