Chocolate570 Posted October 29, 2005 Share Posted October 29, 2005 I made this. It is cool. Comment on it. Give me suggestions. I am hyper. Wee. <html><head><script type="text/javascript">function gothing(h){var h=document.getElementById("test").valueif(h.length!=0){var win=window.open("test")win.document.write(h+"<br><br><input type='button' value='Close Window' onclick='window.close()'>")}else{alert("Error: 1a45f66d-'No Text Recieved'")}}</script></head><body><form><textarea id="test" cols="50" rows="20" scrollable="yes" hsrcoll="yes" vscroll="yes"></textarea><input type="button" value="Test Code" onclick="gothing()"></form> Link to comment Share on other sites More sharing options...
hacknsack Posted October 30, 2005 Share Posted October 30, 2005 That is cool. You could add a title if you wanted. <script type="text/javascript">function gothing(){var h=document.getElementById("test").value;var myTitle = prompt('Your Title Please..','Test Page');if(h.length!=0){var win=window.open("about:blank", "test");win.document.open();win.document.write('<html><head><title>\n' + myTitle + '</title></head><body>\n');win.document.write(h+"<br><br><input type='button' value='Close Window' onclick='window.close()'>")win.document.write('</body></html>');win.document.close();}else{alert("Error: 1a45f66d-'No Text Recieved'");}}</script> Thanks, Link to comment Share on other sites More sharing options...
Chocolate570 Posted October 30, 2005 Author Share Posted October 30, 2005 Hey, thanks! That's a good idea. (i'm not hyper anymore) Link to comment Share on other sites More sharing options...
hacknsack Posted October 30, 2005 Share Posted October 30, 2005 Wee. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now