This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
contact_widgets [2011/11/29 23:28] kevin |
contact_widgets [2020/05/28 19:49] michaels |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | #redirect https://support.realgeeks.com/hc/en-us/articles/360043677113 | ||
======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 47: | Line 53: | ||
</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]]. |