0
<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>
4
  • 1
    What is not running What do you see?
    – Shoban
    Jan 7, 2010 at 7:09
  • 2
    I see no code that will execute here... are you missing some of the sample code? Jan 7, 2010 at 7:09
  • 1
    What is not working? Why are you separating all these functions in different script tags?
    – rahul
    Jan 7, 2010 at 7:09
  • 1
    Why are you using HTML 3.2? (The type attribute become mandatory and the language attribute was deprecated a decade ago)
    – Quentin
    Jan 7, 2010 at 9:14

3 Answers 3

2

Is JavaScript disabled in Firefox?

1
  • Please enable your javascript in Firefox Jan 7, 2010 at 7:19
2

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.

0

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

2
  • In the future, please edit your original question instead of posting an answer. Thanks!
    – ZoogieZork
    Jan 7, 2010 at 7:26
  • 1
    Generally speaking you're lucky ;) Most people have the opposite problem: everything works on Webkit browsers and Firefox, but not under IE ;)
    – Juri
    Jan 7, 2010 at 7:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.