Magento 1.9 – How to declare two id or class name for single input field?

Magento 1 courier selection,

path : app/design/frontend/base/default/template/checkout/onepage/shipping_method/available.phtml

<span class="no-display"><input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>" checked="checked" /></span> <?php else: ?> <input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?> "<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio"/> 

The input field i need to declare another name for my popup message purpose i just declare script for same file location,

app/design/frontend/base/default/template/checkout/onepage/shipping_method/available.phtml

<script> document.addEventListener('click', function (event) { if (event.target.name === 'obtrusive-radio') { alert(event.target.value) } }) </script> 

I want to assign the name obtrusive-radio but input field already have a name like “shipping_method”

submitted by /u/aveeva7
[link] [comments]