Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8762387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T15:31:12+00:00 2026-06-13T15:31:12+00:00

I working on iphone Application Development. I created a sampleTest button and whenever i

  • 0

I working on iphone Application Development.
I created a sampleTest button and whenever i click on it the following function invoking.
But unable to return any response. Its showing empty alert message.
(hostName and portNo are dynamic inputs)

sampleTestBtn.addEventListener('click', function()
{   
    var regDetails = '{"user_login": {"email": "sample@sample.com", "password": "password"}}';
    var client = Titanium.Network.createHTTPClient({timeout: 10000});
    client.cache = false;
    client.open("POST", "http://"+hostName+":"+portNo+"/AccountCreate");
    client.setRequestHeader("Content-Type", "application/json");
    client.send(regDetails);    

    alert(JSON.parse(this.responseText));

});

can any one please.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T15:31:14+00:00Added an answer on June 13, 2026 at 3:31 pm

    I got the solution.

    We need to use onload function. This will get the result from specified url:

    My code is below:

    var regDetails = '{"user_login": {"email": "sample@sample.com", "password": "password"}}';
    var client = Titanium.Network.createHTTPClient({timeout: 10000});
    client.cache = false;
    client.open("POST", "http://"+hostName+":"+portNo+"/AccountCreate");
    client.setRequestHeader("Content-Type", "application/json");
    client.send(regDetails); 
    
    client.onload = function(e)
    {
       alert(JSON.parse(this.responseText));
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi i'm a newbie to iphone application development.. present i'm working on Picasa web
I am working on iphone application in which i have to return the keyboard
I am new in iPhone application development and currently working on .net (C#). Please
I am new to iPhone development.Currently I am working on an application in which
hello all i am new to iphone development i am working on a application
I'm currently listening and watching to iPad / iPhone application development and working assignments/demo.
I am pretty new to iPhone development and currently working on an application which
I'm working on the Android version of an application I first created on iPhone
I am working on iphone application which will read the following youtube page source:
I am new to iPhone development. I am working with an navigational based application

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.