473,382 Members | 1,563 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,382 software developers and data experts.

"showModalDialog" does not work in firefox,

This code works good in IE,

[HTML]function multiuser() {
document.frmOpenInteraction1.Create.disabled=true;
document.frmOpenInteraction1.hidmultiuser.value="Y es";
var r = showModalDialog('popup.htm','NEW',
'dialogWidth:400px;dialogHeight:155px;dialogLeft:2 00px;center:1;help: no; resizable: no; status: no; scroll: no;');
window.document.frmOpenInteraction1.ticket[0].checked=false;
window.document.frmOpenInteraction1.Create.disable d=false;
}

function nonmultiuser() {
document.frmOpenInteraction1.hidmultiuser.value="N o";
if(document.frmOpenInteraction1.Create.disabled) {
document.frmOpenInteraction1.Create.disabled=false ;
}
}

but, when this same code is used in firefox, it does not work. So i had to edit multiuser function. "showModalDialog" does not work in firefox.

function multiuser() {
document.frmOpenInteraction1.Create.disabled=true;
document.frmOpenInteraction1.hidmultiuser.value="Y es";
netscape.security.PrivilegeManager.enablePrivilege ('UniversalBrowserWrite');
var r = window.open('popup.htm?params='+ params +'', 'TEST', 'chrome,centerscreen,dependent=NO,dialog=YES,modal =YES,resizable=NO,scrollbars=NO,location=0,status= 0,menubar=0,toolbar=0,height='+Height+',width='+Wi dth+',left='+X+',top='+Y);
window.document.frmOpenInteraction1.ticket[0].checked=false;
window.document.frmOpenInteraction1.Create.disable d=false;
}

function nonmultiuser() {
document.frmOpenInteraction1.hidmultiuser.value="N o";
if(document.frmOpenInteraction1.Create.disabled) {
document.frmOpenInteraction1.Create.disabled=false ;
}
}

Now, the problem that i am facing is i do get the popup window when i select "yes" but, i am able to select "no" as well even though the popupwindow is enabled.

I have verified the name too, both have the same name.

<td valign="top"><input type="radio" name="ticket" value="Yes"onclick="multiuser()"></td>
<td colspan="2" class="FieldLabelRadio">No</td>
<td valign="top"><input type="radio" name="ticket" value="No"onclick="nonmultiuser()"></td>
</TD>
</TR>
</TABLE>

<div class="ExplanationText" align="center"><IMG src="images/skins/baja/required.gif" WIDTH=13pt HEIGHT=13pt BORDER=0>- Indicates a required field.</div>

<INPUT size="30" value="" name="hidmultiuser" type="hidden" id="hidmultiuser" tabindex="" /> <INPUT size="30" value="" name="hiduseroption" type="hidden" id="hiduseroption" tabindex="" />[/HTML]
Dec 11 '07 #1
5 6422
gits
5,390 Expert Mod 4TB
hi ...

welcome to TSDN ...

your thread title is the plain truth ;) ... showModalDialog() is IE-specific and will not work with other browsers. you may create a dhtml-dialog instead that acts as a modal dialog here ...

kind regards
Dec 11 '07 #2
Thank you gits,

I shall try out your suggestion.
Dec 12 '07 #3
gits
5,390 Expert Mod 4TB
let me know in case you encounter problems with it :) ... post back in case you have more questions ...

kind regards
Dec 12 '07 #4
I used the below code and i do not get the child window populating.
I used this information from ....
http://msconline.maconstate.edu/tutorials/JSDHTML/JSDHTML07/jsdhtml07-05.htm

Expand|Select|Wrap|Line Numbers
  1.  
  2. function multiuser()    {
  3.         document.frmOpenInteraction1.Create.disabled=true;
  4.         document.frmOpenInteraction1.hidmultiuser.value="Yes";
  5.         input type="radio" value="Show Modal" onclick='showModalDialog("popup.htm","","dialogWidth:400px; dialogHeight:225px; status:no; center:yes")'
  6.         window.document.frmOpenInteraction1.ticket[0].checked=false;
  7.         window.document.frmOpenInteraction1.Create.disabled=false;
  8.         }
  9.  
  10.  

Earlier code was
Expand|Select|Wrap|Line Numbers
  1.  
  2. function multiuser()    {
  3.         document.frmOpenInteraction1.Create.disabled=true;
  4.         document.frmOpenInteraction1.hidmultiuser.value="Yes";
  5.  
  6.         var r = window.open('popup.htm','NEW',
  7.             'dialogWidth:400px;dialogHeight:155px;dialogLeft:200px;center:1;help: no; resizable: no; status: no; scroll: no;');
  8.             window.document.frmOpenInteraction1.ticket[0].checked=false;
  9.             window.document.frmOpenInteraction1.Create.disabled=false;
  10.         }
  11.  

Well, i am still a novice, started learning on html, so please excuse if it's wrong.
Dec 12 '07 #5
gits
5,390 Expert Mod 4TB
hi ...

when you want to use the window.open() method you should use it like the following way:

Expand|Select|Wrap|Line Numbers
  1. window.open(
  2.     'http://www.google.de', 
  3.     'NEW', 
  4.     'height=155px,width=200px,menubar=no,location=no,' + 
  5.     'resizable=no,scrollbars=no,status=no'
  6. );
  7.  
kind regards
Dec 12 '07 #6

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

Similar topics

3
by: Kannan | last post by:
Hello, I have a requirement that specifies that I display a "Please Wait..." window (preferably modal) along with a gif that mimics a progress bar during a save operation. The dialog needs to be...
2
by: Kai Grossjohann | last post by:
The following HTML file invoker.html creates a modal dialog: <html><head> <script language="JavaScript"> function popup() { window.showModalDialog("main.html", null,...
1
by: Alex | last post by:
Sorry for the basic questions; just starting with ASP.NET I am using an HTML button to open another modeless dialog window: <INPUT style="FONT-WEIGHT: bold; Z-INDEX: 119; LEFT: 48px; WIDTH:...
2
by: Rez | last post by:
Hi Guys, I have a problem with exporting to excel from a modal dialog box. Basically, i have an ASPX page that gathers user criteria, and passes it to a dialogbox (showModalDialog), There is a...
2
by: et | last post by:
I want to use a url link link to another page, opening up a second window, no problem. Isn't there a way to control the size of that second window, so it looks more like a popup, and doesn't cover...
5
matheussousuke
by: matheussousuke | last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails. The goal is: Make it send the email with the URL...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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...

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.