Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New to the CF scene
    Join Date
    Sep 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Include a .html file with javascript in .tpl file

    Does anyone know how to accomplish this? I got the html file to show but none of the text in the file will show.

  • #2
    Senior Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Location
    Behind the Wall
    Posts
    3,474
    Thanks
    13
    Thanked 361 Times in 357 Posts
    what have you tried?
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    André Behrens, NY Times Software Developer

  • #3
    New to the CF scene
    Join Date
    Sep 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It just won't shopw up in my tpl file. The same exact file works in my rregular browser just not when I include it in the .tpl file.

  • #4
    New to the CF scene
    Join Date
    Sep 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ive attached file. bottom is working. top doesnt show the options that is in the .tpl file
    Attached Thumbnails Attached Thumbnails Include a .html file with javascript in .tpl file-1.png  

  • #5
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,310
    Thanks
    203
    Thanked 2,563 Times in 2,541 Posts
    An HTML file can only be parsed (recognised by the browser) if the file has an .htm, .html, .shtml extension.

    All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.

  • #6
    New to the CF scene
    Join Date
    Sep 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well yeah it is recognized and i included the file in the .tpl. I used {include file='location.html'}.... But the input options are just not showing up.

  • #7
    Senior Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Location
    Behind the Wall
    Posts
    3,474
    Thanks
    13
    Thanked 361 Times in 357 Posts
    Quote Originally Posted by Philip M View Post
    An HTML file can only be parsed (recognised by the browser) if the file has an .htm, .html, .shtml extension.
    addition: a script file is parsed as HTML if a "text/html" Content-Type header is sent along.
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    André Behrens, NY Times Software Developer

  • #8
    New to the CF scene
    Join Date
    Sep 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    So how can I get it to work? I included the .js files in the same folder as well.


  •  

    Posting Permissions

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