EasyUI Forum
May 15, 2024, 02:56:32 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: textbox cannot load data if created by textarea  (Read 20786 times)
wade.zhu
Newbie
*
Posts: 27


View Profile
« on: August 05, 2014, 01:54:07 AM »

does textbox only support created by <input>?
if markup tag is textarea, form data cannot be loaded into the textbox, is this planed?
Code:
<form id="ff" method="post">
    <table cellpadding="5">
<tr>
    <td>Name:</td>
    <td><input class="easyui-textbox" type="text" name="name" data-options="required:true"></input></td>
</tr>
<tr>
    <td>Message:</td>
    <td><input class="easyui-textbox" name="message" data-options="multiline:true" style="height:60px"></input></td>
</tr>
    </table>
</form>
<script>
function loadLocal(){
    $('#ff').form('load',{
name:'myname',
message:'message'
    });
}
</script>
Logged
hjzhbb7758
Jr. Member
**
Posts: 84


View Profile Email
« Reply #1 on: August 05, 2014, 10:29:41 PM »

少年,我表示可以load
Logged
wade.zhu
Newbie
*
Posts: 27


View Profile
« Reply #2 on: August 06, 2014, 01:39:43 AM »

if change property 'message' tag from <input> to <textarea>, form data will not load successfully,
i track the code, found the jq selector is:

var f=$(_4b7).find("input["+p+"Name=\""+name+"\"]");

textarea does not match the selector

Code:
<textarea class="easyui-textbox" name="message" data-options="multiline:true" style="height:60px"></textarea>
Logged
hjzhbb7758
Jr. Member
**
Posts: 84


View Profile Email
« Reply #3 on: August 06, 2014, 03:53:52 AM »

我表示在 easyui.min 6619 line 。check your code,Please
Logged
hjzhbb7758
Jr. Member
**
Posts: 84


View Profile Email
« Reply #4 on: August 06, 2014, 03:56:14 AM »

建议你使用这种方式 


<input class="easyui-textbox" data-options="multiline:true" value="This TextBox will allow the user to enter multiple lines of text." style="width:300px;height:100px">
Logged
wade.zhu
Newbie
*
Posts: 27


View Profile
« Reply #5 on: August 06, 2014, 05:58:54 PM »

line 6619 is setting the value into the hidden control
line 6635 is setting the display text

i have lots of textarea in my project, it works well before v1.4
it will be a hard work to change all the textarea to input
so i changed the source code, and it works.

Code:
var f=$(_4b7).find("input["+p+"Name=\""+name+"\"]");
// ADD bugfix textarea textbox
if (!f.length) f=$(_4b7).find("textarea["+p+"Name=\""+name+"\"]");
// END ADD
Logged
hjzhbb7758
Jr. Member
**
Posts: 84


View Profile Email
« Reply #6 on: August 06, 2014, 07:58:34 PM »

used 1.4 easyui can be load textbox value.

please use this code

<input class="easyui-textbox" data-options="multiline:true" value="This TextBox will allow the user to enter multiple lines of text." style="width:300px;height:100px"> 
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!