How do I make a Javascript widget?

Discussion in 'Programming' started by electroze, Dec 24, 2010.

  1. #1
    Hello! I'm wanting to take my existing html page and convert to a Javascript widget, so I can easily share it with other websites.

    I have a simple Bible search html form: http://www.kingjamesbibleonline.org/biblesearchwidget.php I want as a 200px x 200px area converted to javascript so I can share. Here's an example of it in use: http://www.kjvbible.us/ (top right). You would think it already exists, but these makers add their own branding and take away SEO value, so I want my own javascript code hosted on my own server.

    So, instead of this:

    <script type="text/javascript" src="http://cdn.widgetserver.com/syndication/subscriber/InsertWidget.js"></script><script type="text/javascript">if (WIDGETBOX) WIDGETBOX.renderWidget('a08171a6-b2c7-415b-836c-675c135141ae');</script>

    I want to figure out how to make the above php (html) page so it displays when to:

    <script type="text/javascript" src="http://www.kingjamesbibleonline.org/biblesearchwidget.js"></script>

    Any suggestions?
     
    electroze, Dec 24, 2010 IP
  2. electroze

    electroze Active Member

    Messages:
    179
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    60
    #2
    Surprised no one knows about this- lots of people on this forum
     
    electroze, Dec 27, 2010 IP
  3. electroze

    electroze Active Member

    Messages:
    179
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    60
    #3
    hate to keep bumping this up, but with thousands on this board, surely someone knows if regular html works inside a .js file, or if not, what to alter to get it to work. My widget is already done, but its in html- just need that html converted to javascript.
     
    electroze, Dec 29, 2010 IP