473,699 Members | 2,078 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Alternate for Showmodaldialog in mozilla firefox

63 New Member
Hi all.
I have used showmodaldialog for a popup window. it works fine in IE but shows :Error: showModalDialog is not defined.
I have gone through many forums but haven't got satisfactory solution.

Moreover i dont want the popupwindow to be closed manually .It gets closed automatically as the time fixed for its display gets over.

This functionality is working fine in IE but if someone could help me out to run it in Mozilla and other browsers,it would be great.

Below is my code:

[HTML]function getUpload(sForm ){
var synclose=null;

while(synclose= =null)
var sURL = sForm;
var rst = showModalDialog (sURL, '', 'dialogWidth:60 0px; toolbar:0; dialogHeight:30 0px; status:0; resizable=0;');
<body onLoad="getUplo ad('syncpop.php ')"> </body>


//Here is the syncpop.php page

<? $mode=1;
if ($mode==1){?>
<script language="javas cript">
document.write( "Synchonizi ng, please wait...");
<? }
<script type="text/javascript">
alert('Last Synchronizaton completed successfully');
window.returnVa lue = "Success!!" ;
<? }?></body>

The code involves a little bit of php but it hardly makes difference..i want the javascript function only that could solve my above mentioned purpose.

Thanks and Regards
Jul 1 '08 #1
13 11127
5,390 Recognized Expert Moderator Expert
for other browsers you have to create a custom DHTML-(div)-dialog, that you could use for IE too. developing a page for IE first and then trying to adapt it to standards-compliant browsers is much more difficult then the other way round ...

kind regards
Jul 1 '08 #2
16,027 Recognized Expert Moderator MVP
showModalDialog is now supported in Firefox 3, but for older versions and other browsers you will need to create your own as gits mentioned.
Jul 1 '08 #3
5,390 Recognized Expert Moderator Expert
hmmm ... it seems that safari 3.1 supports it too ...

kind regards
Jul 1 '08 #4
16,027 Recognized Expert Moderator MVP
So that leaves Opera from the major browsers.
Jul 1 '08 #5
63 New Member
[HTML]<title>Popup WebPage</title>
<script language="javas cript">
function makePopup(url, width, height, overflow)
if (width > 640) { width = 640; }
if (height > 480) { height = 480; }
if (overflow == '' || !/^(scroll|resize |both)$/.test(overflow) )
overflow = 'both';
var win = window.open(url , '',
'width=' + width + ',height=' + height
+ ',scrollbars=' + (/^(scroll|both)$/.test(overflow) ?
'yes' : 'no')
+ ',resizable=' + (/^(resize|both)$/.test(overflow) ?
'yes' : 'no')
+ ',status=yes,to olbar=no,menuba r=no,location=n o'
return win;

<html><body onLoad="makePop up(syncpop.php' , 480, 240, 'resize')" ></body></html>
<? } ?>


window.onbefore unload = function (evt) {
var message = '';
if (typeof evt == '') {
evt = window.event;
if (evt) {
evt.returnValue = message;
return message;


this code works but not completely...an y suggestions??
Jul 1 '08 #6
16,027 Recognized Expert Moderator MVP
What do you mean by "not completely"? What doesn't work?
Jul 1 '08 #7
63 New Member
I want the popup window not to get closed ,even on click of the close option untill the time fixed for its display does not gets over.
Using Window.onbefore unload prompts a dialog box and the window can be closed on clicking the ok button . I dont want it to close .
Any suggestions?
Jul 2 '08 #8
5,390 Recognized Expert Moderator Expert
then your best bet is certainly a custom DHTML-popup ... since you even should use it to support all! browsers ... i guess you cannot avoid closing a 'real' window ...

kind regards
Jul 2 '08 #9
63 New Member
plz dont tell me that their is no solution to this issue. I have to do it for th client

plz find some solution.
Jul 2 '08 #10

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

Similar topics

by: Toby A Inkster | last post by:
www.authoring.stylesheets] For ages I have provided links to alternate stylesheets from my pages as per W3C recommendations: <link rel="stylesheet" href="baz" type="text/css" title="Baz" media="screen,projection" /> <link rel="alternate stylesheet" href="foo" type="text/css" title="Foo" media="screen,projection" /> <link rel="alternate stylesheet" href="bar" type="text/css" title="Bar"
by: needin4mation | last post by:
I haven't used it in a while and thought I would check on it. Some say not to use ShowModalDialog (or at least they used to). But I just saw where Firefox has support for a similar type windows (window.dialog?). There was no firefox when I used ShowModalDialog last. And everyone said SMD was "evil." Should neither be used on either browser? Why is it supposedly bad to use a modal dialog box if that is what I need? Thanks.
by: News | last post by:
I have a page up trying to learn how to ID a browser and other info. http://wyght.com/warren/testPos.html here is the code <script type = "text/javascript"> var space = ", "; var name = navigator.appName;
by: johkar | last post by:
Just want a verification of logic. This seems to work for IE and Firefox, but I wonder if it would be a problematic test in any of the other latest browsers? Is the use of the "window" object correct? I didn't think it would be document.showModalDialog. if(window.showModalDialog){ //do something } else {
by: Alex D. | last post by:
Hi, I have a frame in one of my pages that I use to show diferent pages each time. I am experiencing an weird behaviour in Mozilla and Firefox, when the frame's source is specified in the server side it works OK, but when the content of the frame is changed in the client browser clicking over a link then the frame dont render the pinctures but just the text. I dont understand. Any ideas?? Thanks.
by: Clément | last post by:
Hi! I am currently developping a user interface with Ajax/C#/.net. And I am facing a problem with Mozilla, and Firefox. I use the function innerHTML to load a Web UserControl into a div, this way the main page never gets refreshed. It works perfectly under IE, but with Mozilla and Firefox I got a problem : there is a space before the thing I want to display everytime I use ".innerHTML".
by: Faizmysore | last post by:
This code works good in IE, function multiuser() { document.frmOpenInteraction1.Create.disabled=true; document.frmOpenInteraction1.hidmultiuser.value="Yes"; var r = showModalDialog('popup.htm','NEW', 'dialogWidth:400px;dialogHeight:155px;dialogLeft:200px;center:1;help: no; resizable: no; status: no; scroll: no;'); window.document.frmOpenInteraction1.ticket.checked=false;...
by: sarath chandran | last post by:
Hi all, can you tell me the replacement for window.showModalDialog in Mozilla. the code given below works well in IE but it doesn't work in Mozilla. Is there any replacement for this method in Mozilla.? If so then please help me by giving an example window.showModalDialog("../login/html/AdminLogin_User.html",loginType,style
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...
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,...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
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...
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,...
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...
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...
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
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.