POP up triggered by a click

By : rihab
Source: Stackoverflow.com

I am trying to open a popup by clicking on a button. Please check my below code and tell me why it isn't working. I am using getreponse popup


<!doctype html>
<html lang="en">    
    <meta charset="utf-8">    
    <button id="button" >Show it</button>   
    <script type="text/javascript" src="https://app.getresponse.com/view_webform_v2.js?u=BaAuE&webforms_id=7152504">{    
  "name": "myuniqueform2"       
      var myform = GRWF2.get('myuniqueform2'),   
          element = document.getElementById('button');   
      element.addEventListener("click", function(){          
By : rihab


On your website, something has put <p>...</p> tags around every line of your script.

<p><script type="text/javascript" src="https://app.getresponse.com/view_webform_v2.js?u=BaAuE&#038;webforms_id=7152504">{</p>
<p>"name": "myuniqueform2"   </p>
<p>}   </p>
<p></script>   </p>
<p><script>     </p>
<p>var myform = GRWF2.get('myuniqueform2'),</p>
<p>element = document.getElementById('button');</p>
<p>element.addEventListener("click", function(){       </p>
<p>myform.show();     </p>
<p>});   </p>
<p></script> </p>

Those are causing parse errors. Get rid of them.

I have no idea how you did this -- I suspect you edited the code with a word processor and then told it to export to HTML.

By : Barmar

the problem is caused because you have not given the super user permission to the system. in order to make any changes into the system you should go to super user mode, for that you have to type the code as

sudo pip install virtualenv

it will help you out

This video can help you solving your question :)
By: admin