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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:31:46+00:00 2026-06-05T10:31:46+00:00

I use Internet Explorer 8 and Sharepoint 2007. Briefing: I have a NewForm with

  • 0

I use Internet Explorer 8 and Sharepoint 2007.

Briefing: I have a NewForm with various fields from a list. I need, using javascript, from one of the fields, to get the value introduced by the user (in a textBox) and paste it on other field (other textBox) in the same page, using onChange.

Problem: I’m a JavaScript newbie, and I can’t set the event ‘onChange’ to trigger my function, or at least to trigger an ‘alert(“Test”) … or simply I’m doing it wrong and don’t know why (more likely)…

Let’s assume the field I want to work with has as FieldName=”IDTeam”, type=”text” and id=”id_TeamField”.

//My JS below "PlaceHolderMain"

_spBodyOnLoadFunctionNames.push("setTxtBoxesValues");

function setTxtBoxesValues()
{    
   //snipped

   getField('text','IDTeam').onChange = function(){alert('Test')}; 
   //"getField('text', 'IDTeam).onChange = function(){myFunction()};" 
   //If I want to call myFunction() when onChange event is triggered    
    }

Also, instead of getField, tried this:

document.getElementById('id_TeamField').onChange = function(){alert('Test')};

If I want to call myFunction() when onChange event is triggered

Any idea of what I’m doing wrong?

  • 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-05T10:31:47+00:00Added an answer on June 5, 2026 at 10:31 am

    onchange is an event so either you put it in the tag like this:

    <input type="text" id="IDTeam" onchange="(call function here)" />
    

    or you apply addEventListener to that DOM object:

    document.getElementById("IDTeam").addEventListener("change", function() {//call function here});
    

    in IE6 you may need: (not sure if it works as few people are using ie6 nowadays)

    document.getElementById("IDTeam").attachEvent("onchange", function() {//call function here} )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some problems with in Internet Explorer when I use infoboxes with a
I have a problem with the use of the datepicker in Internet explorer. In
We have a client with thousands of users (who all use Internet Explorer) and
Is someone able to use jQuery sifr plugin, from thewikies.com, with Internet Explorer ?
Usually, when using Windows Authentication, the software (eg Internet Explorer) tries to use Windows
In Microsoft Internet Explorer we can use Msxml2.DOMDocument.6.0 activeX component to do xslt based
When i want to use window.external on internet explorer 9, it's always null. I
I'm trying to use JQuery's autocomplete plug-in but for some reasons Internet Explorer is
I have a USB GSM device which I use for Internet connection as well
I'm trying to use timer to refresh an image from the internet. This is

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.