Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

showModalDialog in Firefox

Status
Not open for further replies.

mansii

Programmer
Joined
Oct 18, 2002
Messages
641
Location
ID
Dear experts,

I'm not sure the right forum to ask. I decided to put it here.

Clicking the button works fine in IE but NOT in Firefox. In a broader case my <script>s do not work in Firefox.

Any hints?

Code:
<button onclick="getUpload('frmUpload.cfm','upload')"><strong>Upload</strong></button>

<script>
function getUpload(sForm,uType){
var sURL = sForm;
sURL = sForm+'?uFolder='+uType;
var rst = showModalDialog(sURL, '', 'dialogWidth:600px; toolbar:0; dialogHeight:300px; status:0; resizable=0;');
if (rst == "Refresh"){window.location="../Mainpage"};
};
</script>

TIA
mansii
 
I see. Is there any substitutes for showModalDialog? Or perhaps you would lead me to another strategy for I need to evaluate the result of the dialog window.

Thank's Dan.

Regards,
mansii
 
There might be substitutes in some browsers, but not all. try searching on Google for "showModalDialog cross browser" or similar.

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
It's extremely difficult (if not impossible) to emulate the "modal" part of showModalDialog if a browser doesn't support it. If all you need is a pop-up, draggable window with a title bar and a close box that should not be intercepted by popup blockers, try the "Draggable layer" code from The Code Project. I've used it and it's pretty cool.

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top