Closed Bug 293097 Opened 20 years ago Closed 20 years ago

"OnClick" event does nothing

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
major

Tracking

()

RESOLVED INVALID

People

(Reporter: rod.kelynack, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1

Have written a simple page to test the onlick event.

The page works when using IE but does nothing when using FireFox

Code here
---------------------------------------------------------------------
<html>
<head>
<title>button test</title>
<SCRIPT LANGUAGE="VBScript">
Sub DoIt
    Dim iReply
    iReply = msgbox("Do you wish to delete this record?",vbQuestion+vbYesNo,"Do It")
    If iReply = vbYes Then
       Set cb = document.MyForm.bAction
       cb.value = "delete"
       document.MyForm.Submit
    Else
       document.MyForm.Submit
    End If
End Sub
</SCRIPT>
</head>
<body>
<form name="MyForm" method="get" action="button2.htm">
<INPUT TYPE=HIDDEN NAME="bAction" VALUE="">
<br>
<INPUT TYPE=BUTTON NAME="bDelete" VALUE="Delete" ONCLICK="DoIt">
<br>
<INPUT TYPE=SUBMIT NAME="bSubmit" VALUE="Submit">
</form>
</body>
</html>
---------------------------------------------------------------------


Reproducible: Always

Steps to Reproduce:
1. Cut and paste the code into a page and open using either IE or FireFox
2. Click the "delete" button
3. Should see a msgbox (do when using IE but not when using FireFox)
4. Note: the "submit" button event works with no problems

Actual Results:  
Nothing happens! 

Expected Results:  
A pop-up message box should appear

Hopefully this is some sort of "application setting" problem otherwise I will
have to recommend my people not to use FireFox
Mozilla does not support running VBScript in web pages, that's Microsoft
specific. You should use the equivalent code in JavaScript to be compatible with
the majority of the web.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.