[mapguide-users] Problem running own widget in Fusion.
Olcay Ebcin (Coğrafi Bilgi Sistemleri Şube Müdürü)
OEBCIN at iski.gov.tr
Mon Aug 1 15:56:18 EDT 2011
Hi,
in the window.onload() function of index.html, I created a floating Jx.Dialog object, as in the following:
dshowInfo = new Jx.Dialog({
id: 'dialogShowInfo',
label: OpenLayers.i18n('Selection Information'),
modal: false,
resize: true,
horizontal: '50 left',
vertical: '85 top',
width: 400,
height: 400,
contentId: 'showInfo'
});
I've added <div id=" showInfo"></div> into in index.html as well.
var showInfo = function()
{
var currentPos = parseInt(d showInfo.domObj.style.left);
if (currentPos < 0) dshowInfo.domObj.style.left = '30px';
dshowInfo.open();
}
This ContentID corresponds to the class name of the widget as defined in the JavaScript file. showInfo.js contains the following class definition:
Fusion.Widget.showInfo = OpenLayers.Class(Fusion.Widget,
{
// ...
}
);
After all, I created InvokeScript running showInfo(); in MapGuide Studio. I've added this invokeScript into Primary Toolbar menu.
When I click on invokeScript button in Primary Toolbar menu,
- showInfo script is executed
- dShowInfo dialog box opening without running showInfo.js file. Since contentId refers to showInfo, I would expect showInfo.js file working.
All above configurations belong to Example3 of flexible WebLayout sample. If I use Example1, Example2, Example3, Example4 as contentId, all works fine.
The thing I am trying to do is, run my own javascript file like showInfo.js
Can anybody tell me how can I do that?
Regards,
Olcay Ebcin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20110801/1cd027c5/attachment.html
More information about the mapguide-users
mailing list