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

RESOLVED DUPLICATE of bug 311573

Status

()

Firefox
General
RESOLVED DUPLICATE of bug 311573
12 years ago
12 years ago

People

(Reporter: Curt, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

12 years ago
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).
Some checkin in this list must have caused this:
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=PhoenixTinderbox&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2005-02-08+05%3A00%3A00&maxdate=2005-02-09+06%3A00%3A00&cvsroot=%2Fcvsroot

Comment 2

12 years ago
*** Bug 324814 has been marked as a duplicate of this bug. ***

Comment 3

12 years ago

*** This bug has been marked as a duplicate of 311573 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.