473,778 Members | 1,910 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to make it modal ?

var docCal

function hello()
{
winCal=
window.open("", null,"toolbar=0 ,status=0,menub ar=0,fullscreen =no,width=195,h e
ight=245,resiza ble=0,top="+cnT op+",left="+cnL eft);
docCal = winCal.document ;
RenderCal();
}

function RenderCal()
{

//here i dynamically load the documnet
docCal.open()
docCal.writeln( "<html><head><t itle>"+WindowTi tle+"</title>");
docCal.writeln( "<script>va r winMain=window. opener;</script>");
.....

docCal.close();
}
Here in the above java script, where i am creating the HTML page dynamically
... ..
how can i make it modal dialoge ?

Thanks
Ramanand.
Aug 22 '05 #1
6 9949
Ramanand.K wrote:
[...]
Here in the above java script, where i am creating the HTML page dynamically
.. ..
how can i make it modal dialoge ?


Only for IE:

<URL:http://msdn.microsoft. com/library/default.asp?url =/library/en-us/ipsdk/html/xdmthShowModalD ialog_HV0102141 6.asp>


--
Rob
Aug 22 '05 #2
RobG wrote :
Ramanand.K wrote:
[...]
Here in the above java script, where i am creating the HTML page
dynamically
.. ..
how can i make it modal dialoge ?


Only for IE:

<URL:http://msdn.microsoft. com/library/default.asp?url =/library/en-us/ipsdk/html/xdmthShowModalD ialog_HV0102141 6.asp>


and Mozilla:

"modal: (...) The MSIE 6 equivalent to this feature is the
showModalDialog () method."

http://developer.mozilla.org/en/docs...ality_features

Gérard
--
remove blah to email me
Aug 23 '05 #3
Ramanand.K wrote :
var docCal

function hello()
{
winCal=
window.open("", null,"toolbar=0 ,status=0,menub ar=0,fullscreen =no,width=195,h e
ight=245,resiza ble=0,top="+cnT op+",left="+cnL eft);


- You can not force the status bar to be removed.
http://developer.mozilla.org/en/docs..._on_status_bar
- Making the secondary window non-resizable is non-user-friendly and not
advisable. It is in the best interests of the web author and the user to
be able to access content. By making the window non-resizable, you
remove a sane fallback mechanism if, for any reason, the content
overflows requested window dimensions.

Much better is:

winCal = window.open("", null,
"resizable,stat us,scrollbars,m odal,width=195, height=245,top= " + cnTop +
",left=" + cnLeft);

will work as intended in Mozilla 1.x, Seamonkey 1.x and Firefox 1.x

Gérard
--
remove blah to email me
Aug 23 '05 #4
Gérard Talbot wrote:

[...]

and Mozilla:

"modal: (...) The MSIE 6 equivalent to this feature is the
showModalDialog () method."

http://developer.mozilla.org/en/docs...ality_features


Hey, 'modal' works in IE 6 too.
--
Rob
Aug 23 '05 #5
RobG wrote:
Gérard Talbot wrote about "modal" as the 3rd argument to window.open:

"modal: (...) The MSIE 6 equivalent to this feature is the
showModalDialog () method."
http://developer.mozilla.org/en/docs...ality_features
Hey, 'modal' works in IE 6 too.


Thanks for this great tip Rob and Gérard. This is really useful since
Microsoft has crippled the old showModalDialog (specifically, you can't
functionally open it without another hit to the browser, which is
wasteful. By this I mean that you can't open it using
"javascript:'<h tml><head>...'" and have it return anything), and the
only way I could get its functionality, even when I am gerrymandering
IE on my own Win XP Pro, SP 2 system is to use the Win API
showHTMLDialog. See, for example:
http://groups.google.com/group/micro...ee1d91140bc6a/

However, it seems that there is at least a small bug in the IE 6
implementation. It seems like where the margin of the body of the
modal window is, The borders in the example below do not render quite
correctly: there is about a 2 pixel swath that is painted according to
the window that is underneath. Oops.

Csaba Gabor from Vienna

<button onclick="dome() " accesskey=d><u> D</u>o me
<script type='text/javascript'>
function dome() {
var newWin = window.open("ab out:blank",null ,"modal");
newWin.document .open();
newWin.document .write("<body>S ome text</body>");
newWin.document .close();
newWin.document .title = "My favorite title";
}
</script>

Aug 23 '05 #6
RobG wrote:
Gérard Talbot wrote:
"modal: (...) The MSIE 6 equivalent to this feature is the
showModalDialog () method."
http://developer.mozilla.org/en/docs...ality_features


Hey, 'modal' works in IE 6 too.


Hey Rob!

Who says Microsoft doesn't keep up with the times? - Does 'modal'
still work for you with window.open? Cause the example I made about 10
days ago, no longer works for me - though the chrome bug I mentioned is
still there.

Csaba Gabor from Vienna

Sep 4 '05 #7

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

Similar topics

1
12531
by: amith | last post by:
Hi, I have a javascript, calendar.js which i use to enable my client to select the date. This calendar pops up on the click of a gif image. But the problem is that this poped up window is not modal in nature(i do not want the user to go the parent page unless he selects some date in the calendar popup). In the javascript calendar.js he has used window.open() function to pop up the window. i just want to know whether we have any...
2
6734
by: Gilles T. | last post by:
Hi, How I can refresh a modal dialog in asp.net? I open a modal dialog in first with a dropdownlist. To add a element in my dropdownlist (table), I open a second modal dialog to ask element and save. When I return in my first modal dialog, dropdownlist is not refreshed. I don't know how to refresh my first modal dialog to view my new element in the dropdownlist. Thanks to help me with this problem!
10
4315
by: CyberBless | last post by:
I have a page that opens a child window using window.open(...). How do I make so that when that child window opens you cannot get the focus back on the parent window unless you close the child window? Is it even possible?
2
5503
by: Phill | last post by:
I'd like the startup Windows Form to be Modal. Here's why: I'm working on a website that has links to .NET apps. So when the user clicks on these links they can run the apps locally. Ideally I'd like to have these apps be children of the IE browser that launched them and have them be modal so they have to close one app before launching another.
4
10012
by: Paul Aspinall | last post by:
Can anyone advise how to display a form on top, and modal, without using ShowDialog?? Thanks
6
4906
by: Samuel R. Neff | last post by:
I'm having weird results with a form that is already displayed modally (via ShowDialog) displaying a second form via ShowDialog. The last form is not modal even though it's called with ShowDialog. For example, given three forms: Startup Pop1 Pop2
10
11701
by: Chris Petchey | last post by:
My App is an MDI Parent with MDI Child forms. One of the child forms calls a modal dialog form. I would like the modal dialog form to be INSIDE the mdi parent window. I am not bothered about any of the other things associated with MDI Parent/Child relationships, this is purely an appearance issue. MDIParent property and ShowDialog seem to be mutually exclusive.
4
2224
by: forest demon | last post by:
i've seen previous posts somewhat related to this, so i apologize if this is redundant. I have a main form with separate threads. When showing a dialog like <dialog>.ShowDialog(), it functions as a non-modal instead of modal. any help is appreciated, thanks.
20
2009
by: Prisoner at War | last post by:
Hi, People, Is it possible to have an "empty" or "dummy" <a href***without*** the browser jumping back up the page?? I have a hyperlink that doesn't point to another document, but is used to call forth a modal window onClick (or is there another way, without text or image links, of calling forth JavaScript on user activity??). I would like to spare my visitors the inconvenience and visually jarring effect of getting thrown back up to...
0
9629
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
9470
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10127
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...
0
9923
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
6723
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
5370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5500
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4033
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
3
2865
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.