C
cui
Hello
I try in javascript to modify the context menu of a spreadsheet. I use the
OWC10.
For this, it is an example of my code. In the HTML page:
<style>.Heading { font-family:Arial;font-size:14pt;}
<!--.extendSpreadSheet {behavior:url(ExtendSpreadSheet.htc);}
-->
</style>
....
<object class="extendSpreadSheet" classid="....">
In the javascript file (extendSpreadSheet.htc)
<public:component>
function init() {
esp = new ExtSpreadSheet() ;
}
function ExtSpreadSheet() {
if (element != null) { sp = element ; }
this.UserInterface = new ExtSpreadSheetUI(sp, this) ;
}
function ExtSpreadSheetUI(espIn, espObjIN) {
espIn.attachEvent("DblClick", espDoubleClick) ;
espIn.attachEvent("BeforeContextMenu", espBeforeContextMenu) ;
function espDoubleClick() { alert("dbl click ok") ; }
function espBeforeContextMenu(x,y, Menu, Cancel) {
alert("espBeforeContextMenu ok") ; }
}
Then, the doubleclick function runs correctly when I dbl click on a cell.
But, the espBeforeContextMenu function doesn't run with the right click. I
have always the default context menu. Moreover, with the pivottable
compounent, the beforecontextmenu handler is retrieved like this (shown in a
Microsoft example about the drillthrought function).
My question: the beforecontextmenu handler runs with the Spreadsheet
compounent, and how? How can I get the context menu? Do I make a mistake ?
Do I forget something ?
Thanks for your help !
Cui
I try in javascript to modify the context menu of a spreadsheet. I use the
OWC10.
For this, it is an example of my code. In the HTML page:
<style>.Heading { font-family:Arial;font-size:14pt;}
<!--.extendSpreadSheet {behavior:url(ExtendSpreadSheet.htc);}
-->
</style>
....
<object class="extendSpreadSheet" classid="....">
In the javascript file (extendSpreadSheet.htc)
<public:component>
function init() {
esp = new ExtSpreadSheet() ;
}
function ExtSpreadSheet() {
if (element != null) { sp = element ; }
this.UserInterface = new ExtSpreadSheetUI(sp, this) ;
}
function ExtSpreadSheetUI(espIn, espObjIN) {
espIn.attachEvent("DblClick", espDoubleClick) ;
espIn.attachEvent("BeforeContextMenu", espBeforeContextMenu) ;
function espDoubleClick() { alert("dbl click ok") ; }
function espBeforeContextMenu(x,y, Menu, Cancel) {
alert("espBeforeContextMenu ok") ; }
}
Then, the doubleclick function runs correctly when I dbl click on a cell.
But, the espBeforeContextMenu function doesn't run with the right click. I
have always the default context menu. Moreover, with the pivottable
compounent, the beforecontextmenu handler is retrieved like this (shown in a
Microsoft example about the drillthrought function).
My question: the beforecontextmenu handler runs with the Spreadsheet
compounent, and how? How can I get the context menu? Do I make a mistake ?
Do I forget something ?
Thanks for your help !
Cui