• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Updating content with javascript

 
Sloan Bowman
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello group I'm learning javascript which doesn't seem all that hard for most things but this one thing has me stumped. I am trying to create a page that automatically updates an amount to distribute through a form. For example when the order is entered a total revenue is submitted. If the user selected to manually distribute the order over serveral months a form is displayed with the months displayed and text fields to enter the amount to distribute for that month. I am wanting to create a javascript that subtracts the amount they enter in the form field for that month and display the remaining sum in a layer that has been created on the window. I can't seem to figure out a way to update the information in this layer. Let me know if you need any more details. I greatly appreciate the help with this.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
layer (aka) text written on a page and not in a textbox?

if that is a case you can update the text by referening the innerHTML of the element.

<span id="theAmt"></span>

document.getElementById("theAmt").innerHTML = "asdf";

I am not sure if that is what youu are asking.
Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic