{"id":4840879,"date":"2014-04-23T15:14:44","date_gmt":"2014-04-23T15:14:44","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/using-this-plugin-with-javascript\/"},"modified":"2016-08-21T19:39:06","modified_gmt":"2016-08-21T19:39:06","slug":"using-this-plugin-with-javascript","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/using-this-plugin-with-javascript\/","title":{"rendered":"Using this Plugin with JavaScript"},"content":{"rendered":"<p>Hello, I am trying to use this plugin to display a random string of text by using  a snip of javascript. The code,<\/p>\n<pre><code>&lt;script language=&quot;JavaScript&quot;&gt;\n\/\/ ==============================================\n\/\/ Copyright 2004 by CodeLifter.com\n\/\/ Free for all; but please leave in this header.\n\/\/ ==============================================\n\nvar Quotation=new Array() \/\/ do not change this!\n\n\/\/ Set up the quotations to be shown, below.\n\/\/ To add more quotations, continue with the\n\/\/ pattern, adding to the array.  Remember\n\/\/ to increment the Quotation[x] index!\n\nQuotation[0] = &quot;Time is of the essence! Comb your hair.&quot;;\nQuotation[1] = &quot;Sanity is a golden apple with no shoelaces.&quot;;\nQuotation[2] = &quot;Repent! The end is coming, $9.95 at Amazon.&quot;;\nQuotation[3] = &quot;Honesty blurts where deception sneezes.&quot;;\nQuotation[4] = &quot;Pastry satisfies where art is unavailable.&quot;;\nQuotation[5] = &quot;Delete not, lest you, too, be deleted.&quot;;\nQuotation[6] = &quot;O! Youth! What a pain in the backside.&quot;;\nQuotation[7] = &quot;Wishes are like goldfish with propellors.&quot;;\nQuotation[8] = &quot;Love the river&#039;s \\&quot;beauty\\&quot;, but live on a hill.&quot;;\nQuotation[9] = &quot;Invention is the mother of too many useless toys.&quot;;\n\n\/\/ ======================================\n\/\/ Do not change anything below this line\n\/\/ ======================================\nvar Q = Quotation.length;\nvar whichQuotation=Math.round(Math.random()*(Q-1));\nfunction showQuotation(){document.write(Quotation[whichQuotation]);}\nshowQuotation();\n&lt;\/script&gt;<\/code><\/pre>\n<p>Its obviously an external script, and Im not sure if that is the reason it is not working or because something I am doing is wrong. Any input would be appreciated.<\/p>\n<p>https:\/\/wordpress.org\/plugins\/html-javascript-adder\/<\/p>\n","protected":false},"template":"","class_list":["post-4840879","topic","type-topic","status-closed","hentry","topic-tag-javascript"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/4840879","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/4840879\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=4840879"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}