Link to home
Start Free TrialLog in
Avatar of wickedbob
wickedbob

asked on

load div contents into variable

hi

i want to load the contents of a div layer on a page into a javascript variable.  i have tried "variable = page.div.innerHTML" which doesn't work.  what is the correct syntax for achieving this??

nb: the solution only needs to work in IE.
Avatar of Alopederii
Alopederii

Did you try:

variable=divName.innerHTML ?
ASKER CERTIFIED SOLUTION
Avatar of fritz_the_blank
fritz_the_blank
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
check this link out, you will get your answer

http://www.xs4all.nl/~ppk/js/layerwrite.html

Regards
Hart(harish)
I agree with Fritz's answer - that is the correct way to do it.
Avatar of wickedbob

ASKER

cheers fritz
perfect!
Glad to have helped,

Fritz the Blank