• Thomas Pitera
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
I'm trying to update the data in an input text field using a button and javascript. I've tried using document.getElementByID but i get an error saying that isn't a function. Here is my code so far:

document.getElementByID("Case.Subject").value="Does this work?";

function CopySubject() {
var a = "{!Case.Subject}";
alert(a); 
}

function CopyCN() {
var b = "{!Case.CaseNumber}";
alert(b); 
}

CopySubject();
CopyCN();

Essentially, my code should put "Does this work?" into the subject of the case and then put out messages that contain the subject and case number. Any help is greatly appreciated!