Include question

liunx

Guest
Hello,<br />
<br />
Is there a way to use SERVER SIDE INCLUDES on buttons to load a page into a table or cell? Usually you just put the includes on the pages themselves, but that would be awesome for this new site I'm building. Can someone please help??<br />
<br />
Thanks<!--content-->To swap out the content of a cell with a button server side you will need some server side scripting, a simple input button alone will not do it. If you use asp or asp.net you can use a form submit button and then from the value write out the contents of the file just like an include. If you have asp or asp.net I can give you the code to do this.<!--content-->Thanks for your reply PeOfEo,<br />
<br />
Let me tell yo what I have. It's an actor's site I am doing. I tried to use 2 IFRAMES - the top one had Flash as navigation and some interaction - the bottom IFRAME is all html. The navigation is on the top frame in flash (which can be switched to html) but I heard the IFRAMES are crappy and I found out the hard way because when you load a new page the iframe does not resize correctly.<br />
<br />
I want the top Flash table/frame or whatever to never reload because it has cool motion - all I want to change is the table or cell below it when you press a button. Is there a way to do this without an include? I Download <!--more-->ed asp.net from windows when you told me about it - but I don't know how to use it yet - is it pretty easy?<br />
<br />
That would be great if you could send me some info on how to do it or even some other kind of trick to achieve these results.<br />
<br />
Thanks again<!--content-->Oh. You are going about this wrong I think. Even if you use a server side script to rotate which content is included, the page will still completely have to refresh so the content alone will not be the only thing changing, because when a server side script runs, the server processes it and a whole new html page needs to be output. Now using a server side include for your website to keep it tidy and easy to update can be more efficiently done if you were to include the navigation and layout on all of your secondary pages, rather then try to make one page with navigation and layout and include the content. You are sort of going at it in reverse. So basically each article or whatever you have on your site, would be its own page and you would say<br />
<include top and naviation here><br />
content<br />
<include bottom><br />
<br />
That top would be your <head> and <body> above the content and bottom would be everything after the content. So that way the whole layout is included and the navigation is included and each secondary page is reduced to actually being a paragraph of text. That is how I do it myself. Asp.net is great, but I misunderstood your question, for this it is uneccessary to get into hard core server side scripting. If you want to use asp.net in the future, I would encourage it, you are going to want to be on a windows server though, and the server would have to support it and be iis (though linux - apache can run it now, I wouldn't). asp.net is a server side script (as said before) other options would be asp classic, php, jsp, cgi, cfml. Asp.net is my technology of choice.<!--content-->Peo is right there. That would be best. If you need the code for include then look in a server side language forum (PHP, ASP, ASP.NET, CGI et cetera).<br />
<br />
Here is the code i use:<br />
<br />
<?php <br />
include ( "header.php" ); <br />
?><br />
<br />
Content goes here...<br />
<br />
<?php <br />
include ( "footer.php" ); <br />
?><br />
<br />
<br />
This is the standard method. Hope that helps. You will need a server with PHP to parse the script and make it viewable. You will not be able to view it locally unless you have a web server (with PHP installed) on your machine. <br />
<br />
Best Wishes<br />
David<!--content-->with asp<br />
<!--#include file="yourfile.inc"--><br />
or<br />
<!--#include virtual="yourfile.inc"--><br />
<br />
with asp.net<br />
<!--#include file="yourfile.inc"--><br />
or<br />
<!--#include virtual="yourfile.inc"--><br />
<br />
with ssi<br />
<!--#include file="yourfile.inc"--><br />
or<br />
<!--#include virtual="yourfile.inc"--><br />
<br />
those all share the same include syntax.<!--content-->Thanks guys - I'm working on it tediously<!--content-->
 
Back
Top