Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Eric, come in please

 
kirts li
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eric,

I ever posted a topic "how to call javascript function in the previous html file" on July 17. You suggest me to use innerHtml or visiblity to display the output. Would you please give me some examples for these two cases? Thanks a lot!
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Example with innerHTML


Example with visibility


There is a third way using DOM to create elements on the page, but I do not have time to whip up that example right now due to a deadline with my publisher being very soon.

Eric
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was editing chapter 15 in my book and here is the thrid method on adding information to the page



the elem parameter is the object you want to add it to. If you want to add it to a div you would use the div id

example: you have this div


you can add a text box too it with a button


Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic