pragmaMx Support Forum

pragmaMx => Coder und Bastlerecke => Thema gestartet von: lausbub am 13 März 2013, 08:31:23

Titel: Problem mit javascript submit
Beitrag von: lausbub am 13 März 2013, 08:31:23
Hallo, hab ein problem,
warum sendet das formular nicht?
blick es nicht.

oder gibts eine extra function im pragma?
wäre super wenn mir jemand weiter helfen könnte.


echo "          <td><form action=\"modules.php?name=test&amp;op=a\" method=\"post\" name=\"historie\">\n";
echo "&nbsp;\n";
echo "              <input name=\"historie_id\" type=\"hidden\" id=\"historie_id\" value=\"".$abfrage1['id']."\" />\n";
echo " <a href= javascript:document.historie.submit()>".mxPrepareToDisplay($abfrage1['id'])."</a> \n";       
echo "</form></td>\n";
Titel: Re:Problem mit javascript submit
Beitrag von: AlternativeComputing am 13 März 2013, 14:37:24

<form id="historie" action="modules.php?name=test&amp;op=a">
<input name="historie_id" type="hidden" id="historie_id" value="".$abfrage1['id']."" />
<A href="javascript: submitform()">".mxPrepareToDisplay($abfrage1['id'])."</A>
</form>

<!-- The function that submits the form-->
<script type="text/javascript">
function submitform()
{
    if(document.historie.onsubmit &&
    !document.historie.onsubmit())
    {
        return;
    }
document.historie.submit();
}
</script>


So sollte es beim js Submit aussehen, mußt es nur noch an die pmx Struktur anpassen.

Siehe auch: http://www.javascript-coder.com/javascript-form/javascript-form-submit.phtml