Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 601
  • Last Modified:

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.
0
wickedbob
Asked:
wickedbob
1 Solution
 
AlopederiiCommented:
Did you try:

variable=divName.innerHTML ?
0
 
fritz_the_blankCommented:
I think that it is something like:

var strText = document.getElementById("strDivName").innerHTML;

Fritz the Blank

0
 
hartCommented:
check this link out, you will get your answer

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

Regards
Hart(harish)
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
kasandraCommented:
I agree with Fritz's answer - that is the correct way to do it.
0
 
wickedbobAuthor Commented:
cheers fritz
perfect!
0
 
fritz_the_blankCommented:
Glad to have helped,

Fritz the Blank
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now