This library allows creating javascript popup/popin widgets in a simple way.
-
Grab the code from github.
-
Open astrails-widget.js, and change values of hash “opts” to point to your URLs and adjust iframe sizes.
-
Compress the script with YUI compressor.
-
Upload compressed script to the location defined in opts.js_url.
-
Copy-paste a snippet, change the URL of your javascript, and add parameters you need to pass to iframe code:
<script type='text/javascript'>
document.write(unescape("%3Cscript src='" + ("https:" == document.location.protocol ? "https" : "http") + "://assets.astrails.com.s3.amazonaws.com/popup-assests/astrails-widget.js?q=wow' type='text/javascript'%3E%3C/script%3E"));
</script>
-
Write the server part refered by opts.iframe_base_url.
-
Give this snippet to your users.
Copyright © 2009 Boris Nadion. Licensed under the MIT license.