Does anyone know how to get regular html to work inside .js file? The reason is I made a widget I want others to use, but I don't know how to convert to .js. Is there a simple way to convert it, or does it completely have to be rewritten?
The amount of information you gave in this post is definitely not enough. However, I'll assume you're talking about the same issue in this other post of yours. Since the method I am giving involves little programming, I will attempt to answer your question here instead of on your other post. The method used by that widget system to display the section you desired is that it writes into the page an iframe that loads the biblesearchwidget.php page on your website. Their system also inserts a Flash "Get Widget" button. Is it that you don't want the "Get Widget" button? Regardless, the simplest way you can do the iframe technique yourself and still use a .js file is to empty the biblesearchwidget.js file you have and insert the following code. document.write("<iframe src=\"http://www.kingjamesbibleonline.org/biblesearchwidget.php\" style=\"width: 200px; height: 200px; border: none;\"></iframe>"); Code (markup): For the most part, it should work fine. Of course there are extra things you can add like element wrappers, id's, and DOM operations, but the method I gave is pretty much the minimum.