EasyUI Forum
September 14, 2025, 04:47:40 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / EasyUI for jQuery / Re: Actually submit forms on: September 29, 2015, 02:49:24 AM
Thanks for the code example.

I see now that I can do the validation myself, which is good.

Another issue I have found is that there seems to be no Return/Enter to submit for a form. That is mainly because EasyUI does not use an actual submit button for submitting forms, I assume. Is there a way around this or will I have to catch the return key myself and invoke the forms submit?
2  General Category / EasyUI for jQuery / Re: Center methods not available on: September 29, 2015, 02:39:22 AM
Okay, note to self: methods are really just parameters for another method and not an actual method. thanks for clearing that up.
3  General Category / EasyUI for jQuery / Re: callback between windows, help for sample code on: September 28, 2015, 04:58:24 AM
I don't quite understand your issue but seeing as nobody even tries to help you here's my two cents:

It makes no sense to me having to pass a method from a window to another. "Windows" are only DOM objects with extended functionality and methods can exist outside of them, so I don't understand why you would "pass a Window A method to Window B". To me it should look like this:

Code:
    <script type="text/javascript">
    <!--
      function DoSomething(param)
      {
        $("#data").text(param.val()); // "Cross window" action
      }
    -->
    </script>
  </head>
  <body>
    <div class="easyui-panel" style="position: relative; width: 100%; height: 650px; overflow: auto;">
      <div id="win_a" class="easyui-window" data-options="title:'Window A',inline:true,closable:false" style="width: 500px; height: 200px; padding: 10px">
        <div id="data">&nbsp;</div>
        <a href="javascript:void(0)" class="easyui-linkbutton" onclick="$('#win_b').window('open')">Edit</a>
      </div>
      <div id="win_b" class="easyui-window" data-options="title:'Window B',inline:true,closable:false,closed:true" style="width: 500px; height: 200px; padding: 10px">
        <input class="easyui-textbox" type="text" name="data_in" id="data_in" data-options="required:true"></input>
        <a href="javascript:void(0)" class="easyui-linkbutton" onclick="DoSomething($('#data_in')); $('#win_b').window('close')">Save</a>
      </div>
    </div>

the script holds the function that is being run when Window B is closed. So the workflow is

  • Window A is open by default
  • Press Button on Window A
  • Button opens Window B
  • Enter data in Window B
  • Press Button on Window B
  • Invoke (global) DoSomething() with the data field from Window B as parameter
  • Close Window B
  • DoSomething has updated a div on Window A to contain the value from the data field from Window B

What you defined in DoSomething will be executed when pressing the Button on Window B (the same code is usable for an OnClose event, however I haven't found any on EasyUI).

Again, I have no idea if this is even remotely close to what you were looking for. Please specify your problem a bit more so you can get more detailed help for your problem.
4  General Category / EasyUI for jQuery / Center methods not available on: September 28, 2015, 04:16:36 AM
Hello

I've found the method(s) for centering windows in the doc, where it says they are available from version 1.3.1 on. I am running version 1.4.3 and yet these methods are nowhere to be found.

Code:
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="$('#client_create').center();">Center window</a><br>
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="$('#client_create').window('close');">Close window</a>

<div id="client_create" class="easyui-window" data-options="title:'Create a client',inline:true,closable:false,iconCls:'icon-add'" style="width: 500px; height: 200px; padding: 10px">Test</div>

According to the documentation the center methods should be equally available as the window method that is being used to set certain properties. However the above example, where Close window works, Center window creates an error:

Quote
TypeError: $(...).center is not a function

So what's happening here!?

Thank you!
5  General Category / EasyUI for jQuery / Actually submit forms on: September 28, 2015, 04:00:38 AM
Hello

I can't seem to find a way to submit forms the normal way (you know; static POSTs). The only way I've found is by adding an actual submit input tag which then skips the whole form validation.

Asynchronous form POSTs are super annoying because they force you to soft-code the recovery path to the view instead of just having an URL for one result. It's just like infinite pages like the ones Youtube; it sucks horrible and results in the worst usability one could create with such modern tools at hand.

Please help me find a way to properly submit a form using the EasyUI validation and whatnots. The documentation does not contain a word about this, it's all about callbacks.

Thank you!
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!