0
Welcome Guest! Login
0 items Join Now

How can I embed a javascript form inside content? (template breaks)

  • How can I embed a javascript form inside content? (template breaks)

    Posted 17 years 2 weeks ago
    • I embedded this example form from Extjs javascript library:
      extjs.com/deploy/dev/examples/form/dynamic.html

      I copied code and fixed the paths and copied code into a static content page located here - see how the javascript forms are all outside of the template:
      emrgrids.com/index.php?option=com_conten...view&id=15&Itemid=26


      here's code I added to a static content page:
      <html>
      <head>
      &nbsp; &nbsp; <link rel="stylesheet" type="text/css" href="http://www.emrgrids.com/extjs/resources/css/ext-all.css"/>
      &nbsp; &nbsp; <link rel="stylesheet" type="text/css" href="http://www.emrgrids.com/extjs/resources/css/xtheme-default.css" /><!-- LIBS -->
       
      &nbsp; &nbsp; <script type="text/javascript" src="http://www.emrgrids.com/extjs/adapter/ext/ext-base.js"></script>
      &nbsp; &nbsp; <!-- ENDLIBS -->
       
      &nbsp; &nbsp; <script type="text/javascript" src="http://www.emrgrids.com/extjs/ext-all.js"></script>
       
      &nbsp; &nbsp; <script type="text/javascript" src="http://www.emrgrids.com/extjs/examples/form/states.js"></script>
      &nbsp; &nbsp; <script type="text/javascript" src="http://www.emrgrids.com/extjs/examples/form/dynamic.js"></script>
      &nbsp; &nbsp; <link rel="stylesheet" type="text/css" href="http://www.emrgrids.com/extjs/examples/form/forms.css"/>
       
      &nbsp; &nbsp; <!-- Common Styles for the examples -->
      &nbsp; &nbsp; <link rel="stylesheet" type="text/css" href="http://www.emrgrids.com/extjs/examples/examples.css"/>
      </head>
      <body>
      <script type="text/javascript" src="http://www.emrgrids.com/extjs/examples/examples.js"></script>
      <link rel="stylesheet" type="text/css" href="http://www.emrgrids.com/extjs/examples/lib.css" /><div id="lib-bar" class="x-toolbar" style="border-width:0 1px 1px"><div id="lib-bar-inner"> <span>Theme:</span>&#160;&#160;<select id="exttheme"><option value="default">Ext Blue</option><option value="gray">Gray Theme</option></select></div></div>
      <h1>Dynamic Forms built with JavaScript</h1>
       
      <p>
      &nbsp; &nbsp; These forms do not do anything and have very little validation. They solely demonstrate
      &nbsp; &nbsp; how you can use Ext Forms to build and layout forms on the fly.
      </p>
      </body>
      </html>

      Anyone know what I can do to get this inside the template?
    • Last Edit: 17 years 2 weeks ago by Adam Parker.
  • Re: How can I embed a javascript form inside content? (template breaks)

    Posted 17 years 2 weeks ago
    • update: I put the <head> stuff into a module, and only these lines into the content, and still breaks template:
      <script type="text/javascript" src="http://www.emrgrids.com/extjs/examples/examples.js"></script>
      <h1>Dynamic Forms built with JavaScript</h1>
       
      <p>
      &nbsp; &nbsp; These forms do not do anything and have very little validation. They solely demonstrate
      &nbsp; &nbsp; how you can use Ext Forms to build and layout forms on the fly.
      </p>
    • March's Avatar
    • March
    • Sr. Rocketeer
    • Posts: 150
    • Thanks: 1

    Re: How can I embed a javascript form inside content? (template breaks)

    Posted 17 years 2 weeks ago
  • Re: How can I embed a javascript form inside content? (template breaks)

    Posted 17 years 2 weeks ago
    • i actually (sort of) fixed it. My forms were rendering into the body, but I created divs for them to render to inside the static content. 2 problems though:

      1) something is still rendering to body because template looks weird
      2) will this form have access to Joomla so i can use "$my->username"?
    • Last Edit: 17 years 2 weeks ago by Adam Parker.

Time to create page: 0.055 seconds