Friday, 23 August 2013

Social network Scripts

 <script language="JavaScript">
        function gplus() {
            var url = "http://www.google.com/";
            window.open('https://plus.google.com/share?url=' + url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');
        }
        function fb() {
            var url = "https://www.goole.com/";
            window.open('http://www.facebook.com/sharer.php?u=' + url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=400,width=600');
        }
        function tweet() {
            var url = "http://www.goole.com/";
            var msg = "this is for iqmtest";
            window.open('https://twitter.com/intent/tweet?text=' + msg + '&url=' + url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=500,width=600');
        }
 </script>

         <div >
                <p >
                    Share us on
                </p>
                <div style="float: left; width: 120px; height: auto;">
                    <div >
                        <a href="javascript:void(0)" onclick="fb()">Facebook </a>
                    </div>
                    <div >
                        <a href="javascript:void(0)" onclick="tweet()">Twitter </a>
                    </div>
                    <div >
                        <a href="javascript:void(0)" onclick="gplus()">Gmail </a>
                    </div>
                </div>
            </div>
        </div>

No comments:

Post a Comment