472,142 Members | 1,260 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,142 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 6307
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

Post your reply

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

Similar topics

3 posts views Thread by Kannan | last post: by
2 posts views Thread by Kai Grossjohann | last post: by
1 post views Thread by Alex | last post: by
2 posts views Thread by et | last post: by
reply views Thread by leo001 | last post: by

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.