Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

[ic] mv_check from Image



(I'm not English so you may find some errors in this text)

Some time ago, someone asked how to set the mv_check variable from a image,
i also needed this and i waited to see if someone answered, but no one did,
so i tried and tried and finally got something that works, and here it
is, if someone is interested (uses javascript).

------------------------------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>mv_check or any other from Image</TITLE>

<script type="text/javascript">
function submitform(form, submi) {
  form.submitter_val.value = submi;
  form.submit();
}
</script>

</HEAD>
<BODY>

<FORM NAME="elform" ACTION="[process-target]" METHOD="post">
  <INPUT TYPE="hidden" NAME="mv_todo"        VALUE="return">
  <INPUT TYPE="hidden" NAME="mv_nextpage"    VALUE="po_edit">
  <INPUT TYPE="hidden" NAME="mv_check"       VALUE="submitter">
  <INPUT TYPE="hidden" NAME="submitter_val"  VALUE="">

  ....

  <INPUT TYPE="image" SRC="img/but/p_enviar.gif" BORDER="0"
  onClick="submitform(this.form, 'Do_A')">

  <INPUT TYPE="image" SRC="img/but/p_enviar.gif" BORDER="0"
  onClick="submitform(this.form, 'Do_B')">
</FORM>

</BODY> </HTML>

[SET submitter]

  [if value submitter_val eq "Do_A"]
    Whathever you want
  [/if]

  [if value submitter_val eq "Do_B"]
    Whathever you need
  [/if]

[/SET]

------------------------------------

As you can see, mv_check is set to submitter, and the
javascript routine sets the hidden variable
submitter_val, so the choosen block will be
executed.

Fèlix (Felix in 7 bits)

_______________________________________________
Interchange-users mailing list
Interchange-users@lists.akopia.com
http://lists.akopia.com/mailman/listinfo/interchange-users


Search for: Match: Format: Sort by: