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)'>" +
"   " + UserActions[actionCode] + "
 </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
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)'>" +
"   " + UserActions[actionCode] + "
 </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