Can't Get This Java Script to Work
Jan 10, 2016 21:23:23 GMT -5
Post by donaldbowers on Jan 10, 2016 21:23:23 GMT -5
This script is supposed to turn a textarea into a WISIWYG editor. It works in PHP. I don't necessarily even need the WISIWYG, but I'm trying to get the textarea to word wrap. I originally tried using 'head' instead of 'html' for the javascript, but that didn't work either. I'm using the free version right now until I can figure out whether or not RB will work for me. If I can just accomplish this one task (wordwrapping) I will be sold. RB seems to have everything else I need.
Here's the code I tried in RB:
Here's the code I tried in RB:
html "<html>"
html "<head>"
head "<title>TEST</title>"
head "<meta name='viewport' content='width=device-width, initial-scale=1'>"
head "<link rel='stylesheet' href='http://www.w3schools.com/lib/w3.css' type='text/css'>"
html "<script language='javascript' type='text/javascript' src='";DefaultDir$;"/js/tiny_mce.js'></script>"
html "<script language='javascript' type='text/javascript'>"
html "tinyMCE.init({mode : 'textareas',"
html "theme : 'advanced',"
html "theme_advanced_buttons3 : '',"
html "theme_advanced_toolbar_location : 'top',"
html "theme_advanced_toolbar_align : 'left',"
html "});</script>"
html "</head>"
html "<body><div class='w3-large w3-text-shadow w3-padding-8'>"
html "<div class='w3-container'>"
html "<b>";DefaultDir$;"</b>"
html "</div>"
html "<div class='w3-container w3-border-right'>"
html "<textarea name='message' rows='15' cols='67'></textarea>"
button #submit, "Submit", [go]
print
wait
[go]
html #request get$("message")
wait
html "</div>"
html "<hr>"
print DefaultDir$
html "</div></body></html>"