Closed Bug 324814 Opened 19 years ago Closed 19 years ago

Firefox 1.5 is appending a full URL to relative URLs in the document.form.action value

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 324801

People

(Reporter: ccrandall77, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5 We've noticed with Firefox 1.5 that our form.action values are getting a full URL appended to them instead of just using the relative URL in the form tag's action attribute. For example... <body ... onLoad="onLoadSubmit()"> <form action="Inbox" ...> function onLoadSubmit() { alert(document.form[0].action); } In Firefox 1.0.7, IE 6, Safari 1.3 & 2, and NS 7.x the alert box's text reads "Inbox". However, in Firefox 1.5 it's reading "http://localhost:9080/csp/CSPServlet/Inbox". This behavior breaks all sorts of JS code that is comparing the action value to a string. Here's a full example: <html> <head> <title>Action Test</title> <script language="JavaScript"> function onLoadSubmit() { alert(document.forms[0].action); } </script> </head> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="window.setTimeout('onLoadSubmit();', 3000);"> <p>Test page. An alert box with the action will be displayed in 3 seconds.</p> <form action="SmartBalanceProgress" method="post" name="SmartBalanceRQForm"> </form> </body> </html> Even loading this straight off the file system gives an alert text of "file:///C:\......SmartBalanceProgress" instead of just "SmartBalanceProgress". Reproducible: Always Steps to Reproduce: 1. Create an HTML page with a form tag whose action value is a relative URL. 2. Use a JavaScript function to read the document.form[0].action value. 3. Display that value. Actual Results: The alert will display a full URL (i.e. http://localhost:9080/csp/CSPServlet/Inbox). Expected Results: I'm expecting the alert box to contain the form tag's action value verbatim (i.e. Inbox).
*** This bug has been marked as a duplicate of 324802 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
*** This bug has been marked as a duplicate of 324801 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago19 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.