tcl-websh-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ronnie Brunner <ronnie.brun...@netcetera.ch>
Subject Re: In websh,How can I set a button handler....
Date Fri, 03 Mar 2006 07:26:12 GMT
Hi again

>       I am a basic of Websh,Please help me.
>       I Use Websh to write a HTML page, when I do a Button like this:
>      <input type=button onClick="...">
>      
>      Question:
>       How can i Capture the Event when Click the Button?
>        a proc?
>        a web::command ?
>        how to write it?

Remeber that Websh is on the server side and JvaScript runs on the
client. So the only way to catch a JavaScript Event is when you send a
request to the server, which in the easiest case you do in JavaScript by 

	document.location.href = aURLVariable;

or similar (Some AJAX call or whatever).

procs and web::comand come only into play once you get a request on
the server. There you have a Websh script that takes the request and
sends a response.

(My guess is that you want to mix Websh and JS no the client side,
which is not possible.)

hth
Ronnie
--
Ronnie Brunner | ronnie.brunner@netcetera.ch
phone +41 (0)44 247 79 79 | fax +41 (0)44 247 70 75
Netcetera AG | 8040 Z├╝rich | Switzerland | http://netcetera.ch

---------------------------------------------------------------------
To unsubscribe, e-mail: websh-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-dev-help@tcl.apache.org


Mime
View raw message