on 06-23-2010 3:53 PM
Hello guys -
i have a requirement that i have to call oninputprocessing event on "onchage" of one input filed.
I am doing some validation on itby using <bsp:findandreplace> but at the same time i want to call a server event on it
Any ideas?
thanks
Hari
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>
> Hi Bhavana -
>
> I had that javascript functionality already implemented.
>
> I want to trigger oninoutprocessing from javascript. is it possible?
>
> thanks
> Hari
Yes, that's possible. You can do it in two ways
1) directly from JS (not recommended)
function some_function(){
self.htmlbSL(this,2,'submit:doSubmit' ). "trigger the server event for current controller with Submit id and doSubmit action
}
2) make browser generate JS function for server event for you (recommended). For this use bsp:htmlbEvent . For detials refer documentation or [Thomas Jung answer|;.
I found the first one more useful as you can perform some checking before triggering the server event. The second approach is however less error-prone as the browser generates the JS function for you while page is rendered. Anyhow here you can't put your custom code. At least I was not able to.
Regards
Marcin
Hi Marcin -
I understood the second way ..and implemented.
But i didn't get first approach .(it would be easy for me since i am doing some validations in the javascript method .after validations i want call oninput processing. )
Can you give some code snippet. ( more detailed )
i want some thing like this. I am not using controller. i am using page with flow logic.
function myjsmethod()
{
do validation s
if ( validated )
{
call oninput processing event.
}
}
Thanks and appreciate your help.
Thanks
Hari
Edited by: Hari on Jun 24, 2010 8:34 AM
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.