EasyUI Forum
March 28, 2024, 03:23:06 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: Change Dialog Contents  (Read 13448 times)
jwilliquor
Newbie
*
Posts: 15


View Profile
« on: October 11, 2012, 10:33:15 AM »

I would like to change the contents of a dialog via a link button.  Is there a good way to change the contest of a dialog without closing the dialog and opening a new one?

Thanks
Justin
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: October 11, 2012, 05:29:35 PM »

The 'refresh' method can be used to change dialog content.
Code:
$('#dlg').dialog('refresh', 'new_content.html');
Logged
jwilliquor
Newbie
*
Posts: 15


View Profile
« Reply #2 on: October 11, 2012, 06:01:52 PM »

I had just figured out that if I do this behind my link it works the first time.

$('#winID4').panel('open').panel('refresh','/admin/inputs/transactionsinput.html?winID=winID4&action=first');

However when I run the same bit of code following my first refresh I get the following error in firebug

Timestamp: 10/11/2012 7:49:39 PM
Error: TypeError: $.data(_1a3, "panel") is undefined
Source File: http://test.mysite.com/public/js/jquery.easyui.min.js
Line: 2054

Am I doing something wrong?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: October 11, 2012, 06:20:30 PM »

If the $('#winID4') you defined is a dialog, you need to call dialog method not panel method.

Code:
$('#winID4').dialog('open').dialog('refresh','/admin/inputs/transactionsinput.html?winID=winID4&action=first');
Logged
jwilliquor
Newbie
*
Posts: 15


View Profile
« Reply #4 on: October 11, 2012, 06:28:08 PM »

Thanks that solved it!!!

Justin
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!