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

dhtml modal window issue in firefox

Hi...

i'm new at dhtml, and i want to use it in help windows (instead of window.open() of javascript)...

i'm done it... but it works only in internet explorer.. in firefox 2 and 3 it opens the dhtml modal window but in the background of my main page... what do i have to correct so it opens up in front as it does in internet explorer?

i'm using c# and ajax... it's an asp.net app...
in masterpage i have this:

Expand|Select|Wrap|Line Numbers
  1. <link rel="stylesheet" href="~/dhtml/windowfiles/dhtmlwindow.css" type="text/css" />
  2. <link rel="stylesheet" href="~/dhtml/modalfiles/modal.css" type="text/css" />
  3. <script type="text/javascript" src="dhtml/windowfiles/dhtmlwindow.js">
  4. </script>
  5. <script type="text/javascript" src="dhtml/modalfiles/modal.js"></script>
  6. <script type="text/javascript">
  7. function openhelp(vPage){
  8.     vWindow=dhtmlmodal.open('Help', 'iframe','' + vPage+ '', 'Info', 'width=900px,height=500px,center=1,resize=0,scrolling=1')
  9. </script>
thanks in advance...
Jul 3 '08 #1
9 5291
acoder
16,027 Expert Mod 8TB
Post the code for the two JavaScript files, or if possible, post a link to a test page. If not and if it's too much code, attach the files to your post instead.
Jul 3 '08 #2
here is the URL where i'm testing dhtml stuff... as you'll see, it won't work correctly in firefox...

http://189.132.59.130/popup/Derechos.aspx

tell me if you need something else...
thanks....
Jul 4 '08 #3
acoder
16,027 Expert Mod 8TB
It's a z-index problem. The DHTML window only has a z-index of 100, while the "MainMenu" and "MainContenido" divs have a z-index of 400 and 300 respectively. Either increase the z-index of the window or decrease the z-index of the divs.
Jul 4 '08 #4
It's a z-index problem. The DHTML window only has a z-index of 100, while the "MainMenu" and "MainContenido" divs have a z-index of 400 and 300 respectively. Either increase the z-index of the window or decrease the z-index of the divs.
how did you know about z-indexes values by just accessing my test website?
i'm new at this and i don't know how to set such z-indexes properties... in modal.css i have this:

Expand|Select|Wrap|Line Numbers
  1. .drag-handle{ /*Overwrite default drag handle bar background color with below*/
  2. background-color: #03277C;
  3. }
  4.  
  5. #interVeil{ /*CSS for veil that covers entire page while modal window is visible*/
  6. position: absolute;
  7. background: black url(blackdot.gif);
  8. width: 10px;
  9. left: 0;
  10. top: 0;
  11. z-index: 5;
  12. visibility: hidden;
  13. filter:progid:DXImageTransform.Microsoft.alpha(opacity=80);
  14. opacity: 0.8;
  15. }
and according to what you just said, i found this in dhtmlwindow.js:
Expand|Select|Wrap|Line Numbers
  1.     this.zIndexvalue=(this.zIndexvalue)? this.zIndexvalue+1 : 100 //z-index value for DHTML window: starts at 0, increments whenever a window has focus
  2.     var t=document.getElementById(t)
  3.     var divs=t.getElementsByTagName("div")
  4.     for (var i=0; i<divs.length; i++){ //go through divs inside dhtml window and extract all those with class="drag-" prefix
  5.         if (/drag-/.test(divs[i].className))
  6.             t[divs[i].className.replace(/drag-/, "")]=divs[i] //take out the "drag-" prefix for shorter access by name
  7.     }
  8.     t.style.zIndex=this.zIndexvalue //set z-index of this dhtml window
  9.     t.handle._parent=t //store back reference to dhtml window
  10.     t.resizearea._parent=t //same
  11.     t.controls._parent=t //same
  12.     t.onclose=function(){return true} //custom event handler "onclose"
  13.     t.onmousedown=function(){dhtmlwindow.zIndexvalue++; this.style.zIndex=dhtmlwindow.zIndexvalue} //Increase z-index of window when focus is on it
from second code text i'm posting, line 1, i changed
"this.zIndexvalue=(this.zIndexvalue)? this.zIndexvalue+1 : 100"
to
"this.zIndexvalue=(this.zIndexvalue)? this.zIndexvalue+1 : 500"

and now it shows me the dhtml window in front! but... i can still move or do something in the back page, it's not disabled as in internet explorer...

what am i missing now?
Jul 4 '08 #5
i've published the website again...
now it shows in front of everything but does not disable parent page's controls...

thanks in advance...
Jul 4 '08 #6
acoder
16,027 Expert Mod 8TB
how did you know about z-indexes values by just accessing my test website?
I used Firebug to inspect the elements.

I see that you got this from Dynamic Drive. Have you checked their documentation. Take the demo and adapt it to your requirements.
Jul 4 '08 #7
I used Firebug to inspect the elements.

I see that you got this from Dynamic Drive. Have you checked their documentation. Take the demo and adapt it to your requirements.
yes i have, but i'll double check, maybe i'm missing something..
thanks...
Jul 4 '08 #8
done!
i changed z-index to modal window and now it works perfectly

z-index, i had heard of it but never used it...
Jul 4 '08 #9
acoder
16,027 Expert Mod 8TB
You fixed it yourself and learned something new along the way which can only be A Good Thing :)

Post again if you have any more questions.
Jul 5 '08 #10

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

Similar topics

5
by: Lee | last post by:
I am using a modal window and an iFrame to try and pull a return value back. I am doing this across domains. I have the value returned from the modal window to the iFrame window but I can not...
3
by: Smellyfrog | last post by:
Hi, I'm a newbie in mozilla web development. I've been developping apps for IE and Netscape for years though. After searching the internet (groups google etc..), I found a way to pop a modal...
1
by: gopal srinivasan | last post by:
I need to know how to close a parent modal window when child modal window opens, also i need to know the syntax for writing document on the modal window on the fly, like what we do in case of...
6
by: Mike | last post by:
i have a button that opens a modal window which has the calender control in it. I allow the user to select a date then that date should be passed back to the parent form. I'm having an issue with...
1
by: aarthi | last post by:
Hi there.... Thanx for ur valuable time... :) I have done an application which works fine in Internet explorer.I have used a number of modal windows.i want it to work fine in Firefox also.Were...
0
by: homsar | last post by:
I've seen many posts discussing the options we have when using modal windows within a web based application. Often times it seems the greatest hurdle is simply getting the modal window to post back...
1
by: Laurahn | last post by:
Hi: i'm using modal window (showmodelessdialog) on asp. when the object is created i used session variables. After the object is closed the data is remaining on the modal window when is open...
3
by: gamernaveen | last post by:
Hello , am new to js and ajax stuff (Well web designing itself) , I created a js/ajax modal window , the problem is , IT WORKS ON OPERA , FIREFOX (NOT TESTED) , BUT NOT ON IE. Everytime , IE...
3
by: gsuns82 | last post by:
Hi all, I am using modal window for some update purpose, the issue i am facing is,i am not able to refresh parent after closing modal window. The code i used: ...
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
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...

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.