0

sending method to client

asked 2012-02-07 04:47:57 +0800

raviteja gravatar image raviteja
90

Hai Every one,

As i am new to zk i have one problem
i have one method which is written below and i have written this in method in Calendar Controller class which extends genericforward composer . Now I want to send it to the client.


private void execToolTipJScript(){
Script script = new Script();
String code = "setTimeout(function(){$('.z-calevent').each(function(){"+
"$('.z-calevent-resizer', this).remove();"+
"var timeSpan = $('.z-calevent-text', this).html();"+
"$('.z-calevent-header', this).html(timeSpan.substring(timeSpan.indexOf('<%#>')));"+
"var tooltip = $('.z-calevent-header', this).html() + ': ' + $('.z-calevent-text', this).html();"+
"$(this).attr('title', tooltip);"+
"});},100);";

script.setContent(code);
script.setPage(page);

}

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2012-02-14 08:53:36 +0800

jumperchen gravatar image jumperchen
3909 2 8
http://jumperchen.blogspo... ZK Team

You can use this method too. - Clients.evalJavaScript(String)

link publish delete flag offensive edit

answered 2012-02-15 04:28:38 +0800

raviteja gravatar image raviteja
90

Hi jumperchen,

thanks for sharing and can you explain me with the following method..............


private void execToolTipJScript(){
Script script = new Script();
String code = "setTimeout(function(){$('.z-calevent').each(function(){"+
"$('.z-calevent-resizer', this).remove();"+
"var timeSpan = $('.z-calevent-text', this).html();"+
"$('.z-calevent-header', this).html(timeSpan.substring(timeSpan.indexOf('<%#>')));"+
"var tooltip = $('.z-calevent-header', this).html() + ': ' + $('.z-calevent-text', this).html();"+
"$(this).attr('title', tooltip);"+
"});},100);";

script.setContent(code);
script.setPage(page);

}

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2012-02-07 04:47:57 +0800

Seen: 255 times

Last updated: Feb 15 '12

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More