EasyUI Forum
October 16, 2025, 10:52:20 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: widgets creation with javascript  (Read 7264 times)
frankz
Newbie
*
Posts: 16


View Profile
« on: November 08, 2016, 01:09:50 AM »

I have problems with the creation of widgets using javascript.
taking for example the linkbutton, with markdown mosta me icon, and with no javascript.
I copied verbatim the related tutorial code, let me know where I'm wrong.
you can have a code sample to set the properties, events and methods (I admit that I'm ignorant on the use of javascript)?
thanks for help
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: November 08, 2016, 08:53:38 PM »

You can create any components with javascript. The code below shows how to create a linkbutton.
Code:
<a id="btn1" href="#"></a>
<script>
$(function(){
$('#btn1').linkbutton({
text: 'Button',
iconCls: 'icon-help',
onClick: function(){
//...
}
})
})
</script>
Logged
frankz
Newbie
*
Posts: 16


View Profile
« Reply #2 on: November 09, 2016, 02:56:18 AM »

OK, it works.
now I understand where wrong.
thank you
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!