Skip to Content
0
Nov 07, 2006 at 06:42 PM

Distinguish between different checkboxes/links in onInputProcessing

36 Views

Hi everybody,

I've got a form with two links and two checkboxes. I would like to trigger a serverside event handling when any of these elements is pressed. So I use Javascript: the page attribute 'navigate' is filled with different values on client side (document.view.navigate.value = action) and the form then sent by 'document.forms[0].submit();'.

<form name="view">

<a href="javascript:submit('select1');">

<a href="javascript:submit('select2');">

<INPUT TYPE="checkbox" NAME="cb1" VALUE="X" onclick="javascript:submit('upload1');">

<INPUT TYPE="checkbox" NAME="cb2" VALUE="X" onclick="javascript:submit('upload2');">

<input type="hidden" value="" NAME="navigate">

<input type="hidden" value="" NAME="OnInputProcessing(input>">

<endform>

<script>

function submit(action) {

document.view.navigate.value = action;

document.forms[0].submit();}

</script>

This works fine for the two links: 'navigate' is filled with either 'select1' or 'select2'. However 'navigate' is initial when I select one of the checkboxes.

Unfortunately I can't use 'htmlb:checkbox' in this project.

Can You help me there?

Best regards,

Markus