Any help will be appreciated.
<button type="button"
id="myBtn" class="btn btn-primary"
data-toggle="modal" data-target="#myModal"
onclick="notify({"IP": "0.0.0.0-255.255.255.255", "app_code": "", "custodian_email": "", "custodian_id": "", "custodian_name": ""})">
<i class="fab fa-telegram-plane" style="margin-right:5px"></i>
Notify
</button>
2
Answers
You’re using double quotes to delimit the
onclick
attribute value, and also to delimit the strings inside the attribute. That can’t be parsed, because the double quote beforeIP
ends the attribute. Use single quotes for one of them instead.You are using ” as closing and opening tag in the inner dict and in the function, just change
notify({"IP": "0.0.0.0-255.255.255.255", "app_code": "", "custodian_email": "", "custodian_id": "", "custodian_name": ""}
to:
notify({'IP': '0.0.0.0-255.255.255.255', 'app_code': '...'})