Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 Yesterday 09:37:15
- astick360
- Member
- Registered: 2022-05-05
- Posts: 21
Site can't render in browser
Hello,
I have a problem about rendering html code with javascript and php on my site.
I added php code and javascript code into forms and try to use them. JavaScript alone, sorta works, slider shows up and html reads correctly.
But as soon as I add php form to the site, the wole html code and JavaScript stops working and displays in one big <pre> tag. Php code works great, it does what it should by taking data from the database as we can see displayed ( i called it in head tag). How to make it work?
Offline
Re: Site can't render in browser
Can you show us how you are including it in your page template or form?
Maybe you just need to wrap it in <txp:php>…</txp:php>
. PS: The code printed is missing an opening <script>
tag.
TXP Builders – finely-crafted code, design and txp
Offline
Re: Site can't render in browser
Do you have this kind of stuff in the page template:
<txp:header name="Content-Type" value="application/json; charset=utf-8" />
Offline
Pages: 1