473,404 Members | 2,114 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,404 software developers and data experts.

Lightbox in Internet Explorer 9

KeredDrahcir
426 256MB
I've created a lightbox which appears when a user clicks on a link to edit some options. It works in Firefox and Safari but as usualy doesn't work in IE. I'm using version 9.

In the head I've defined the following:
Expand|Select|Wrap|Line Numbers
  1.     <script type="text/javascript" language="javascript">
  2.       /* Superior Web Systems */
  3.       function displayHideBox(boxNumber)
  4.       {
  5.         if(document.getElementById("LightBox"+boxNumber).style.display=="none")
  6.         {
  7.           document.getElementById("LightBox"+boxNumber).style.display="block";
  8.           document.getElementById("grayBG").style.display="block";
  9.         }
  10.         else
  11.         {
  12.           document.getElementById("LightBox"+boxNumber).style.display="none";
  13.           document.getElementById("grayBG").style.display="none";
  14.         }
  15.       }
  16.     </script>
  17.     <style>
  18.       .grayBox{
  19.         position: fixed;
  20.         top: 0%;
  21.         left: 0%;
  22.         width: 100%;
  23.         height: 100%;
  24.         background-color: black;
  25.         z-index:1001;
  26.         -moz-opacity: 0.8;
  27.         opacity:.80;
  28.         filter: alpha(opacity=80);
  29.       }
  30.       .box_content {
  31.         position: fixed;
  32.         top: 25%;
  33.         left: 14%;
  34.         right: 14%;
  35.         width: 72%;
  36.         padding: 16px;
  37.         z-index:1002;
  38.         overflow: auto;
  39.       }
  40.     </style>
To open the lightbox they use this lienk:
Expand|Select|Wrap|Line Numbers
  1. <a href="#" onclick="displayHideBox('number'); return false;">link</a>
The box looks like this:
Expand|Select|Wrap|Line Numbers
  1.                   <div id="LightBoxnumber" class="box_content" style="display: none; background-color: #ffffff; width: 780px; overflow: auto; height: 400px;">
  2.                     <table cellpadding="3" cellspacing="0" border="0" width="100%">
  3.                       <tr align="left">
  4.                         <td colspan="2" style="padding: 10px;">
  5.                           <div onclick="displayHideBox('number'); return false;" style="cursor:pointer;" align="right">X</div>
  6.                               box content 
  7.                         </td>
  8.                       </tr>
  9.                     </table>
  10.                   </div>
Can anyone help me?
Nov 25 '10 #1

✓ answered by KeredDrahcir

Not quite sure what the problem was. Tried to solve a layout issue between IE and Firefox and decided to check it validated. When it didn't I fixed the validation errors and now it works.

3 4308
JKing
1,206 Expert 1GB
Are there any javascript errors?
Nov 25 '10 #2
KeredDrahcir
426 256MB
No Javascript errors it just seems to display it inline with the page while a lightbox is supposed to sit on top.

Yesterday that's what happened, today the page expands like yesterday and the grey box for making it look opaque appears but the div it sit on top doesn't.
Nov 26 '10 #3
KeredDrahcir
426 256MB
Not quite sure what the problem was. Tried to solve a layout issue between IE and Firefox and decided to check it validated. When it didn't I fixed the validation errors and now it works.
Nov 30 '10 #4

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

Similar topics

2
by: Raymond H. | last post by:
Hello, I create a vb4 project which can also naviger on Internet via the WebBrowser control which I put on my form. My question is: if this program is installed on a station having already...
12
by: SunshineGirl | last post by:
I'm trying to receive events from a running instance of Internet Explorer. So far I've only been able to receive events from an instance I launch from code, but I need to receive events from all...
0
by: asadhussain | last post by:
I wrote a plugin to internet explorer that requires internet explorer to be shutdown and restarted. I figured out a way to shut down IE using the MSI and to start it back up using VBScript. I...
2
by: CathieC | last post by:
I have a websote developed using visual studio 2005 beta , .net version 2 i deploy my application to a server and it is run from client computers. One of the users gets the error "Internet...
3
by: VK | last post by:
Internet Explorer 7 beta 2 preview CNET Editor review: <http://reviews.cnet.com/Internet_Explorer_7_for_XP_SP2_Beta_2/4505-3514_7-31454661-2.html?tag=nl.e415> Summary (my personal review...
11
by: Wendy | last post by:
Hello, I have a program that does the following: When a user clicks on a row in a VB.NET datagrid, it will open a web page in Internet Explorer (that corresponds to that item in the selected row...
3
by: laredotornado | last post by:
Hi, This problem only affects PC IE. On a secured page (a page visited via https), there is a link that reads -- "Download HTML File". The link connects to this page <?php...
9
by: Etayki | last post by:
Hi! I am new to VB.net and I am using the Visual Basic 2005 Express Edition I have two questions: 1. I am trying to write an application that will automate Internet Explorer and store data...
1
by: -Lost | last post by:
This is more of a post to inform, unless of course I am missing something fundamental, in which case I would appreciate anyone explaining it. Based on Mr. Michaux's camelizeStyle function I...
0
by: Bill Corry | last post by:
I have been trying to get an instance of internet explorer to navigate to a website using the Navigate2 command. When the navigation request uses the Get method (just a URL) there is no problem. ...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.