| Author |
Passing Value from Javascript method into HTML Body
|
Raihan Jamal
Ranch Hand
Joined: Mar 23, 2010
Posts: 85
|
|
How can I pass value from Javascript method into my table that is there in HTML Body tag.. Suppose
following lines are written under script in Javascript...
and I want to dislpay the value of caption in a table which is there in HTML Body, like this
How can I do this.. Any help will be aprreciated...!!
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56528
|
|
|
innerHTML
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Raihan Jamal
Ranch Hand
Joined: Mar 23, 2010
Posts: 85
|
|
Thanks for replying...
I tried using innerHTML but I am not getting the value....I think innerHTML is not working in my code....
this is my code where I am using innerHTML in script:-
And in my body section where I have to put the value that is replaced by innerHTML is:
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15362
|
|
You CAN NOT use document.write after the page loads.
Eric
|
 |
Raihan Jamal
Ranch Hand
Joined: Mar 23, 2010
Posts: 85
|
|
|
I didn't get you... So what should I do.. i tried that by using innerHTML but no luck...!!!
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56528
|
|
|
Why not try to figure out why innerHTML was "not working"?
|
 |
Raihan Jamal
Ranch Hand
Joined: Mar 23, 2010
Posts: 85
|
|
|
I tried it already.. But nothing was happening when I tried to replace the label ID with innerHTML...
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16487
|
|
|
If you want us to discuss your problems with using innerHTML, perhaps it might help if we could see the code which you say "nothing was happening"?
|
 |
Raihan Jamal
Ranch Hand
Joined: Mar 23, 2010
Posts: 85
|
|
You can see the code in my previous post... I have posted my whole code...
In the script I am using innerHTML to replace the ID of Label used in HTML Body tag....
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15362
|
|
Eric Pascarello wrote:You CAN NOT use document.write after the page loads.
Eric
|
 |
 |
|
|
subject: Passing Value from Javascript method into HTML Body
|
|
|