Results 1 to 10 of 11

Hybrid View

  1. #1
    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

  2. #2
    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

  3. #3
    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

  4. #4
    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?

  5. #5
    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

  6. #6
    Senior Member
    Join Date
    Jul 2009
    Location
    not
    Posts
    41
    i found the solution. it's a facelet's problem (i think) with chrome as said here.
    i must include this:
    <f:view contentType="text/html">
    ...
    </f:view.
    in my <body>...</body> section.

    now,
    alert(document.getElementsByTagName("BODY")[0]);
    return to me [object HTMLBodyElement] like firefox, and things work fine.

    thank you for your help (well, that line of code helped me find the problem) and sorry for the annoyance.

  7. #7
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    thanks to you for sharing the solution
    cheers

 

 

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 03:37 PM.