path : app/design/frontend/base/default/template/checkout/onepage/shipping_method/available.phtml
<span class="no-display"><input name="**bleep**() ?>" checked="checked" /></span> <?php else: ?> <input name="**bleep**()===$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"
Hello @Aveeva
You can do it based on element ID, instead of name:
document.getElementById("myBtn").addEventListener("click", function(){
document.getElementById("demo").innerHTML = "Hello World";
});
can't change name but you can have multiple classes to identify. Thanks