Solved

Access Div from JavaScript

Posted on 2000-04-10
1
338 Views
Last Modified: 2010-04-09
I have the following def -
<style type="text/css">
  #x1{position:absolute;top:000px;left:00px;z-index:1;visibility:visible}
</style>

then there is -
<div id=x1>
...
</div>

and I'm trying to access x1 with -
document.all.x1.[property]
within javascript but it doesn't work.

Any idea ?
0
Comment
Question by:gilad111397
1 Comment
 
LVL 2

Accepted Solution

by:
Bhargava earned 50 total points
ID: 2701205
Check if helps

if(IE){
    x1.style.property = value;
}else if(Nav){
    document.x1.property = value;
}
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Javascript the "if condition with Or" 8 29
simple html dom php accessing table/cell  values 4 23
send email part1 9 28
I'm a Human captcha checkbox 13 23
Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

821 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