替代Mozilla Firefox中的Showmodaldialog [英] Alternate for Showmodaldialog in mozilla firefox

查看:64
本文介绍了替代Mozilla Firefox中的Showmodaldialog的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。

我使用了showmodaldialog进行弹出窗口。它在IE中工作正常,但显示:错误:未定义showModalDialog

我经历了很多论坛,但没有得到满意的解决方案。


此外我不希望手动关闭弹出窗口。它会在显示的时间结束后自动关闭。


此功能正常运行IE但是如果有人可以帮我在Mozilla和其他浏览器中运行它,那就太棒了。


以下是我的代码:


[HTML] function getUpload(sForm){

{

var synclose = null;


while(synclose == null )

{

var sURL = sForm;

var rst = showModalDialog(sURL,'''',''dialogWidth:600px; toolbar :0; dialogHeight:300px; status:0; resizable = 0;'');

};

}

}

< / script>

< / head><?php

$ mode = 1;

if(b) $ mode == 1)

{

?>

< body onLoad =" getUpload(''syncpop.php'')"> < / body>


<?php

}

?>< / html>

[/ HTML]


//这是syncpop.php页面


[HTML]

< html>

< head>

< META HTTP-EQUIV = REFRESH CONTENT = 2>

< body>

<? $ mode = 1;

if($ mode == 1){?>

< script language =" javascript">

document.write(" Synchonizing,please wait ...");

< / script>

<? }

if($ mode == 0){?>

< script type =" text / javascript">

alert(''上次同步已成功完成'');

window.returnValue ="成功!!" ;;

window.close();

< / script>

<? }>< / body>

< / html> [/ HTML]


代码涉及一点点PHP但很难让差异......我只想要能解决上述目的的javascript函数。


谢谢和问候

TechnoAtif

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:600px; toolbar:0; dialogHeight:300px; status:0; resizable=0;'');
};
}
}
</script>
</head><?php
$mode=1;
if($mode==1)
{
?>
<body onLoad="getUpload(''syncpop.php'')"> </body>

<?php
}
?></html>
[/HTML]

//Here is the syncpop.php page

[HTML]
<html>
<head>
<META HTTP-EQUIV=REFRESH CONTENT=2>
<body>
<? $mode=1;
if ($mode==1){?>
<script language="javascript">
document.write("Synchonizing, please wait...");
</script>
<? }
if($mode==0){?>
<script type="text/javascript">
alert(''Last Synchronizaton completed successfully'');
window.returnValue = "Success!!";
window.close();
</script>
<? }?></body>
</html>[/HTML]

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
TechnoAtif

推荐答案

mode = 1;

if(
mode=1;
if(


mode == 1)

{

?>

< body onLoad =" getUpload(''syncpop.php'')"> < / body>


<?php

}

?>< / html>

[/ HTML]


//这是syncpop.php页面


[HTML]

< html>

< head>

< META HTTP-EQUIV = REFRESH CONTENT = 2>

< body>

<?
mode==1)
{
?>
<body onLoad="getUpload(''syncpop.php'')"> </body>

<?php
}
?></html>
[/HTML]

//Here is the syncpop.php page

[HTML]
<html>
<head>
<META HTTP-EQUIV=REFRESH CONTENT=2>
<body>
<?


mode = 1;

if(
mode=1;
if (


这篇关于替代Mozilla Firefox中的Showmodaldialog的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆