?
Solved

load div contents into variable

Posted on 2003-03-31
6
Medium Priority
?
599 Views
Last Modified: 2009-07-29
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
Comment
Question by:wickedbob
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 5

Expert Comment

by:Alopederii
ID: 8242779
Did you try:

variable=divName.innerHTML ?
0
 
LVL 46

Accepted Solution

by:
fritz_the_blank earned 200 total points
ID: 8242787
I think that it is something like:

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

Fritz the Blank

0
 
LVL 11

Expert Comment

by:hart
ID: 8243175
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!

 
LVL 5

Expert Comment

by:kasandra
ID: 8243207
I agree with Fritz's answer - that is the correct way to do it.
0
 

Author Comment

by:wickedbob
ID: 8243326
cheers fritz
perfect!
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 8246018
Glad to have helped,

Fritz the Blank
0

Featured Post

Technology Partners: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question