Skip to main content
fixing spelling typo
Link

Call Javascript funktionfunction in Magento Form

added 84 characters in body
Source Link

I have a Form in my Admin view with a small output "console". I want to update the content of the Console, while the form is submitted.

So here's my outputform.phtml:

getUrl('*/*/post')?>" enctype="multipart/form-data"> getFormKey() ?>" />

Senden

 <div class="entry-edit">
    <form id="edit_form" name="edit_form" method="post" action="<?=$this->getUrl('*/*/post')?>" enctype="multipart/form-data">
        <input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />

<input name="data" type="file" id="upload" value="UploadData"  accept="text/csv" />

<button onclick="check()" class="scalable save" type="button"><span> Send</span></button>





<!----- Output  Console ------------------->
<div style="height:130px; width:500px;overflow-x:hidden; overflow-y:auto;">
<table style="width:100%;" border="0" cellspacing="1" cellpadding="2"  name="faultOutput">
</table>
</div>
</form>
</div>

so after my form is submitted, the postAction() Method is called in my Controller.php file.

public function postAction() { $post = $this->getRequest()->getPost(); try { if (empty($post)) { Mage::throwException($this->__('Invalid form data.')); } catch(){} .............. }

 public function postAction()
    {
        $post = $this->getRequest()->getPost();
        try {
            if (empty($post)) {
                Mage::throwException($this->__('Invalid form data.'));
            }
           catch(){}
         ..............
    }

Now i want to update the outputconsole of my outputform.phtml by calling a javascript function within the file. But how can i call it within the postAction() php method?

Thanks in advance

I have a Form in my Admin view with a small output "console". I want to update the content of the Console, while the form is submitted.

So here's my outputform.phtml:

getUrl('*/*/post')?>" enctype="multipart/form-data"> getFormKey() ?>" />

Senden

so after my form is submitted, the postAction() Method is called in my Controller.php file.

public function postAction() { $post = $this->getRequest()->getPost(); try { if (empty($post)) { Mage::throwException($this->__('Invalid form data.')); } catch(){} .............. }

Now i want to update the outputconsole of my outputform.phtml by calling a javascript function within the file. But how can i call it within the postAction() php method?

Thanks in advance

I have a Form in my Admin view with a small output "console". I want to update the content of the Console, while the form is submitted.

So here's my outputform.phtml:

 <div class="entry-edit">
    <form id="edit_form" name="edit_form" method="post" action="<?=$this->getUrl('*/*/post')?>" enctype="multipart/form-data">
        <input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />

<input name="data" type="file" id="upload" value="UploadData"  accept="text/csv" />

<button onclick="check()" class="scalable save" type="button"><span> Send</span></button>





<!----- Output  Console ------------------->
<div style="height:130px; width:500px;overflow-x:hidden; overflow-y:auto;">
<table style="width:100%;" border="0" cellspacing="1" cellpadding="2"  name="faultOutput">
</table>
</div>
</form>
</div>

so after my form is submitted, the postAction() Method is called in my Controller.php file.

 public function postAction()
    {
        $post = $this->getRequest()->getPost();
        try {
            if (empty($post)) {
                Mage::throwException($this->__('Invalid form data.'));
            }
           catch(){}
         ..............
    }

Now i want to update the outputconsole of my outputform.phtml by calling a javascript function within the file. But how can i call it within the postAction() php method?

Thanks in advance

Source Link

Call Javascript funktion in Magento Form

I have a Form in my Admin view with a small output "console". I want to update the content of the Console, while the form is submitted.

So here's my outputform.phtml:

getUrl('*/*/post')?>" enctype="multipart/form-data"> getFormKey() ?>" />

Senden

so after my form is submitted, the postAction() Method is called in my Controller.php file.

public function postAction() { $post = $this->getRequest()->getPost(); try { if (empty($post)) { Mage::throwException($this->__('Invalid form data.')); } catch(){} .............. }

Now i want to update the outputconsole of my outputform.phtml by calling a javascript function within the file. But how can i call it within the postAction() php method?

Thanks in advance