Event not processed with FIREFOX but OK with MSIE . What am I doing wrong ?

P

pamelafluente

Hi

I created a menu dynamically. The menu is created with code which goes
like this:


menuItemContainer.innerHTML += "<div id=" + actionCodes
+
" class=menuItemStyle" +
" onmouseover='mOverMenuItem(this)'
onmouseout='mMouseout(this)' onclick='mClick(this)'>" +
" &nbsp " + UserActions[actionCode] + "
&nbsp</div>"


where the handler mClick is simply a function which submit some data to
an aspx page:


var hiddenFieldID = "actionCodes";
var separerToken = "," ;

function mClick(menuItem) {

var DivInstanceID = document.getElementById("InstanceID");
if ( DivInstanceID != null ) {
InstanceID = DivInstanceID.getAttribute("InstanceID");
}

var hiddenField = document.getElementById(hiddenFieldID);
hiddenField.value = menuItem.id + separerToken + currentCell.id +
separerToken + InstanceID;
document.form1.submit();
}


My problem is that this works fine with MSIE. But does not work with
FF.
That is, when I click on the menuitem, nothing happens. No form submit.

What I am doing wrong ? [if you need more details to help me, just
ask. I can provide the full code.]

Thank you very much

-Pam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top