Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

xhr don't work with "onclick"

Hello,

I have the same problem on this post and i don't success to resolve it!

This post

I try to add the line on that post Click here but with no success

I see all examples of kitchen sink and it was nothing like i want.

Thanks you for helping me!

Alexander

— asked August 5th 2010 by BENAIM Alex
  • bug
  • event
  • javascript
  • onclick
  • xhr
0 Comments

3 Answers

  • What version of the SDK are you using?
    The 1.x version does not work anymore using html code.

    You will have to use app.js or another js file, and if you want to use webviews you can only trigger events from and to this webview.

    — answered August 5th 2010 by Dan Tamas
    permalink
    0 Comments
  • Okkk, so now i could not blend html and javascript in the same page ?

    Can u give me an example because i don't understand all what u mean:

    • Where i display my html form ?
    • I have to make it with "Create labels", etc… and add event click on a label to do my submit and call my xhr ?

    Thanks you,
    Alexander

    — answered August 5th 2010 by BENAIM Alex
    permalink
    0 Comments
  • Well, the best way it's to take a look at the kitchensink demos.

    There will be no more a html form. You will need to create it using the native elements ( createLabel, createTextField, createButton) and on the createButton click event to send the xhr

    — answered August 5th 2010 by Dan Tamas
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.