473,659 Members | 2,681 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

showModalDialog leaves gap at right hand edge

Hi,

I've come across what appears to be a bug in the rendering engine of internet explorer when a document is opened by
showModalDialog . Basically any elements that should render to the right hand edge of the window (i.e. Horizontal rules,
100% tables) fall short by around 15 - 20 pixels or so. I'm currently using internet explorer 6 and have created two
simple pages to demonstrate the behavior. My original pages were much more complicated but the effect remains even with
the most basic of documents.

Create a file called Dialog.html and put the following lines within it.

<HTML>
<HEAD>
</HEAD>
<BODY leftmargin="0" topmargin="0" marginwidth="0" marginheight="0 " >
<hr>
</BODY>
</HTML>

Save it and then open it in internet explorer. The horizontal line goes from left to right perfectly to the right hand
border.

Now create a page called MainPage.html with the same folder as the previous page. Within it have this code;

<HTML>
<HEAD>
</HEAD>
<BODY>
<script language="Javas cript">
window.showModa lDialog('dialog .html','','dial ogWidth:540px;d ialogHeight:450 px');
</script>
</BODY>
</HTML>
Now open MainPage.html with internet explorer and the dialog that appears will not show the HR rule to the right hand
edge, it falls short by around 20 pixels.

The same effect appears with tables that are 100%, they finish before the right hand margin and if they have a
background colour set it will look quite messy. My problem for one of our pieces of intranet software is that we have a
corporate banner that must appear at the top of every page. On dialog pages the banner falls short of the edge by a very
noticeable amount and is unacceptable.

I've coded a work around that basically checks if the current page is a dialog page and if it is it adjusts the table to
make it bigger, here's the code;

if(typeof(self. window.dialogWi dth)!="undefine d")
window.document .all.SmallBanne rTable.width=se lf.window.dialo gWidth;
So if it's a dialog it resizes the table to the dialog width. Actually it's sizes it a little too wide but I'll fix
that very shortly.

So my question for anyone that knows,

Is this a bug ? or am missing something that I should be doing?
Steve
Remove 'TheCompany' in email address to give correct version.
Jul 20 '05 #1
2 5122
On Mon, 08 Sep 2003 12:08:04 +0100, Steve
<so*****@nelson .TheCompanypama rco.co.uk> wrote:
So my question for anyone that knows,

Is this a bug ? or am missing something that I should be doing?


It's space reserved for the scrollbar, use CSS to ensure it's not
there.

Jim.
--
comp.lang.javas cript FAQ - http://jibbering.com/faq/

Jul 20 '05 #2
Ahh, well that explains it. Still seems a bit odd that the behavior isn't the same as normal windows, i.e. it should fit
to the end when no scroll bar and adjust itself when there is a scroll bar, like normal pages do. The dialogs I present
to users are generated by PHP and some may require scroll bars and some may not depending upon the amount of data to
display.

Would your CSS fix just ensure no scroll bar is present (which won't work for my pages) or are you setting some other
property ?

Thanks for your input,

Steve

On Mon, 08 Sep 2003 11:16:53 GMT, ji*@jibbering.c om (Jim Ley) wrote:
On Mon, 08 Sep 2003 12:08:04 +0100, Steve
<so*****@nelso n.TheCompanypam arco.co.uk> wrote:
So my question for anyone that knows,

Is this a bug ? or am missing something that I should be doing?


It's space reserved for the scrollbar, use CSS to ensure it's not
there.

Jim.


Remove 'TheCompany' in email address to give correct version.
Jul 20 '05 #3

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

Similar topics

4
2306
by: jake | last post by:
Maybe some kind person can help with a suggestion or two ;-) I want to construct a banner on a number of pages in the format: LHS: Text (variable content) RHS. Logo ..... each with a different background colour. The following test page shows what I'm trying to achieve (borders put in for diagnostic purposes).
4
2484
by: F. Da Costa | last post by:
Hi, I've been wrecking my brain on what is probably a very small thing. On the following link i've got a page that does not fill properly to the right-hand side. As you can see the bannerArea is too short (compared to the width of the screen). How do i make sure that the bannerArea div also fills to the side like the other divs?
2
1670
by: csgraham74 | last post by:
Hi guys, I ve created a web control - i want to make sure that it always sits at the very bottom of the browser screen. How can i achieve this. Ive been playing about with tables etc.. in html but moving the vertical align affects all other controls tables etc. on the screen. basically can i force a control or table to be at the bottom of the screen ???
1
2096
by: clubamigos | last post by:
I am having problems with getting a right hand side border positioned correctly. What l would like is for the dotted line to touch the navbar and the bottom of the content section of the page. If you see the following screenshot you will see what l am trying to achieve. The red line indicates what l am trying to do. I would really appreciate any help as this is proving to be very difficult what l am trying to acheive. ...
2
2809
by: jj | last post by:
I have a single threaded application in c# that scans through a file system. While doing this if I try to minimize, maximize buttons on the top,right hand corner of my form do not do as they are supposed to do. To maximize the window I have to go to "task manager" and double click the application. How do I control those maximize, minimize buttons on the top right section of my form? A learner here
5
2345
by: bruno | last post by:
I have a .aspx with a TreeView in the left hand and a GridView or a FormView in the right hand. I would like to resize the two sides like in http://msdn.microsoft.com/library/default.asp, but I didn't find the solution. Can I get any help? Just a sample or a link to where I can learn about. Thank you very much. -- bruno
29
23178
by: aarthi28 | last post by:
Hi, I have written this code, and at the end, I am trying to write a vector of strings into a text file. However, my program is nor compiling, and it gives me the following error when I try to write to the file: error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'std::string' (or there is no acceptable conversion) I don't know what I am doing wrong. I have posted my entire program
16
9281
Inbaraj
by: Inbaraj | last post by:
HI.... This is Inbaraj... I am doing an Internet Chat program... I that if a person who enter into that portal a popup message should be displayed like in google talk.. In right hand side a popup window will be displaying saying that person is online.. I dont know how to bring that pop window in the righ handside corner.. can any one give me the sample code for that how to bring that..... Thanks in advance.. reg
8
2851
by: Vaibhav Shinde | last post by:
i am getting an unwanted blank space on the right hand side and the bottom of the page. also facing problems with the layout in different IE versions. Thanks in Advance
0
8428
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8751
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8535
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8629
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7360
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4338
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2757
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1739
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.