Hi
I can't see this Exhibit.UI.calculatePopupPosition, function in
ui.js.
I am having a same problem display page in IE6 and IE7.
<script type="text/javascript">
var data = <%=session.getAttribute("jsonData")%>;
function populateData()
{
window.database = Exhibit.Database.create();
window.database.loadData(data);
window.exhibit = Exhibit.create();
window.exhibit.configureFromDOM();
}
</script>
It doen't seem to be reading data file in IE6 and IE7. It work fine in
FireFox.
Any help would be appreciate.
many thank
On Oct 21, 2:46 am, David Huynh <[email protected]> wrote:
> I'm guessing that there's a "trailing comma" problem in the lastest
> source. Particularly, in the ui.js file, this function
>
> Exhibit.UI.calculatePopupPosition = function(elmt) {
> var coords = SimileAjax.DOM.getPageCoordinates(elmt);
> return {
> x: coords.left + Math.round(elmt.offsetWidth / 2),
> y: coords.top + Math.round(elmt.offsetHeight / 2),
> };
>
> }
>
> contains a trailing comma after the line starting with y:. You could try
> to check out the source, remove that comma and see if it helps.
>
> David
>
> Chris wrote:
> > Hello David, Hello All,
>
> > Thank you for developing the Simile Widgets. They are simply awesome!
>
> > I've been using Exhibit with dynamic data and everything went smoothly
> > with both FF and Chrome. The same Exhibit runs fine with IE as well,
> > if loading the API
> > viahttp://static.simile.mit.edu/exhibit/api-2.0/exhibit-api.js.
>
> > Yet, I'm experiencing problems with IE when moving to the trunk
> > revision 'http://simile-widgets.googlecode.com/svn/exhibit/trunk/src/
> > webapp/api/exhibit-api.js'.
>
> > Any feedback from you in pointing me to what I'm overlooking - I'm
> > sure it's my fault - would be greatly appreciated.
> > Here it is what I do:
>
> > 1. Place my JSON encoded data into a variable: var data = {
> > types: {
> > "Label": {
> > pluralLabel: "Labels"
> > },
> > "Name": {
> > pluralLabel: "Names"
> > }
>
> > },
> > properties: {
> > ...
> > },
> > "items" : [ {
> > } ]
> > };
>
> > 2. Include the Exhibit API and set the autoCreate parameter to false:
> > <script src="http://simile-widgets.googlecode.com/svn/exhibit/trunk/
> > src/webapp/api/exhibit-api.js?autoCreate=false" type="text/
> > javascript"></script>
>
> > 3. Handle the documents ready event:
> > // or $(document).ready(function(){
> > SimileAjax.jQuery(document).ready(function() {
> > var fDone = function() {
> > window.exhibit = Exhibit.create();
> > window.exhibit.configureFromDOM();
> > };
>
> > try {
> > var s = Exhibit.getAttribute(document.body, "ondataload");
> > if (s != null && typeof s == "string" && s.length > 0) {
> > fDone = function() {
> > var f = eval(s);
> > if (typeof f == "function") {
> > f.call();
> > }
> > }
> > }
> > } catch (e) {
> > // silent
> > }
>
> > var fLoadSubmissions = function() {
> > window.database.loadSubmissionLinks(fDone);
> > };
>
> > window.database = Exhibit.Database.create();
> > window.database.loadData(data);
> > window.database.loadDataLinks(fLoadSubmissions);
> > });
>
> > When I try to load this Exhibit, IE says Exhibit.UI is null or not an
> > object. As far as I can tell, the UI object gets instantiated via the
> > loadMe function by including the scripts/ui/ui.js (or exhibit-
> > bundle.js, if the bundle parameter is set to false).
>
> > What I'm missing here?
>
> > Many thanks!
>
> > Cheers,
> >
Chri
s
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SIMILE Widgets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/simile-widgets?hl=en
-~----------~----~----~----~------~----~------~--~---