jQuery in Action, 3rd edition
The moose likes HTML, CSS and JavaScript and the fly likes Updating content with javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Updating content with javascript" Watch "Updating content with javascript" New topic

Updating content with javascript

Sloan Bowman
Ranch Hand

Joined: Jan 21, 2003
Posts: 107
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

Joined: Nov 08, 2001
Posts: 15385
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.
I agree. Here's the link: http://aspose.com/file-tools
subject: Updating content with javascript
It's not a secret anymore!