Ok I am working on a template for my template I need to be able to change the body to different things without having to reload the whole template over and over again so I have it designed to do exactly that.
One problem though
I need to figure out how to use PHP to be able to get a html/txt document/file and place it in the template when I click on a button
for example
<html>
<head>
<title></title>
<css />
</head>
<body>
<div>Some PHP here to import stuff here from separate file</div>
<button />
</body>
</html>
Ok here is exactly what I'm working with
function windowOpen() {
document.styleSheets[9].disabled = false;
document.getElementById("bodyInnerDiv").innerHTML = '';
e.style.filter = "alpha(opacity=" + (0*100) + ")";
e.style.opacity = 0;
si = setInterval(function() {
io+=0.05;
e.style.filter = "alpha(opacity=" + (io*100) + ")";
e.style.opacity = io;
}, 100);
io = 0;
}
function openDocs() {
windowOpen();
document.getElementById("windowDiv").innerHTML = '<input type="button" value="X" id="XButtonId" class="XButtonClass" onclick="showDesktop()" /> ' + userName + '\'s Documents<hr /><span class="bodyClass">Documents YAY!!!<?php$ file=fopen("test.txt","r"); ?></span>';
}
http://opentech.durhamcollege.ca/~in...ittains/haley/
What would be a script for that and what would it be called? I'm not very good with PHP I'm more of a javascript kinda guy (I've never needed a database before) but I'm trying to go a little further on a personal project and implement some AJAX ideas
So any help anyone?
Thanks
Shelby



Reply With Quote
Bookmarks