0

How can I access widgets in a seperate javascript file

asked 2013-03-05 09:34:29 +0800

shenjie gravatar image shenjie
47 2

this is my zuml code:
<window>
<script type="text/javascript" src="control.js" defer="true"></script>
<div id="div2">div2</div>
</window>

how can get the widget whose id is div2,the zk Client-side Reference.pdf tells me that I can use zk.Widget.$('div2'),I have trid,but it returns null.

thanks for your help and sorry for my poor English

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2013-03-07 02:56:01 +0800

rdgrimes gravatar image rdgrimes
735 7

updated 2013-03-07 03:11:26 +0800

I think you need to try zk.Widget.$('$div2'). See link. See the $ documentation for Widget where it explains the difference between id and uuid.

link publish delete flag offensive edit

Comments

Thank you,it works

shenjie ( 2013-03-07 12:22:25 +0800 )edit

Glad to hear it. Please mark my answer as correct, and close out the question so it doesn't appear in the unanswered questions list. :-)

rdgrimes ( 2013-03-07 21:16:14 +0800 )edit
0

answered 2013-03-07 04:31:53 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

See this postZK Phone masking may be it will help you.

link publish delete flag offensive edit
Your answer
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
1 follower

RSS

Stats

Asked: 2013-03-05 09:34:29 +0800

Seen: 47 times

Last updated: Mar 07 '13

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