[TYPO3-shop] Problems when form is submitted by javascript

Joachim Rosskopf rosskopf at progroup-inc.com
Wed Sep 13 12:06:04 CEST 2006


Hello Franz,

thank you for further advice.
But the result is still the same.

<snip>
<tr>
	<td colspan=6><img src="clear.gif" width=1 height=5></td>
</tr>
<tr>
	<td colspan=6>
         <input type="checkbox" id="agbSelected"><font 
size="2"><b> AGB/ 			Rückgabebelehrung akzeptieren</b></font>
	</td>
</tr>
<tr>
	<td colspan=6><img src="clear.gif" width=1 height=10></td>
</tr>
<tr>
	<td colspan=6><img src="clear.gif" width=1 height=10></td>
</tr>
</TABLE>
<script tpye="text/javascript">
function checkAgb() {
         var box  = document.getElementById("agbSelected");
         var form = document.getElementById("mainForm");
         if (box == null || form == null) {
                 alert("Can´t find checkbox or form!");

                 return false;
         }
         if (box.checked) {
                 //document.forms[0].action='###FORM_URL_THANKS###';
                 //document.forms[0].target='###FORM_URL_TARGET###';
                 //document.forms[0].submit();
                 form.action='###FORM_URL_THANKS###';
                 form.target='###FORM_URL_TARGET###';
                 form.submit();

                 return true;
         } else {
                 alert("Achtung: Bevor die Bestellung ...");

                 return false;
         }
}
</script>
<br>
<FORM id="mainForm" method="post" action="###FORM_URL###">

<input type="Submit" name="products_update" value="Zurück zum 
Warenkorb">&nbsp;&nbsp;   <input type="Button" name="products_finalize" 
value="Bestellvorgang abschliessen!" onClick="return checkAgb();">

</FORM>

</snip>

Sorry to bother you again! How Typo3 determines the state or the next 
page in pageflow? Can there something be wrong?

Regards.
---
Joachim


Franz Holzinger wrote:
> onClick="return checkAgb();"
> 



More information about the TYPO3-project-tt-products mailing list