Opened 13 years ago

Closed 12 years ago

Last modified 9 years ago

#2509 closed defect (fixed)

Select widget: 'method.toLowerCase is not a function' error on FireFox

Reported by: drc@… Owned by: haysmark
Priority: high Milestone: 0.9
Component: Dijit - Form Version: 0.4.1
Keywords: Select Widget Cc:
Blocked By: Blocking:

Description

Environment: Firefox 1.5.0.10 browser running on Windows XP SP2 dojo-0.4.1-kitchen_sink served from red hat linux es 3/apache 2.0.46

Get the following error when executing dojo.io.bind as a result of click on Dojo "Button" shown below. Have determined the error is caused by the dojoType="Select" widgets in the form being submitted. Removing both "Select" widgets from the form causes everything to work properly. Detailed code enclosed below. NOTE: this failure does NOT occur on IE v 7

DEBUG: [TypeError: _659.method.toLowerCase is not a function, file: http://topaz.ppt.com:11035/js/dojo/dojo.js, line: 6832] when calling system_preferences_save$joinpoint$method on [object Window] with arguments [object Object] FATAL exception raised: _659.method.toLowerCase is not a function


. . .

<SCRIPT TYPE="text/javascript"> function system_preferences_callback(type,data,evt) {

}

function system_preferences_save() {

dojo.io.bind( {

url: '[% g.ACTION %]', mimetype: "text/json", handler: system_preferences_callback, formNode: dojo.byId('system/preferences/form')

});

}

function system_preferences_init() {

/* Call our Save handler when save button clicked */ var save = dojo.widget.byId('system/preferences/save'); dojo.event.connect(save, 'onClick', 'system_preferences_save');

}

dojo.addOnLoad(system_preferences_init); </SCRIPT>

. . .

<FORM ID="system/preferences/form" METHOD="GET">

<INPUT TYPE="hidden" NAME="handler" VALUE="form_system_preferences">

<TABLE CLASS="namevalue">

<TR>

<TD>

<SPAN CLASS="name">Debug Level:</SPAN> <SELECT ID="system/preferences/global_debug" NAME="debug" dojoType="Select">

<OPTION VALUE="0">0 (None)</OPTION> <OPTION VALUE="1">1 (Status)</OPTION> <OPTION VALUE="2">2</OPTION> <OPTION VALUE="3">3 (Debug)</OPTION> <OPTION VALUE="4">4 (Function)</OPTION> <OPTION VALUE="5">5</OPTION> <OPTION VALUE="6">6</OPTION> <OPTION VALUE="7">7</OPTION> <OPTION VALUE="8">8</OPTION> <OPTION VALUE="9">9 (Full)</OPTION>

</SELECT>

</TD>

</TR>

<TR>

<TD>

<SPAN CLASS="name">Value Passing Method:</SPAN> <SELECT ID="system/preferences/global_method" NAME="method" dojoType="Select">

<OPTION VALUE="GET">GET</OPTION> <OPTION VALUE="POST">POST</OPTION>

</SELECT>

</TD>

</TR>

<TR>

<TD>

<SPAN CLASS="name">Session Timeout:</SPAN> <INPUT

ID="system/preferences/global_sessionexpire" TYPE="text" NAME="sessionexpire" VALUE="[% g.global_sessionexpire %]" dojoType="IntegerTextbox?" onblur="system_preferences_change" min="1" required="true" signed="false" >

</TD>

</TR>

<TR>

<TD>

<TABLE>

<TR>

<TD>

<BUTTON ID="system/preferences/save" dojoType="Button">Save</BUTTON>

</TD> <TD>

<DIV ID="system/preferences/message" dojoType="ContentPane?"><SPAN CLASS="message"></SPAN></DIV>

</TD>

</TR>

</TABLE>

</TD>

</TR>

</TABLE>

</FORM>

Change History (3)

comment:1 Changed 12 years ago by bill

Component: WidgetsDijit
Milestone: 0.9
Owner: changed from bill to haysmark

Presumably fixed w/Select rewrite? Close if it's fixed.

comment:2 Changed 12 years ago by haysmark

Resolution: fixed
Status: newclosed

I remember this error. Fixed in 0.9.

comment:3 Changed 9 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.