WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 Bug in DHTML menu, Ali Akbar, July 17, 2004
     Re:Bug in DHTML menu, Erik Arvidsson, July 19, 2004

Subject: Re:Bug in DHTML menu From: Erik Arvidsson Date: July 19, 2004
You are using tmp1 instead of tmp2 when settting the mnemonic for the Alert item. Changing this prevents the bug from occuring. However, I recognize that this is a bug. It should not matter that you are trying to set a mnemonic to a char that is not available in the label.

Here is the fixed getTextHtml

MenuItem.prototype.getTextHtml = function () {
var s = this.text;
if ( !s || !this.mnemonic )
return s;

// replace character with <u> character </u>
// /^(((<([^>]&#124;MNEMONIC)+>)&#124;[^MNEMONIC])*)(MNEMONIC)/i
var re = new RegExp( "^(((<([^>]&#124;" + this.mnemonic + ")+>)&#124;[^<" +
this.mnemonic + "])*)(" + this.mnemonic + ")", "i" );
if ( re.test( s ) && RegExp.$5 != "" )
return RegExp.$1 + "<u>" + RegExp.$5 + "</u>" + RegExp.rightContext;
return s;



Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.

View All Messages
Back to WebFX