Closed Bug 296699 Opened 20 years ago Closed 20 years ago

Bad example: javascript method click dos not work

Categories

(Toolkit :: Form Manager, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 36619

People

(Reporter: letneto, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

I call the click method on a botton element via javascript, but it does not work
in firefox. Only in IE, argh!

Reproducible: Always

Steps to Reproduce:
1. Make an html page like this:
<html>
<head>
<title>teste</title>
</head>
<body>

<form name="form1" action="a.txt" method="post">
<input type="file" name="f">
<input type="button" name="btn" value="ok"
onclick="javascript:document.forms[0].f.click();">
</form>

<body>
</html>

2.Test it on firefox


Actual Results:  
nothing, this is the problem

Expected Results:  
show a file-search box.
  onclick="javascript:document.forms[0].f.click();">

onclick allready calls javascript

so the line should be

  onclick="document.forms[0].f.click();">

which works in all browsers
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Luis Eufrasio <letneto@yahoo.com.br>

Why did you reopen this bug?
Try to create the simple page I've describe in the steps and
click on the OK button. The file-search box doesn't open.
(In reply to comment #3)
> Try to create the simple page I've describe in the steps and
> click on the OK button. The file-search box doesn't open.

Did you bother to read comment 1? Your syntax is invalid.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago20 years ago
Resolution: --- → INVALID
my bad, this is a valid bug , but a dupe
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---

*** This bug has been marked as a duplicate of 36619 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago20 years ago
Resolution: --- → DUPLICATE
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.