Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9126407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:02:06+00:00 2026-06-17T07:02:06+00:00

I have a widget (some html code) that should be loadable on different Websites

  • 0

I have a widget (some html code) that should be loadable on different Websites (which are not under my control) but the widget is hosted on my server.

Until now I had a PHP Script producing javascript code looking someting like this:

document.write('<div> ... some more dynamic html ...</div>'); 

which then could be loaded on any html page with the tag.

Now I’m planing a redesign and want to do the PHP part with server-side javascript. Do I still need to output document.write() or is there a more clever way now days, as we have handlebarjs, node.js etc. Also: I’d be interested I those new fancy autoupdate features frameworks like meteor or derby provide…

(I wanted to use meteor (meteor.com) to do the job but meteor outputs full html pages and I do not need a whole page)

Thank you for your help/sugestions

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T07:02:07+00:00Added an answer on June 17, 2026 at 7:02 am

    Now I’m planing a redesign and want to do the PHP part with server-side javascript. Do I still need to output document.write()

    You have to output something that will cause the content to be rendered on the client.

    The client side code will be more or less independent of the server side code (although you might get some cross-over if you start using tools such as mojito.

    or is there a more clever way now days, as we have handlebarjs, node.js etc.

    node.js won’t help with what you output, since it is a server and the JS to modify the page has to run in the browser.

    You could use a template language like handlebarjs. You could use a library to aid DOM manipulation. The problems are that the more code you load (libraries included), the more likely you are to clash with something used by the third party websites upon which your code is embedded, and the heavier you make their pages (and large increases in page weight are a particularly poor idea for secondary content).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a 'widget' that comprises an html/css block of code. It is a
I have some JavaScript code that dynamically injects an iframe in a given HTML
I have this code in some of my ASCX files: <%=Html.ActionLink(Resources.Localize.Routes_WidgetsEdit, Edit, Widget, new
I'm trying to update the display brightness from a widget but i have some
I have a Javascript function that accepts a list of HTML nodes, but it
I am using some code for a coverflow from the website, http://www.inter-fuser.com/2010/01/android-coverflow-widget.html this coverflow
I have some working Javascript code that generates an RDF/XML document using variables picked
I have a bit of HTML/JQuery code that only seems to be working for
I'm writing a custom widget that requires some supporting javascript code that I need
I have been using dojo 1.8 framework to create a widget that includes some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.