Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1

Thread: Tweet Button

  1. #1
    New to the CF scene
    Join Date
    Nov 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Tweet Button

    ****RESOLVED*****


    Greetings,

    Hope you are all well.

    I am currently in the process of making a tweet button that once you press it opens a new window as normal when you are tweeting a url.

    The problem I am having is that I want the tweet to show the text that the user has specified in a textarea above the tweet button. I've tried this code and it's not working.

    Here's the Javascript code:

    Code:
    	function tw_click() {
    		var url ='http://twitter.com/share?url=&text=' + encodeURIComponent(F.sel.id('socialmessage').value) + '&count=none'
    		window.open(url, 'sharer', 'toolbar=0,status=0,width=626,height=436');
    		return false
    	}
    And html code for the button and textarea

    Code:
     
    <p><textarea id="socialmessage">Insert your tweet text here</textarea></p>
    <input type="button" onclick="tw_click()" value="Tweet on Twitter" />
    I would greatly appreciate any help given.

    Thanks
    Last edited by JasonSnow; 11-09-2012 at 12:16 PM. Reason: resolved


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •