Please feedback my tweet out function of "Random cipher challenge"

When it comes to 23. line, I’ve got a problem with text displayed in new-open twitter window, it’s just ‘undefined’ value, don’t know why. I’m just taking document.getElementById("cipher").value, but it doesnt display on new-open twitter page. Could anyone help me with this challenge? What am I doing wrong?