Results 1 to 10 of 11

Hybrid View

  1. #1
    Senior Member
    Join Date
    Jul 2009
    Location
    not
    Posts
    41
    i upgraded my libraries.
    the 2 last message don't appear anymore, but still the first one pops up every 2 or 5 seconds, that is:
    4: 13:2: 54,42 ER The createEngine() method should be called in the BODY part of ihe page, not in the HEAD createEngine
    i've put this code in different places (in the head, in the onload() function, in body,..), but the message still the same :
    var pushPage = new PushPage();
    pushPage.context.setDebugAlertsOnClientError(true) ;
    pushPage.context.setDomain("mydodo.tn");
    pushPage.onEngineCreation = function(lsEngine) {
    lsEngine.context.setDebugAlertsOnClientError(true) ;
    lsEngine.connection.setLSHost("push.mydodo.tn");
    lsEngine.connection.setLSPort(8081);
    lsEngine.connection.setAdapterName("STOCKLISTDEMO" );
    lsEngine.changeStatus("STREAMING");
    };
    pushPage.bind();
    pushPage.createEngine("StockListEngine", "../flux/ls/", "SHARE_SESSION", true);
    this still works on firefox and ie, not chrome nor safari.

  2. #2
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    do you see any exception in the browser's error console?

    is it possible for you to show me the entire html of your page? (the simpler, the page that shows the issue is, the better)

    note that even if the message is shown, the library should be able to work anyway on both Safari and Chrome; does the library not work after the message or is the alert your only concern?

  3. #3
    Senior Member
    Join Date
    Jul 2009
    Location
    not
    Posts
    41
    i see this error in chrome:
    TypeError: Cannot read property 'nodeType' of null
    the sources are attached to this message, also the generated html (because i'm using jsf + richfaces + facelets).

    the problem is that message appears every x seconds, and the data won't show up. this only works on ie and firefox.
    Attached Files Attached Files

  4. #4
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    hi,

    I had to modify the code a little bit as it has some dependencies I don't have.

    btw I see that you're calling the test method inside the onchange event of your <select>, this means that each time you change the selection, the test method is called and a new PushPage is created; this is not correct, you should create only one PushPage per document, so you should move the following code outside the onchange event and put it in a "static" <script> on the page (just before the blabla.js script inclusion should be good):



    the rest of the function, that creates and subscribes the table, can remain in the onchange event.

    Another strange thing is that you have lspushpage.js and lscommons.js in two different folders; you should keep all the library files together to avoid confusion.


    That said I still don't get how are you getting that repeated alert on your application.
    Please move the code as shown and then, if the alert persist, execute this code (after at least one alert is shown) and let me know the result:





    As a final note I suggest you to check out the Lightstreamer/DOCS-SDKs/sdk_client_web/doc/Web Client Dev.pdf file

    HTH

  5. #5
    Senior Member
    Join Date
    Jul 2009
    Location
    not
    Posts
    41
    i changed the code that i gave, that's why it seemed a little wrong.
    i gave you the original unchanged new code.
    i moved the code as you said, but this still don't work for me ( but again, work in firefox and ie)

    and where should i put this code ?
    alert(document.getElementsByTagName("BODY")[0]);
    Attached Files Attached Files

  6. #6
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    you can bind that to something clickable and click it after the first alert, or you may add javascript: in front of it and use it as a bookmarklet.

    also check out if there are any errors in the javascript console

    also check out the list of downloaded files, is the lsengine.html file downloaded?

  7. #7
    Senior Member
    Join Date
    Jul 2009
    Location
    not
    Posts
    41
    there's no javascript error in both ie, firefox and chrome.
    for the downloaded files, i don't find lsengine in chrome, but i find it in firefox.

    i did put that code in the end of the page, in firefox it says
    [object HTMLBodyElement]
    but in chrome it's :
    undefined
    Attached Files Attached Files

 

 

Similar Threads

  1. createEngine should be in the BODY ??
    By mohamida in forum Client SDKs
    Replies: 10
    Last Post: August 18th, 2010, 12:50 PM
  2. Error: createEngine() has already been called
    By vaduganathan in forum Client SDKs
    Replies: 3
    Last Post: April 9th, 2010, 08:58 AM
  3. createEngine problem on ASP.NET application
    By gmotodd in forum Client SDKs
    Replies: 8
    Last Post: May 4th, 2009, 12:51 PM
  4. Difference between createEngine and seekEngine
    By webfg in forum Client SDKs
    Replies: 2
    Last Post: April 13th, 2009, 11:07 AM
  5. CreateEngine - path - issues in chrome
    By rd2008 in forum Client SDKs
    Replies: 6
    Last Post: October 10th, 2008, 11:09 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 04:23 PM.