Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Including prototype and scriptaculous.js

    I am trying to include the above 2 js files in the pages that I use SmartClient (basically I am trying to use either LightBox or some other modal window and these downloads come with the 2 JS files). e.g. http://www.wildbit.com/labs/modalbox/
    However, as soon as I include these 2 files, I get Javascript errors in my page (using multiple SmartClient objects). These errors look like this:
    isa.isA.Class is not a function (ISC_Core.js Line 130)
    isc.Log has no properties (ISC_Core.js Line 126)
    isc.ImgTab.getPrototype is not a function (ISC_Containers.js Line 43)
    isc.A has no properties (ISC_Forms.js Line 43)
    ..... and so on.

    Has anyone encountered this?

    #2
    Resolved this issue. FYI on the solution

    For everyone's benefit, here is the solution (suggested by SmartClient).

    Just have
    window.isc_useSimpleNames = false

    BEFORE specifying ismorphicDir (http://www.smartclient.com/docs/5.7.1/a/b/c/go.html#class..isc)

    The problem was clashing of object names between prototype and Smart Client APIs.

    Comment


      #3
      Hi Ninad,

      When working with other JavaScript libraries you should put SmartClient in "portal mode" by setting "window.isc_useSimpleNames = false;" before SmartClient is loaded.

      If you're interested, in this case the problem is that the Prototype, Scriptaculous and other older javascript libraries do not follow the guidelines for Ajax interoperability put forward by the OpenAJAX Alliance (whose members include Isomorphic, Microsoft, Oracle, IBM and about 50 other companies).

      These libraries are very widespread and so unfortunately all OpenAJAX alliance members currently work around them. In particular, the next version of SmartClient will flag this error much more explicitly.

      Comment

      Working...
      X