**i have finaly completed the javascript coding, but there seems to be an error "syntax tax, char:1, line:1", i cant figure out wat the problem is....
i have edited it so many times, but it still comes up with errors when excuting it..
HELP!!!!!!!

the following coding: @_@

<!DOCTYPE html>
<html>
<head>
</script>
</head>
<body>
<script language="JavaScript">
var _usersnapconfig = {
        valign: 'bottom',
        halign: 'right',
        tools: ["pen", "highlight", "note"],
        lang: 'en',
        commentBox: true,
        emailBox: true
}; 
(function() {
    var s = document.createElement('script');
    s.type = 'text/javascript';
    s.async = true;
    s.src = '//api.usersnap.com/load/YOUR-APIKEY-HERE.js';
    var x = document.getElementsByTagName('head')[0];
    x.appendChild(s);
})();
   <script type="text/javascript">
     var _usersnapconfig = {
         valign: 'bottom',
         halign: 'right'
     };


   <script type="text/javascript">
     var _usersnapconfig = {
         valign: 'bottom',
         halign: 'left'
     };


   <script type="text/javascript">
     var _usersnapconfig = {
         valign: 'middle',
         halign: 'right'
     };


  <script type="text/javascript">
     var _usersnapconfig = {
         valign: 'middle',
         halign: 'left'
     };

    <script type="text/javascript">
     var _usersnapconfig = {
         lang: 'en'
     };


   <script type="text/javascript">
     var _usersnapconfig = {
         btnText: 'Help?'
     };


   <script type="text/javascript">
     var _usersnapconfig = {
         tools: ['pen', 'blackout', 'note']
     };

<script type="text/javascript">
     var _usersnapconfig = {
         commentBox: true
     };

  <script type="text/javascript">
     var _usersnapconfig = {
         commentBox: true,
         commentBoxPlaceholder: 'Enter something special here.'
     };

   <script type="text/javascript">
     var _usersnapconfig = {
         commentBox: true,
         commentRequired: true
     };

   <script type="text/javascript">
     var _usersnapconfig = {
         emailBox: true
     };

  <script type="text/javascript">
     var _usersnapconfig = {
         emailBox: true,
         emailBoxPlaceholder: 'your company email address'
     };


  <script type="text/javascript">
     var _usersnapconfig = {
         emailBox: true,
         emailBoxValue: 'user@mycompany.com'
     };

  <script type="text/javascript">
     var _usersnapconfig = {
         emailBox: true,
         emailRequired: true
     };

  <script type="text/javascript">
     var _usersnapconfig = {
         emailBox: true,
         commentBox: true,
         commentBoxPlaceholder: 'Enter something special here.',
         emailBoxValue: 'user@mycompany.com'
     };


  <script type="text/javascript">
     var _usersnapconfig = {
         loadHandler: function() {
            alert('Usersnap widget now loaded!');
         }
     };

   <script type="text/javascript">
     var _usersnapconfig = {
         beforeOpen: function(obj) {
            UserSnap.setEmailBox('mail@example.com');
         }
     };

   <script type="text/javascript">
     var _usersnapconfig = {
         loadHandler: function() {
               UserSnap.on("beforeOpen",
                  function() {
                     UserSnap.setEmailBox('mail@example.com');
               });
         }
     };

 <script type="text/javascript">
     var _usersnapconfig = {
         beforeSend: function(obj) {
            obj.addInfo = 'Some User Information';
         }
     };


  <script type="text/javascript">
     var _usersnapconfig = {
         beforeSend: function(obj) {
            obj.addInfo = {
                companyName: 'Usersnap',
                username: 'Josef'
            };
         }
     };

   <script type="text/javascript">
     var _usersnapconfig = {
         loadHandler: function() {
               UserSnap.on("beforeSend",
                  function(obj) {
                     obj.addInfo = {
                        companyName: 'Usersnap',
                        username: 'Josef'
                    };
                  }
               });
         }
     };

   <script type="text/javascript">
     var _usersnapconfig = {
         afterSend: function(reportId) {
            console.log("My Report ID is: "+reportId);
         }
     };

 <script type="text/javascript">
     var _usersnapconfig = {
         loadHandler: function() {
             UserSnap.on("afterSend",
                 function(reportId) {
                     console.log("My Report ID is: "+reportId);
             });
         }
     };

    {
        "type": "cancel" // (or "resize")
    }

   <script type="text/javascript">
     var _usersnapconfig = {
         cancelHandler: function(typeObj) { 
            console.log("Report creation canceled: "+typeObj.type); 
         }
     };

  <script type="text/javascript">
     var _usersnapconfig = {
         loadHandler: function() {
               UserSnap.on("cancelHandler",
                  function(typeObj) {
                     console.log("Report creation cancelled: "+typeObj.type); 
               });
         }
     };

   <script type="text/javascript">
     var _usersnapconfig = {
         errorHandler: function(errorMessage, errorCode) { 
            console.log("Error Code: " + errorCode);
            console.log("Error Message: " + errorMessage); 
         }
     };

   <script type="text/javascript">
     var _usersnapconfig = {
         loadHandler: function() {
            UserSnap.on("errorHandler",
               function(errorMessage, errorCode) {
                 console.log("Error Code: " + errorCode);
                 console.log("Error Message: " + errorMessage);  
            });
         }
     };

  <script type="text/javascript">
     var _usersnapconfig = {
         mode: 'report'
     };

  <script type="text/javascript">
     var _usersnapconfig = {
         shortcut: true
     };


  <script type="text/javascript">
     var _usersnapconfig = {
         mode: 'report',
         shortcut: true
     };

   <script type="text/javascript">
     var _usersnapconfig = {
         hideTour: true
     };

</body>
</script>
</html> 

There are too many errors in the code that you posted and too little of the complete code for the page for anyone to be able to help you.

Usersnap might be too complex for you to use until you gain more experience in creating webpages with JavaScript. Tell us what you're doing and why you're using Usersnap, and maybe someone here can help you.

commented: Thanks :) +0

Hey qudsiyah.sherrief,
Bogo here from Usersnap team. What are you trying to do?

In order to get the widget working you need to embed just this one in your page:

<script type="text/javascript">
    (function() {
        var s = document.createElement('script');
        s.type = 'text/javascript';
        s.async = true;
        s.src = '//api.usersnap.com/load/YOUR-APIKEY-HERE.js';
        var x = document.getElementsByTagName('head')[0];
        x.appendChild(s);
    })();
</script>

Of course you need to replace YOUR-APIKEY-HERE with your own key, available on your dashboard.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.