0

Invoking own Javascript Methods

asked 2010-08-25 08:51:44 +0800

moloch gravatar image moloch
606 1 13

Hello,
i try to invoke my own Javascript Methods like this:


	public void onClick$GetID_Btn(Event event)  {
		
		try {
			this.test.invoke("GetID()");
			
		} catch (Exception e) {
			e.printStackTrace();
		}
		
	}


But i didnt know how to import my.js file where the method GetID is defined. Should anybody tell me how to do that?

greets

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2010-08-26 01:23:46 +0800

zero5 gravatar image zero5
75

You might want to take a look at Client Side Programming first.

link publish delete flag offensive edit

answered 2010-08-26 02:08:42 +0800

moloch gravatar image moloch
606 1 13

hello Zero5, i will do this.

but i would think that it is a short answer:

within a jsp it works fine like this and i just want to do the same with a zul page. The Function GetID is in my.js:

<script type="text/javascript" src="scripts/my.js"></script>

<input type="button" value="get publickey"	onclick="GetID()" />

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: 2010-08-25 08:51:44 +0800

Seen: 233 times

Last updated: Aug 26 '10

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