Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#208 Problem if an input parameter is named action

1.3.0 (final)
closed-fixed
3
2006-01-11
2005-11-09
Anthony Goubard
No

If an input parameter of the function is named 'action'
the test form does not work.

IE executes the URL correctly but does not show the URL.

Firefox fails with
Not Found
The requested URL /wisi/[object HTMLInputElement] was
not found on this server.
And the URL shown is
[object
HTMLInputElement]?_function=SetIP&_convention=_xins-std&

Discussion

    • assigned_to: nobody --> agoubard
     
  • Logged In: YES
    user_id=987589

    Proposed solution:

    cvs -q diff -u function_to_html.xslt (in directory
    C:\projects\xins\src\xslt\testforms\)
    Index: function_to_html.xslt
    ===================================================================
    RCS file:
    /cvsroot/xins/xins/src/xslt/testforms/function_to_html.xslt,v
    retrieving revision 1.38
    diff -u -r1.38 function_to_html.xslt
    --- function_to_html.xslt 18 Oct 2005 13:00:16 -0000 1.38
    +++ function_to_html.xslt 9 Nov 2005 15:28:01 -0000
    @@ -194,6 +194,12 @@

    <xsl:variable name="isenum"
    select="not(starts-with($type, '_')) and
    boolean(document($type_file)/type/enum)" />

    + <xsl:variable name="name">
    + <xsl:choose>
    + <xsl:when test="@name = 'action'">_action</xsl:when>
    + <xsl:otherwise><xsl:value-of select="@name"
    /></xsl:otherwise>
    + </xsl:choose>
    + </xsl:variable>
    <!-- TODO: Deprecated parameters -->

    <tr>
    @@ -219,7 +225,7 @@
    <td class="value">
    <xsl:choose>
    <xsl:when test="$isenum">
    - <select name="{@name}">
    + <select name="{$name}">
    <xsl:attribute name="class">
    <xsl:choose>
    <xsl:when test="@required =
    'true'">required</xsl:when>
    @@ -235,14 +241,14 @@
    </select>
    </xsl:when>
    <xsl:when test="$type = '_boolean'">
    - <select name="{@name}">
    + <select name="{$name}">
    <option></option>
    <option value="true">true</option>
    <option value="false">false</option>
    </select>
    </xsl:when>
    <xsl:otherwise>
    - <input type="text" name="{@name}">
    + <input type="text" name="{$name}">
    <xsl:attribute name="class">
    <xsl:choose>
    <xsl:when test="@required =
    'true'">required</xsl:when>
    @@ -292,6 +298,9 @@
    continue;
    }

    + if (name == '_action') {
    + name = 'action';
    + }
    if (elems[i].type == 'text' || elems[i].type ==
    'hidden') {
    value = elems[i].value;
    } else if (elems[i].type == 'select-one') {

    ***** CVS exited normally with code 1 *****

     
  • Ernst de Haan
    Ernst de Haan
    2005-11-21

    • milestone: 412777 --> 1.3.0 (final)
     
    • status: open --> closed-fixed
     
  • Logged In: YES
    user_id=987589

    Fixed. Will be in 1.4.0-alpha3.