• I have looked at the related questions and have tried a lot of the solutions but can’t seem to get this to work.

    Basically I have a script that a user can input a selection from 1 to 10 and the result is displayed in a radar graph.

    I need this to work on a single page but can’t figure it out. I have tried the Javascript Codex but am not getting anywhere. I am likely adding the wrong code to the wrong places / wrong files.

    An example of the code working as a standalone is at codepen here:
    http://codepen.io/anon/pen/KpAGu

    Any help is greatly appreciated on what to add to where and into which file.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • anonymized-13749270

    (@anonymized-13749270)

    hello,
    i don’t think pasting the entire JS code into a page or a post HTML is a good idea.
    log in to your server, create an html file there and then use iframe, or, create a js file and instead of pasting the entire js code, do this : ( for example )

    <script src="/js/name.js">
    HTML goes here

    have you tried that ?

    Thread Starter aiofe

    (@aiofe)

    I’ve tried referencing the .js file in the post and putting the HTML beneath it but it doesn’t work…

    anonymized-13749270

    (@anonymized-13749270)

    I’ve tried referencing the .js file in the post and putting the HTML beneath it but it doesn’t work…

    ok then, use a frame !
    in your server somewhere create an HTML or PHP file, put the entire js and html/css , then in your page call the frame
    <iframe src="_" height="_" width="_"></iframe>

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Adding Javascript to a single page’ is closed to new replies.