|
Title: no easyui-linkbutton? Post by: digo on June 27, 2012, 06:23:36 AM Hi!
I am using easyui-layout, content within div-region north comes from an ajax-request (e.g. ajax_north.php). ajax_north.php just sends: Code: <a href="#" id="ajaxLinkButtonID" class="easyui-linkbutton" iconCls="icon-adduser" plain="true" onclick="newUser()">Add new User</a> The problem: I just see a normal link - not a easyui-linkbutton. How can I create a "dynamic" easyui-linkbutton? Thanks! Ciao Digo Title: Re: no easyui-linkbutton? Post by: digo on June 28, 2012, 12:42:49 AM found a solution:
$.parser.parse(); Ciao Digo Title: Re: no easyui-linkbutton? Post by: digo on June 28, 2012, 04:29:06 AM ok, $.parser.parse(); seemed to be my solution, but...
I will have to go into more details: We have a div (id=TicketContent) and an ajax-request (the content end in TicketContent-div) Code: var ActID=11; returnHTML contains easyui-linkbutton, easyui-dialog (including a form and easyui-linkbutton): Code: <h1>I AM AJAX-CONTENT</h1> I added $.parser.parse(); right after the first ajax-call -everything is fine. I see the divs created by the parser (panel window, ...) at the end of html-source (Firebug) The problem: after the second ajax-call I see all the divs generated a second-time, after the third call you will find 3 divs with the exact same content, including same ids. Working example: http://www.elba.at/flicker2/jeasyui Content of ajax-request: http://www.elba.at/flicker2/jeasyui/index.php?SystemType=ajax press Button ajax-call press AJAX-Button Dialog --> no problem, works fine press Button ajax-call again press Button ajax-call again ... ... press Button ajax-call again press AJAX-Button Dialog --> buttons are gone and now use Firebug to see the generated html-source-code. Any suggestions? Ciao Digo Title: Re: no easyui-linkbutton? Post by: stworthy on June 28, 2012, 05:24:52 AM Define a panel and use the href property to load and auto parse components. Donnot need to call parse() method.
<div id="TicketContent" class="easyui-panel"/> To reload the content, call 'refresh' method of panel. $('#TicketContent').panel('refresh','index.php?ID=...‘); Title: Re: no easyui-linkbutton? Post by: digo on July 02, 2012, 06:31:54 AM Hi!
Thanks for your quick reply. I defined a panel and I am using $('#TicketContent').panel('refresh','index.php?ID=...‘); to load data. Strange thing: it seems to work now, but when you use Firebug you can see, that additional (ident.) code is still being added. example: http://www.elba.at/flicker2/jeasyui/ Thanks! Ciao Digo |