User Tools

Site Tools


contact_widgets

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
contact_widgets [2011/11/29 23:50]
kevin
contact_widgets [2022/03/12 00:03]
kevin
Line 1: Line 1:
 +
 ======Purpose======= ======Purpose=======
  
Line 10: Line 11:
  
 Paste the following code just before the </​head>​ tag on your site.  **You will need to replace WWW.YOURSITEHERE.COM with the URL of your Real Geeks site**.: Paste the following code just before the </​head>​ tag on your site.  **You will need to replace WWW.YOURSITEHERE.COM with the URL of your Real Geeks site**.:
-<code html> + 
-    <script type="​text/​javascript">​ + 
-        var _rgq = _rgq || []; +  ​<script type="​text/​javascript">​ 
-        _rgq.push(['​_setDomain','​WWW.YOURSITEHERE.COM'​]);​ +    var _rgq = _rgq || []; 
-        (function() { +    ​_rgq.push(['​_setSecure',​ true]); 
-           ​var rg = document.createElement('​script'​);​ rg.type = '​text/​javascript';​ rg.async = true; +    ​_rgq.push(['​_setDomain','​WWW.YOURSITEHERE.COM'​]);​ 
-           ​rg.src = 'http://​widgets.realgeeks.com/​static/​js/​rg.js';​ +    (function() { 
-           ​var s = document.getElementsByTagName('​script'​)[0];​ s.parentNode.insertBefore(rg,​ s); +       ​var rg = document.createElement('​script'​);​ rg.type = '​text/​javascript';​ rg.async = true; 
-         ​})(); +       ​rg.src = '//​widgets.realgeeks.com/​static/​js/​rg.min.js';​ 
-    </​script>​ +       ​var s = document.getElementsByTagName('​script'​)[0];​ s.parentNode.insertBefore(rg,​ s); 
-</​code>​+     ​})(); 
 +  </​script>​ 
 + 
 +The line, **_rgq.push(['​_popupContact'​]);​_rgq.push(['​_resize',​500,​800])**,​ needs to be added only if your site uses SSL (has https in the site url).
  
 Now, you can use the following javascript trigger anywhere on your page to open the contact form: Now, you can use the following javascript trigger anywhere on your page to open the contact form:
 <code javascript>​ <code javascript>​
-_rgq.push(['​_popupContact'​]);​+_rgq.push(['​_popupContact'​]);​_rgq.push(['​_resize',​500,​800]);
 </​code>​ </​code>​
  
-For example, here are is a button that pops up the contact form:+For example, here is a button that pops up the contact form:
  
 <code html> <code html>
-<button onclick="​_rgq.push(['​_popupContact'​])">​Contact Us</​button>​+<button onclick="​_rgq.push(['​_popupContact'​]);​_rgq.push(['​_resize',​500,​800])">​Contact Us</​button>​
 </​code>​ </​code>​
 +
 +
  
 ====Demo==== ====Demo====
-This is what it looks like:+This is what it looks like (but you can style it however you want):
  
 <​html>​ <​html>​
Line 40: Line 46:
         var _rgq = _rgq || [];         var _rgq = _rgq || [];
         _rgq.push(['​_setDomain','​demo.realgeeks.com'​]);​         _rgq.push(['​_setDomain','​demo.realgeeks.com'​]);​
-        //​_rgq.push(['​_setDomain','​192.168.1.111:​8000'​]);​ 
         (function() {         (function() {
            var rg = document.createElement('​script'​);​ rg.type = '​text/​javascript';​ rg.async = true;            var rg = document.createElement('​script'​);​ rg.type = '​text/​javascript';​ rg.async = true;
-           ​rg.src = 'http://​widgets.realgeeks.com/​static/​js/​rg.js';​ +           ​rg.src = 'https://​widgets.realgeeks.com/​static/​js/​rg.js';​
-           //​rg.src = '​http://​192.168.1.111:​8000/​static/​widgets/​js/​rg.js';​+
            var s = document.getElementsByTagName('​script'​)[0];​ s.parentNode.insertBefore(rg,​ s);            var s = document.getElementsByTagName('​script'​)[0];​ s.parentNode.insertBefore(rg,​ s);
          })();          })();
     </​script>​     </​script>​
 </​code>​ </​code>​
-<button onclick="​_rgq.push(['​_popupContact'​])">​Contact Us</​button>​+<button onclick="​_rgq.push(['​_popupContact'​]);​_rgq.push(['​_resize',​500,​800])">​Contact Us</​button>​
 </​html>​ </​html>​
  
 +
 +To learn how to add the contact us popup as a button on your real geeks site, click [[contentpopup|here]].
contact_widgets.txt · Last modified: 2022/03/12 00:05 by kevin