Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Access Div from JavaScript

Posted on 2000-04-10
1
Medium Priority
?
363 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 100 total points
ID: 2701205
Check if helps

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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
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?
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
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…

877 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