Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2007-08-23 11:05:57

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

Re: PHP and include....again

ruud wrote:

Looks like a variable that wasn’t initialized properly. Try switching to ‘live’ mode instead of debug/testing.

aa, sorry ;) here again

If that doesn’t help, I think you’ll have to pick up a book on PHP programming and fix the script you’re trying to include.

but here it’s working like it should be, but when i include it… :(

you still think the script is incorrect?

Offline

#14 2007-08-23 11:13:50

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: PHP and include....again

Look at the HTML source code it produces on this page
You’ll see the problem. It includes an entire HTML document (including doctype) inside another HTML page. That won’t validate. The script was written as a stand-alone script. If you want to include it, you’ll have to modify it to fit within the environment where you want to use it.

Offline

#15 2007-08-23 11:27:51

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

Re: PHP and include....again

ruud wrote:

Look at the HTML source code it produces on this page
You’ll see the problem. It includes an entire HTML document (including doctype) inside another HTML page. That won’t validate. The script was written as a stand-alone script. If you want to include it, you’ll have to modify it to fit within the environment where you want to use it.

aaa, i just have to remove this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Autolaenu taotlus</title> <link rel="stylesheet" type="text/css" href="css/simple_theme.css" /> <script type="text/javascript" src="script/calc_scripts.js"></script> </head>

and put this:

<link rel="stylesheet" type="text/css" href="css/simple_theme.css" /> <script type="text/javascript" src="script/calc_scripts.js"></script>

into page head, right?

Last edited by Gallex (2007-08-23 11:29:06)

Offline

#16 2007-08-23 12:30:41

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: PHP and include....again

That would be a good start, yes.

Offline

#17 2007-08-23 13:12:30

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

Re: PHP and include....again

ruud wrote:

That would be a good start, yes.

done…but still doesn’t calculate…..wtf :(

Offline

#18 2007-08-23 13:17:44

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: PHP and include....again

Change script/calc_scripts.js to /script/calc_scripts.js otherwise the javascript file doesn’t get loaded.

Offline

#19 2007-08-23 13:25:52

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

Re: PHP and include....again

ruud wrote:

Change script/calc_scripts.js to /script/calc_scripts.js otherwise the javascript file doesn’t get loaded.

jesus, such a little correction and everything changes!
thank you ruud, thank you!

…i have one script more :)

Last edited by Gallex (2007-08-23 13:30:15)

Offline

Board footer

Powered by FluxBB