Need to save google analytics js code using textarea

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
Posts: 124

Need to save google analytics js code using textarea

Post by muttou »

Hi, i need to save google analytics code for my website using CMS functionality build though the phpmaker, When add the code in form field (text area) using script tags and code inside, it does not work and show blank value after add/edit

sample code below. any help & support will highly be obliged that how can save the JavaScript code though html forms. thank you for your response

\"<script type="text/javascript"> 

Posts: 11473

Post by mobhar »

That will be happened since it is protected to avoid XSS attack.

If you are sure you want to save the Javascript code for that field, then you may simply assign the Raw property of the filed to true.

For example, the field name is GoogleAnalytics, then you may put this code in Page_Load server event of the Add and/or Edit page:

$this->GoogleAnalytics->Raw = true;

then re-generate the script file, and try again.

Post Reply