- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
10-31-2016 06:58 AM
Hello everybody,
currently I want to implement the Privacy Manager Extension (see https://community.tealiumiq.com/t5/Tealium-iQ-Tag-Management/Privacy-Manager-Extension/ta-p/13624), but I realized a problem with the rendered button on our ASP.NET WebForms site.
As the rendered button has no type-attribute, browser do handle it as a type=submit button. ASP.NET WebForms sites have automatically a form-tag around the content. This makes the button submitting the site, when you click on it instead of opening the privacy options in a popup.
I don't want to hack the button and stop this behaviour on my own with javascript, so my question is, if it is possible to give this button somehow a type=button attribut, so that it will work on WebForms sites. Maybe Tealium can change this as there should be no problems giving the button the type=button attribute.
Thanks for a reply!
Best regards,
Steven
10-31-2016 10:17 AM - edited 11-01-2016 09:29 AM
Instead of Tealium placing a button on the page, you could launch the privacy manager modal directly with an 'onclick'.
Sample below, please update the account, profile and also environment to dev, qa and prod accordingly.
onclick="javascript: (function () {if (typeof __tealiumMo2Div == 'undefined') {__tealiumMo2Div = document.createElement('SCRIPT');__tealiumMo2Div.type = 'text/javascript';__tealiumMo2Div.src='//tags.tiqcdn.com/utag/account/profile/qa/utag.tagsOptOut.js?cb='+Math.random();document.getElementsByTagName('head')[0].appendChild(__tealiumMo2Div);}else{__tealium.load();}})();"
You could place your own button, or link and use this to load the modal. Let me know if this a a workable option for you?
11-03-2016 01:43 AM
hello @robert_sabec,
thanks for your help! ;)
your solution will work, but if in future something (e.g. the name of the javascript) will change, we will not recognize that and the popup will not work any longer.
is your solution a official recommendation of tealium for asp.net sites??
best regards,
steven
Copyright All Rights Reserved © 2008-2023