Forum Moderators: phranque
So, I asked him what it was that required ASP. I'm wondering if it can be replciated on a Unix server.
Bascially, it's the typical type home page with a navigation system down the left column and when a link is clicked on the left, it simply replaces the content area with the requested page, leaving the navigation area unchanged. I'm assuming this can be done without ASP, but I'm at a loss for how to do it. I understand "includes" somewhat, but how would I set up an HTML to just replace the varaible content area, like he does with ASP?
Below I list the ASP code he's putting on his page.
This is the code for the ID stuff
<%@ Language="vbscript"%>
<%
dim j
j = Request.QueryString("id")
%>
<% if j=0 then
%>
<!-- #include virtual="/condi04/body_index.asp" -->
<% elseif j = "1" then
%>
<!-- #include virtual="/condi04/body_index.asp" -->
<% elseif j = "2" then
%>
<!-- #include virtual="/condi04/body_about.asp" -->
<% elseif j = "3" then
%>
<!-- #include virtual="/condi04/body_aboutcon.asp" -->
<% elseif j = "4" then
%>
<!-- #include virtual="/condi04/body_whycon.asp" -->
<% elseif j = "5" then
%>
<!-- #include virtual="/condi04/body_faq.asp" -->
<% elseif j = "6" then
%>
<!-- #include virtual="/condi04/body_mediapress.asp" -->
<% elseif j = "7" then
%>
<!-- #include virtual="/condi04/body_contact.asp" -->
<% elseif j = "8" then
%>
<!-- #include virtual="/condi04/body_tellbush.asp" -->
<% else %>
<!-- #include virtual="/condi04/body_index.asp" -->
<%
End if
%>
Then there's this for includes...
<!-- #include file="date.asp" -->
Since it looks like he is using a url parameter such as
www.yoursite.com/page.asp?id=4
and then he is just using SSI to actually include the other pages. If you are keeping the setup as is and just looking for a *nix compatible language you could use PHP. I could show you the code and then you could just have html pages parsed as php and you're off to the races.
Though there is conditional SSI as well. I have to admit that mine is too rusty to offer the exact solution but maybe some kind soul will cough it up. ;)
If not php would work just fine.
I was probably not clear enough in my initial post. Here's exactly what I'm looking to do: Initially display the page with the navigations area (an individual HTML file just for this) and a content portion (an individual HTML file just for this). When I link is clicked in the navigation area to see other content than what is displayed, the content area is replaced with the new requested content that is stored in it's own HTML file. But the trick is that the navigation portion stays static.
For example, if the Navigation area had three links--Welcome, FAQ and Contact--I'd have four files: Nav.html, welcome.html, faq.html and contact.html.
How do people code this?