JavaScript is not running in Mozila Firefox, only runs in IE
<script language="JavaScript">
function del_rcd(param)
{
if(confirm("Do you really want to delete it"))
{
window.location = 'controller/del_task_ctl.php?param='+param;
}
}
</script>
<script language="javascript">
function popup(id)
{
window.open("detail.php?tid="+id, "Preview","width=600,height开发者_如何学运维=500,scrollbars=yes");
}
</script>
<script language="javascript">
function popupcomp(id)
{
window.open("edit_task.php?tid="+id, "Preview","width=600,height=500,scrollbars=yes");
}
</script>
<script language="javascript">
function popupclose(id)
{
window.open("close.php?qid="+id, "Preview","width=600,height=500,scrollbars=yes");
}
</script>
Is JavaScript disabled in Firefox?
Just as a side-note. The "language" attribute is quite obsolete (See point 7). Instead write
<script type="text/javascript">
</script>
I just made this quick test under OSX Firefox and it just works:
<html>
<head>
<script type="text/javascript">
function del_rcd(param){
if(confirm("Do you really want to delete it"))
{
window.location = 'controller/del_task_ctl.php?param='+param;
}
}
function popup(id)
{
window.open("detail.php?tid="+id, "Preview","width=600,height=500,scrollbars=yes");
}
function popupcomp(id)
{
window.open("edit_task.php?tid="+id, "Preview","width=600,height=500,scrollbars=yes");
}
function popupclose(id)
{
window.open("close.php?qid="+id, "Preview","width=600,height=500,scrollbars=yes");
}
</script>
</head>
<body>
<input type="submit" Text="Click me" onclick="del_rcd('test')"/>
</body>
</html>
Additionally what I always recommend web devs is to install Firebug and optionally PageSpeed. This is a must especially when you deal with JavaScript. Firebug automatically shows you syntax or JavaScript runtime errors.
I am submitting a form to this script by calling these js function but submit button only works in IE and on all other browsers Submit button is not working
精彩评论