Dynamic form action POST to results page - Joomla! Forum - community, help and support


hi, had created function modify form's action upon clicking on button. if post normally,

code: select all

<form action="results-page" method="post" enctype="multipart/form-data">
, work, not doing way.
this code:

code: select all

<script type="text/javascript">
function onsubmitform()
{
   if(document.pressed == "")
   {
      document.myform.action = "pdf-action";
   }
   else
   if(document.pressed == 'update')
   {
      var answer = confirm("confirm change of status confirmed shipped?.")
      if(answer){
         alert("order status updated. page refreshed.")
         document.myform.action = "delivery-option";
      }
      else{
         alert("order status unchanged. page refreshed.")
      }
      
   }
   return true;
}
</script>

when attempt press either of buttons, error 404 saying article not found. had created results page , linked appropriate page it. appreciated! thank you! =)






Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support