473,385 Members | 1,309 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,385 software developers and data experts.

JavaScript Error Page in IE

2
I am having problem with IE. This is the code that I am using, and it works good in every browser except in IE. If somebody can help PLEASE:


<script language="Javascript" type="text/javascript"> <!--
function showTerms() {
var newWin = window.open('http://slee.com/thisgoesnowhere','','width=500,height=450,menubar= no,location=no,status=no,scrollbars=yes,toolbar=no ,resizable=yes');
}

// this doesn't work
//window.onload = setLeftColHeight();

function setLeftColHeight() {
var obj = document.getElementById('middleheight');

if (obj) {
var h = obj.height;
}
}
// -->
</script>
<FORM METHOD="post" ACTION="/cgi-bin/mivavm?/Merchant2/merchant.mvc+">
<table border="0" cellpadding="0" cellspacing="0">

<div id="header"> <img
src="http://slee.com/joomla/templates/jw_inetgazette2/images/righttaglineblue.gif" style="float: right;" border="0"> </div>
<div id="logo"> <img
src="http://slee.com/joomla/templates/jw_inetgazette2/images/ig_shield_blue.png">
</div>
<div id="horizontal">
<map name="sleemap">
<area shape="rect" coords="151,1,227,28"
href="http://www.slee.com/joomla/index.php?option=com_content&amp;task=view&amp;id= 16&amp;Itemid=31">
<area shape="rect" coords="228,1,332,28"
href="http://www.slee.com/joomla/index.php?option=com_content&amp;task=view&amp;id= 12&amp;Itemid=86">
<area shape="rect" coords="333,1,441,28"
href="http://www.slee.com/joomla/index.php?option=com_content&amp;task=view&amp;id= 75&amp;Itemid=89">
<area shape="rect" coords="442,1,581,28" href="http://slee.com/cgi-bin/mivavm?/Merchant2/merchant.mvc">
<area shape="rect" coords="584,1,659,28"
href="http://www.slee.com/joomla/index.php?option=com_weblinks&amp;Itemid=23">
<area shape="rect" coords="660,1,736,28"
href="http://www.slee.com/joomla/index.php?option=com_content&amp;task=section&amp; id=3&amp;Itemid=88">
<area shape="rect" coords="737,1,840,28"
href="http://www.slee.com/joomla/index.php?option=com_contact&amp;catid=12&amp;Item id=73">
</map>
<img src="http://slee.com/joomla/templates/jw_inetgazette2/images/slee_image_map.png"
alt="Image Map" border="0" usemap="sleemap" height="33px" width="930" />
</div><div style="clear: both;"></div>
</body>
</html>


It shows error in "document.getElementById". I am not that good with Java, so if somebody can help.
Jun 19 '07 #1
3 1638
epots9
1,351 Expert 1GB
instead of: window.onload = setLeftColHeight();

use the onload in the body tag:
[HTML]
<body onload="setLeftColHeight();">
[/HTML]

because your script is in the head and your elements haven't been loaded yet so when u use getElementById, it fails since those elements don't exist yet.

good luck
Jun 19 '07 #2
DVir
2
instead of: window.onload = setLeftColHeight();

use the onload in the body tag:
[HTML]
<body onload="setLeftColHeight();">
[/HTML]

because your script is in the head and your elements haven't been loaded yet so when u use getElementById, it fails since those elements don't exist yet.

good luck
It is not working. i am having this problem only with IE. I am working with layover images, nut the images that are in the background are not showing in IE. It works fine in every other browser. This is the link and if you open it in Firefox and IE you will see the problem:

http://virtusgroup.com/cgi-bin/mivav...2/merchant.mvc



Thank you for your help.
Jun 19 '07 #3
acoder
16,027 Expert Mod 8TB
I don't see any errors in IE. Have you solved this problem?
Jun 20 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.