I have a javascript that displays a generated text into a div:
document.getElementById(‘phrase’).innerHTML = phrase;
PHRASE_TEXT_GETS_SHOWN_HERE
Basically I’m trying to set up a link that will take the text and post it to twitter with a link:
Clicky for tweety
How can I include the generated text in the link?
Do you mean like:
…?
Un-jQuerying it should be straightforward enough, if that’s how you roll.
This is un-jQueried:
If you didn’t see my failbraining
encodeforencodeURIas an error you should use Firebug. It may also fail if you have more than one element with the idphraseor if you have no elements with the idphrase.