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

  • Home
  • SEARCH
  • 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 615275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:12:09+00:00 2026-05-13T18:12:09+00:00

I have this html: <input type=text id=text/> <input type=button id=submit value=Submit /> <div id=twitter_update_list>

  • 0

I have this html:

<input type="text" id="text"/>
<input type="button" id="submit" value="Submit" />
<div id="twitter_update_list">
</div>

and this javascript:

var xmlHttp;
document.body.onclick = function(){
    var username = document.getElementById('text').value;
    selectUser(username);
}
    function selectUser(username){
        var url = "http://twitter.com/statuses/user_timeline/" + username + ".json?callback=twitterCallback2&count=100";
        try{// Opera 8.0+, Firefox, Safari
            xmlHttp = new XMLHttpRequest();
        }catch (e){// IE
            try{
                xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                try{
                    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (e){
                    // Something went wrong
                    alert("Your browser broke!");
                    return false;
                }
            }
        }
        xmlHttp.onreadystatechange = processRequest;
        xmlHttp.open( "GET", url, true );
        xmlHttp.send( null );
    }

    function processRequest(){
        if ((xmlHttp.readyState == 4) && (xmlHttp.status == 200)) {
            if ( xmlHttp.responseText == "Not found" ) {
                document.getElementById('twitter_update_list').innerHtml = "Not found";
            }else if(xmlHttp.responseText == " "){
                document.getElementById('twitter_update_list').value = "Empty";
            }else{
                // No parsing necessary with JSON!        
                document.getElementById('twitter_update_list').value = xmlHttp.responseText;
                console.log(xmlHttp.responseText);
            }
        }
    }

I am looking at firebug and I see verything gets sent correctly but I don’t get any response whatsoever. Oh, and I’m using raw javascript because I want to practice it. =)

  • 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-05-13T18:12:10+00:00Added an answer on May 13, 2026 at 6:12 pm

    You are trying to do cross-domain XMLHttpRequest. It doesn’t work although the service may be supporting JSONP. To do a JSOP request, you either need to inject a <script> tag with the correct event handlers or use a framework such as jQuery.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 306k
  • Answers 306k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer dispatchEvent calls clone on the passed event, if that event… May 13, 2026 at 9:23 pm
  • Editorial Team
    Editorial Team added an answer It uses GeSHI http://qbnz.com/highlighter/ No, maybe not geshi itself, but… May 13, 2026 at 9:23 pm
  • Editorial Team
    Editorial Team added an answer I understand now why this cannot be done. There should… May 13, 2026 at 9:23 pm

Related Questions

Please have a look at this code - When I click on myLink I
I have this HTML: <input type=text name=textField /> <input type=submit value=send /> How can
i have this html <ul> <li><form action=# name=formName></li> <li><input type=text name=someName /></li> <li><input type=text
I have this HTML dropdown: <form> <input type=text id=realtxt onkeyup=searchSel()> <select id=select name=basic-combo size=1>
I have this input in a form: <input type=text value=<script src='/js/script.js' type='text/javascript'></script> name=embed/> The

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.