473,378 Members | 1,333 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Javascript DOM Opera vs IE

Strangely I came acros a problem in IE performing little asp/javascript
model:

code:
<script type="text/javascript">
function turn_on_files(folder)
{
x=event.clientX+25
y=event.clientY+25
document.getElementById('files_frame').style="visi bility:visible;z-index=9;position:absolute;left:"+x+"px;top:"+y+"px ;";
document.getElementById('files_frame').src="http://www.somesite.com/chart.asp?width=300&height=240&charttype=line&name ="+folder;
}
function turn_off_files()
{
document.getElementById('files_frame').style="visi bility:hidden;z-index=9;position:absolute";
}
</script>

......

<iframe id=files_frame
src="http://ratool.win.vipnet.hr/chart.asp?width=300&height=240&charttype=line&name =tapin_udr"
width=300 height=240 frameborder=0 marginheight=0 marginwidth=0
scrolling=no
style="visibility:hidden;z-index=9;position:absolute;left:50px;top:20px;"></iframe>

.......
<div onmouseover=turn_on_files("some_text")
onmouseout="turn_off_files()"><img src=images/red_dot_blink.gif></div>

This works fine in Opera, but in IE I get strange error:
Permisssion denied: line 11 or line 17
when i trigger this event...
line 11 or 17 are "document.getElementById('files_frame').style" lines
in javascript...

Jul 27 '06 #1
2 2754


ze***********@gmail.com wrote:

document.getElementById('files_frame').style="visi bility:visible;z-index=9;position:absolute;left:"+x+"px;top:"+y+"px ;";
The style property is an object with individual properties for the CSS
properties so you need to do
var element = document.getElementById('files_frame');
element.style.visibility = 'visible';
element.style.zIndex = '9';
element.style.position = 'absolute';
and so on for all the properties you want to set.


--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 27 '06 #2
Martin Honnen wrote:
ze***********@gmail.com wrote:

document.getElementById('files_frame').style="visi bility:visible;z-index=9;position:absolute;left:"+x+"px;top:"+y+"px ;";

The style property is an object with individual properties for the CSS
properties so you need to do
var element = document.getElementById('files_frame');
element.style.visibility = 'visible';
element.style.zIndex = '9';
element.style.position = 'absolute';
and so on for all the properties you want to set.
Thanx, this solved my problem! :)

Jul 27 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Spijon | last post by:
Seems opera can not work normally with javascript, does anyone knows how to fix it? Thanks in advance.
1
by: oreng | last post by:
Hey all, I have some problems detecting whether the client's browser javascript is enabled at the server side. While Request.Browser.JavaScript only check if the browser enable java script (and...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.