Javascript or php to create html widget

Discussion in 'Programming' started by cocoonfx, Aug 31, 2012.

  1. #1
    Hi

    I am wondering if it possible to create a java script to create some html script to embed into a website.

    For example

    I want the java or php to create the following example HTML.
    
    <div id="test">
    <ul>
    <li>Some text</li>
    </ul>
    </div>
    
    HTML:
    Then create a function to call this into the static HTML page.

    i.e

    
    <body>
    
    <script type="text/javascript"> the html is written</script>
    </body>
    
    HTML:
    Anyone got any good recommendations?
     
    cocoonfx, Aug 31, 2012 IP
  2. bar.developer

    bar.developer Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Please explain yourself more.
     
    bar.developer, Sep 1, 2012 IP
  3. cocoonfx

    cocoonfx Peon

    Messages:
    21
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Ok,

    Basically I want to add code to multiple pages and I want to be able to update a one piece of code which will update all. The site is using HTML5.
     
    cocoonfx, Sep 3, 2012 IP