×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    54

    QtScript + XMLHttpRequest

    Hi there

    I have a QT application that evaluates some functions in a JavaScript file. Some of these functions rely on the XMLHttpRequest object to retrieve data from external sources.

    From my testing, it seems that when using the evaluate() method of the QScriptEngine, XMLHttpRequest is not supported.

    Aside from creating the solution in QT and exposing it to the JavaScript, is there another way?

    Thanks!

  2. #2
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: QtScript + XMLHttpRequest

    Quote Originally Posted by gurmukh View Post
    From my testing, it seems that when using the evaluate() method of the QScriptEngine, XMLHttpRequest is not supported.
    Webkit does support XMLHttpRequest.

    Quote Originally Posted by gurmukh View Post
    Aside from creating the solution in QT and exposing it to the JavaScript, is there another way?
    Another way for doing what?

  3. #3
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    54

    Re: QtScript + XMLHttpRequest

    Yes I know webkit supports xmlhttprequest but I'm not using the browser. I'm using JavaScript files only.

    I am asking if there Is another way round making an external request in JavaScript for qscriptengine instead of creating the function in qt.

  4. #4
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: QtScript + XMLHttpRequest

    Quote Originally Posted by gurmukh View Post
    Yes I know webkit supports xmlhttprequest but I'm not using the browser. I'm using JavaScript files only.
    I'm not sure QScriptEngine supports XMLHttpRequest, but QtWebkit does
    http://doc.trolltech.com/4.6/qwebfra...uateJavaScript

  5. #5
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    54

    Re: QtScript + XMLHttpRequest

    Ok I'm assuming from your response that implementing the solution in QT is the way forward.

  6. #6
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: QtScript + XMLHttpRequest

    Quote Originally Posted by gurmukh View Post
    Ok I'm assuming from your response that implementing the solution in QT is the way forward.
    Since you didn't indicate your goal it's really hard to say what is the right solution in your case.

  7. #7
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    54

    Re: QtScript + XMLHttpRequest

    Here's the goal:
    Quote Originally Posted by gurmukh View Post
    I am asking if there Is another way round making an external request in JavaScript for qscriptengine instead of creating the function in qt.

  8. #8
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: QtScript + XMLHttpRequest

    Quote Originally Posted by gurmukh View Post
    Here's the goal:
    Unfortunately, it doesn't tell me anything.

  9. #9
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    54

    Re: QtScript + XMLHttpRequest

    Admins, please close.

  10. #10
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: QtScript + XMLHttpRequest

    Normally threads are not closed as someone may add or ask something relevant later.

Similar Threads

  1. XMLHTTPREQUEST
    By yynneejj in forum Symbian
    Replies: 7
    Last Post: 2010-06-08, 14:55
  2. Synchronous xmlHttpRequest
    By strider2k in forum Symbian
    Replies: 3
    Last Post: 2009-12-21, 11:29
  3. XMLHttpRequest problem
    By kogan_y in forum Symbian
    Replies: 3
    Last Post: 2009-12-18, 02:46
  4. XMLHttpRequest statud undefined
    By a.sichel in forum Symbian
    Replies: 12
    Last Post: 2009-05-19, 09:03

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×