EasyUI Forum
October 03, 2022, 06:26:06 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
  Home Help Search Login Register  
  Show Posts
Pages: 1 ... 12 13 [14] 15
196  General Category / EasyUI for jQuery / form onsubmit (param) clarification on: August 22, 2013, 01:10:10 PM
when using "onSubmit: function(param){" is param supposed to be pre-filled with the form data?  the documentation doesn't say either way.
197  General Category / General Discussion / Re: javascript in ajax loaded panel on: August 22, 2013, 12:05:41 PM
so this works:

var contentdata = '<div><form><select id="foo" class="easyui-combobox"><option value="x1">x1</option><option value="x">x</option></select></form></div>'
+ '<script>'
+ 'function content_onload() {'
+ '  $("#foo").combobox().combobox("select", "x");'
+ '}'
+ '<\/script>';
var centerpanel  = $('#mainlayout').layout('panel','center');

has to be some sort of timing issue.  maybe only related to Chrome, I haven't tested other browsers yet.
198  General Category / General Discussion / Re: javascript in ajax loaded panel on: August 22, 2013, 06:23:37 AM
hm.  this is certainly a lot simpler than my actual code.  I may try a redesign (i'm still very early in the process), then I'll make a mock up in a pubic place if I still have the issue.
199  General Category / General Discussion / Re: javascript in ajax loaded panel on: August 21, 2013, 07:15:38 PM
a string that contains mixed html and javascript sniplet, such as
<div><form><select id="foo" class="easyui-combobox">...</select></form></div>
$(function() {
  $('#foo').combobox('select', 'x');

no matter what the javascript is, if it uses jquery, I get the error the 2nd+ times contentdata is loaded in, but not the first time, even if is the exact same content.
200  General Category / General Discussion / Re: Chain Combo Inline editor (2) on: August 21, 2013, 02:01:24 PM
you might find the linked example in the documentation more clear.  it also shows the json format expected.  http://www.jeasyui.com/documentation/index.php#
201  General Category / General Discussion / javascript in ajax loaded panel on: August 21, 2013, 01:59:34 PM
I've got an ajax handler that validates a result and does this:
centerpanel = $('#mainlayout').layout('panel', 'center');
centerpanel.panel({ content: contentdata } );

contentdata sometimes has javascript in it, using $(function(){...}); to do some modifications to forms and such.  the first one like this loads and works correctly, the 2nd one causes the "$(function()" line to generate "Uncaught ReferenceError: $ is not defined" errors.  javascript functions in the same script block will still work though, it just doesn't like the initial jquery stuff. 

I've even tried modifying the code, the first $( always works, the 2nd+ always error, no matter what the code is.

I've done this before using jquery's .html() and the code always runs fun, but doing .html(contentdata); to a panel seems to turn the panel into a plain div.

is there a better way to handle the javascript blocks, or something I need to do to bless them?
202  General Category / Bug Report / Re: feature request: combobox defaults on: August 19, 2013, 02:05:13 PM
I understand how to override it.  I think it would benefit the project in general to make this the default behavior.
203  General Category / General Discussion / Re: center a panel in a layout region on: August 16, 2013, 07:35:19 AM
so style:{} doens't take css properties, it takes the javascript equivalent?
204  General Category / General Discussion / Re: center a panel in a layout region on: August 16, 2013, 05:50:35 AM
there's the trick!  thanks.

so for something like margin-top:0px I'd do style:{'margin-top':0} ? 
205  General Category / General Discussion / center a panel in a layout region on: August 15, 2013, 02:03:05 PM
I'm trying to get a panel centered inside a layout.  this was first try:
<div data-options="region:'center'">
    <div class="easyui-panel" title="Login" style="width:400px;margin:0 auto">some content</div>

using Chrome's inspector I see this gets parsed out to:
<div class="panel" style="display: block; width: 400px;">
    <div class="panel-header" style="width: 388px;">
        <div class="panel-title">Login</div>
        <div class="panel-tool"></div>
    <div class="easyui-panel panel-body" title="" style="width: 398px; margin: 0px auto; height: auto;">
some content</div>

putting the style on the panel-body and not copying it to the panel where it will actually do something. 

I also tried these:
data-options="style:{margin: 0 auto}"
data-options="style:{margin: 0px auto}"
data-options="style:{margin-top: 0;margin-right: auto}"
these all generate parsing errors on the console and leave me with only the original code rendered.

this one does not error, and puts the margin in the panel where it should be
data-options="style:{margin: 0}"
but since it's missing the margin-right, it doesn't do what I want.

before I attempt fixing the style parser, should I be doing this a different way?
206  General Category / General Discussion / Re: JavaScript callback on: August 15, 2013, 08:34:50 AM
that depends on what's happening inside those functions.  if they are async calls of some sort (ajax, timers) then you need to handle that somehow so that the function does not return until its work is complete.
207  General Category / General Discussion / Re: Malware Warning from Chrome on: August 15, 2013, 08:32:05 AM
seems to be better now?  I don't get a warning.
208  General Category / Bug Report / feature request: combobox defaults on: August 15, 2013, 08:02:56 AM
I'd like to request that the autocomplete feature default to case insensitive.  I feel it makes more sense in the way people expect these things to work.
209  General Category / Bug Report / Re: tabtools.html example issue on: August 15, 2013, 08:00:38 AM
looks like this has been corrected in 1.3.3
210  General Category / Bug Report / Re: Add tabs loading Iframe in IE6 error on: May 08, 2013, 01:17:47 PM
that doens't sound like a css issue, but a dynamic object model issue.  I'm not really sure how to debug that in IE6 directly.  these kinds of issues are why I've completely abandoned ie6.

if you're actually using ie8 but embded in a vb6 app so that it emulates ie6 by default, you can change that and relive a lot of headaches.  http://stackoverflow.com/questions/6717055/how-do-i-turn-off-compatibility-view-on-the-ie-webbrowsercontrol-in-a-winforms-a
Pages: 1 ... 12 13 [14] 15
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!