[Dojo-interest] formNode in dojo.io.bind() problem for Internet
Explorer
Harry Ng
harryworld at gmail.com
Thu Feb 1 08:13:39 MST 2007
I tried to use <input type="submit">, but it didn't help. The following is my
code.
My javascript function:
----------------------------------------------------------------------------------------
submitUser = function() {
var submitButton = dojo.byId("submitButton");
submitButton.disabled = true;
// Use dojo.io.bind() for remoting
dojo.io.bind({
// URL - destination you want to send your request
url: "validate",
formNode: dojo.byId("userForm"),
method: "POST",
// Callback function that will be invoked asynchronously
load: function(type, data, evt){ processSubmit(data);},
// Error handler function that will be invoked in case of an
error
error: function(type, error){ alert("error"); },
// Backward and forward button handling
backButton: function() { alert("back button pressed"); },
forwardButton: function() { alert("forward button pressed");},
// Type of data you want to receive
mimetype: "text/xml"
});
}
----------------------------------------------------------------------------------------
My form is something like this:
----------------------------------------------------------------------------------------
<form id="userForm" method="post" action="">
<input id="fAction" name="action" type="hidden" value="<%=
user==null?"create":"update" %>"/>
<input id="id" name="id" type="hidden" />
<table>
<thead>
<tr>
<td colspan="2"><strong>Add a user</strong></td>
</tr>
</thead>
<tr>
<td width="35%">User ID</td>
<td><input id="fUserId" name="loginName" type="text" value='<%=
user==null?"":user.getLoginName() %>' <%= user==null?"":"disabled" %>/></td>
</tr>
...
...
<tr>
<td>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input id="submitButton" type="button" value="<%= user==null?"Create
User":"Modify" %>" onclick="submitUser()"/>
<input type="button" value="Cancel" onclick="goBack();"/>
</td>
</tr>
</table>
</form>
----------------------------------------------------------------------------------------
Harry
MattRob wrote:
>
>
>
> Harry Ng wrote:
>>
>> I'm just reporting what I faced currently.
>>
>> I tried to use dojo.io.bind() with the element formNode for the ajax
>> connection. This works fine with Firefox, but I got problem in IE. Here
>> is
>> my code:
>>
> Harry, I'm pretty new to this but I've had the same problem can you post
> the HTML for you input / submit button. I believe if you are using <input
> type="button" > That doesn't work in IE?? Try <input type="submit">
>
>
--
View this message in context: http://www.nabble.com/formNode-in-dojo.io.bind%28%29-problem-for-Internet-Explorer-tf3153673.html#a8749954
Sent from the Dojo mailing list archive at Nabble.com.
More information about the Dojo-interest
mailing list