Welcome to TalkGraphics.com
Results 1 to 10 of 26

Hybrid View

  1. #1
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,904

    Default Re: Incorporating .HTML , .CSS, and .JS into widget to create working calculator

    Sorry that you paid for a calculator in the first place.

    The .html file will probably end up as a DIV tag with an ID that is added as Body code to a shape (rectangle) Placeholder.
    The .css and .js would go into the Page Head code. These would require wrapping tags of <style>...</style> for the CSS and <script>...</script> for the JavaScript.

    Look at Egg's example in this: https://www.talkgraphics.com/showthr...55-calculator; it's not what it done but where things go.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  2. #2
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,941

    Default Re: Incorporating .HTML , .CSS, and .JS into widget to create working calculator

    Glad you found that Acorn, I'd forgotten all about that
    Egg

    Minis Forum UM780XTX AMD Ryzen7 7840HS with AMD Radeon 780M Graphics + 32 GB Ram + MSI Optix Mag321 Curv monitor
    + 1Tb SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  3. #3
    Join Date
    Nov 2018
    Posts
    6

    Default Re: Incorporating .HTML , .CSS, and .JS into widget to create working calculator

    Quote Originally Posted by Egg Bramhill View Post
    Glad you found that Acorn, I'd forgotten all about that
    Glad Acorn found it too! Thank you, Egg. In regards to my latest reply to Acorn, do you have any suggestions for what to use to read a .js file? Again, please forgive me as a newbie to all this!

  4. #4
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,904

    Default Re: Incorporating .HTML , .CSS, and .JS into widget to create working calculator

    Quote Originally Posted by graphics097 View Post
    Glad Acorn found it too! Thank you, Egg. In regards to my latest reply to Acorn, do you have any suggestions for what to use to read a .js file? Again, please forgive me as a newbie to all this!
    Window's Notepad is all you need. Open it and drag and drop the file onto the pane.

    It should be readable. If so, note any copyright statements.
    If not, it may be minified. You might then use https://unminify.com/ to unminify it.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  5. #5
    Join Date
    Nov 2018
    Posts
    6

    Default Re: Incorporating .HTML , .CSS, and .JS into widget to create working calculator

    Quote Originally Posted by Acorn View Post
    Window's Notepad is all you need. Open it and drag and drop the file onto the pane.

    It should be readable. If so, note any copyright statements.
    If not, it may be minified. You might then use https://unminify.com/ to unminify it.

    Acorn
    I wish I could've paid you two, instead. Your help has been invaluable, and I can't express how appreciative I am! I did what you both advised, and the calculator is *almost* working... Except it won't do the final calculation. May be due to my own error or the coding they gave me--which one it is I am not sure. MSJE calc.web

  6. #6
    Join Date
    Nov 2018
    Posts
    6

    Default Re: Incorporating .HTML , .CSS, and .JS into widget to create working calculator

    Nevermind… Definitely my error! Now just have to figure out how to delete the "Calories Burned (English)" option as its not accurate whatsoever... But now I'm rambling! Thank you for your help again, Egg and Acorn (:

  7. #7
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,904

    Default Re: Incorporating .HTML , .CSS, and .JS into widget to create working calculator

    There are few areas that can be tweaked.

    Your Height is missing its units of feet and inches.

    REE?

    Your responsive view has its fields dimensioned too wide and the Placeholder is not deep enough.

    Entering a weight in lbs and then switching to kgs does not truncate the result so you get a very long, unprofessional, value.

    I don't know why "wt1=wt/2.2"; is less accurate than the value used in "var r2 = (10 * wt*2.2046) + (6.25 * ht) - (5 * a)-161;".

    Have you sorted out filling your r2 field (Calories/day)?

    Acorn
    Last edited by Acorn; 27 November 2018 at 05:43 PM.
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  8. #8
    Join Date
    Nov 2018
    Posts
    6

    Default Re: Incorporating .HTML , .CSS, and .JS into widget to create working calculator

    Quote Originally Posted by Acorn View Post
    Sorry that you paid for a calculator in the first place.

    The .html file will probably end up as a DIV tag with an ID that is added as Body code to a shape (rectangle) Placeholder.
    The .css and .js would go into the Page Head code. These would require wrapping tags of <style>...</style> for the CSS and <script>...</script> for the JavaScript.

    Look at Egg's example in this: https://www.talkgraphics.com/showthr...55-calculator; it's not what it done but where things go.

    Acorn
    Thank you, Acorn! That example actually helps me a lot. Forgive my ignorance, but I have one last problem: I am unable to open the JavaScript file to read (& then copy and paste) the coding inside it. Are there any free programs that I can download to read .js files that you would recommend?

    You're the best- I really appreciate your help (:

 

 

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •