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 4014048
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T09:26:53+00:00 2026-05-20T09:26:53+00:00

<script src=http://widgets.twimg.com/j/2/widget.js></script> <script> var usr = ‘charliesheen’; function changeusr() { usr = document.getElementById(usrText).value; updatetwitter();

  • 0
<script src="http://widgets.twimg.com/j/2/widget.js"></script>
<script>
   var usr = 'charliesheen';

   function changeusr()
   {
      usr = document.getElementById("usrText").value;
      updatetwitter();
   }

   var twitter;
   newtwitter();

   function updatetwitter()
   {
      twitter.render().setUser(usr).start();
   }

   function newtwitter()
   {
     twitter =
     new TWTR.Widget({
       version: 2,
       type: 'profile',
       rpp: 4,
       interval: 6000,
       width: 200,
       height: 300,
       theme: {
         shell: {
         background: '#ffffff',
         color: '#367542'
       },
       tweets: {
          background: '#e3dfe3',
          color: '#000000',
          links: '#110af5'
       }
     },
     features: {
        scrollbar: false,
        loop: false,
        live: false,
        hashtags: true,
        timestamp: true,
        avatars: false,
        behavior: 'all'
      }
    }).render().setUser(usr).start();
}
</script>
<br/>
Change user:
<input name="usrText"/>
<button onclick="changeusr()">Go</button>

The results I see are: It loads fine. When I enter a new username and click “go” it may or may not reload the twitter widget, and the link “join the conversation” points to the correct url. I’d like it to reload the url with the new user entered. I’m a complete javascript noob. Thanks in advance.

  • 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-20T09:26:53+00:00Added an answer on May 20, 2026 at 9:26 am

    Your input needs an id:

    <input id='usrText' name="usrText"/>
    

    Internet Explorer will return elements by name from “getElementById()”, but that is simply legacy broken behavior and it’s not imitated by other browsers.

    edit — an update:

    There doesn’t appear to be much documentation for that widget thing. Things work somewhat better if you set the “live” feature to true. Also, when you update the user, you have to zap an internal variable on the widget:

    function updatetwitter()
    {
      twitter._profileImage = null;
      twitter.setUser(usr).render().start();
    }
    

    Here is the jsfiddle if you’d like to see it.

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

Sidebar

Related Questions

If I have a script tag like this: <script id = myscript src =
Here's a snippet of code from a shell script I have written: for src
I have the following script. It replaces all instances of @lookFor with @replaceWith in
The following shell script takes a list of arguments, turns Unix paths into WINE/Windows
I have a script that parses the filenames of TV episodes (show.name.s01e02.avi for example),
I have a script that retrieves objects from a remote server through an Ajax
I'd like to script, preferably in rake, the following actions into a single command:
I need to script the creation of app pools and websites on IIS 6.0.
I have a Perl script that I'm attempting to set up using Perl Threads
I have an Ant script that performs a copy operation using the 'copy' task

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.