Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-08-2012, 05:03 PM   PM User | #1
JasonSnow
New to the CF scene

 
Join Date: Nov 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
JasonSnow is an unknown quantity at this point
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 11:16 AM.. Reason: resolved
JasonSnow is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:29 AM.


Advertisement
Log in to turn off these ads.