Skip to main content

Call Controller by Ajax in Magento Admin 1.9

<form action=" id="mass_forms">
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
<select id="mainStatus" onChange="getSubStatus()">
<option value=''>Select Status</option>
<?php
foreach($item_Status as $itemstatus){?>
<option value='<?php echo $itemstatus['id'] ?>'><?php echo $itemstatus['value'] ?></option>
<?php }
?>
</select>
</form>

////////////////////////////////////////////////////////////////////////////////
Script:
<script>



function getSubStatus(){
var posdata = jQuery("#mass_forms").serializeArray();
var url =  "<?php echo $this->getUrl('marketplaceadmin/adminhtml_orderview/getsubstaus');?>";
jQuery.ajax({
type: "POST",
url: url,
datatype: "text",
data: posdata,
success: function(data)
{

alert(data);
}
});


}

</script>
//////////////////////////////////////////////////////////////////////////
controller:
public function getsubstausAction(){
// $statusId=$this->getRequest()->getParam("statusId");
echo 'ankur';
}

Comments

Post a Comment

Popular posts from this blog

Parsing Domain Name From URL In PHP

To get Domain name from the url, we can use parse_url() php function. This would filter the domain name from the given url. $domain = str_ireplace ( 'www.' , '' , parse_url ( $url , PHP_URL_HOST )); This would return the google.com for both http://google.com and http://www.google.com

Trick to get Vaccine slot in India

  This will allow users to find available slots for COVID-19 vaccines in the centers around them. Steps: You should see the Vaccine Finder option. Alternatively, Android mobile phone users can tap on ‘All’ –> followed by the COVID-19 Vaccination Appointment banner Enter your pincode / district and choose between 18+ and 45+ age groups Select on Check Availability to proceed All available slots details will appear on your screen If there are no available slots, you can click on ‘Notify me when slots are available’ option to get alerts for open slots

Is covid virus really airborne?

  If airborne transmission is a significant factor in the pandemic, especially in crowded spaces with poor ventilation, the consequences for containment will be significant. How did the experts reach this conclusion? Reviewing existing research, the six experts from the UK, US and Canada identified 10 streams of evidence that collectively support the hypothesis that SARS-CoV-2 primarily transmits through the airborne route. 1. Super-spreading events account for substantial SARS-CoV-2 transmission. Indeed, the authors wrote, such events may be the  pandemic ’s primary drivers. Detailed analyses of human behaviours and other variables in concerts, cruise ships etc have shown patterns “consistent with airborne spread of SARS-CoV-2 that cannot be adequately explained by droplets or fomites”, they wrote. 2. Long-range transmission of SARS-CoV-2 between people in adjacent rooms has been documented in quarantine hotels, but never in each other’s presence. 3. Asymptomatic or pre-sympt...