textbox - Javascript in a text box -



textbox - Javascript in a text box -

i trying figure out how generate javascript set javascript text box users can re-create it, similiar how modernizr lets configure library downwards loaded http://www.modernizr.com/download/#-iepp-cssclasses-load. created javascript string, when set text box formats in way not want %26%2360script%20src%3d%22http%3a//

<textarea id="code">

function renderad(size){ var sizes= size.split("x"); var code = $("#code"); var adcode = escape('&#60script src="{{ sitelocation }}/js/"&#61&#60/script&#61&#60script&#60(function(){var settings = {"size":"'+ size +'};setup(settings);})();&#60/script&#61') code.val(adcode); }

anyone have experience this?

thanks, cg

this works me:

var path = "/path/to"; $('#code').val("<script src=\"http://someurl.com"+path+"\">alert(\"hello\");</script>");

withouth problem...

javascript textbox

Comments

Popular posts from this blog

delphi - blogger via idHTTP : error 400 bad request -

c++ - compiler errors when initializing EXPECT_CALL with function which has program_options::variables_map as parameter -

How do I check if an insert was successful with MySQLdb in Python? -