This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Updating content with javascript" Watch "Updating content with javascript" New topic
Author

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
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Updating content with javascript
 
Similar Threads
Just Javascript
using for loops in calculations
Manual Calendar
How to create textboxes dynamically?
help in Javascript calendar display