Forum Moderators: phranque

Message Too Old, No Replies

Coding Question

         

slobizman

1:56 am on Oct 16, 2003 (gmt 0)

10+ Year Member



Someone is goign to design a website for me that uses ASP. I was gogin to put it on a shared ASP web host and then realized that my dedicated server (on which my main site is hosted) can have another domain set up on it for free. Problem is, that dedicated server is Unix.

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" -->

jatar_k

2:09 am on Oct 16, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



well it really isn't too much, is that all of the asp there is? Nothing in any of the other files?

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.

slobizman

8:46 pm on Oct 16, 2003 (gmt 0)

10+ Year Member



It's not really the part about"this link equals this action" I'm looking to replicate. It's the ability to just replace the content part of the page. Is that what the Include "virtual" does? I am familiar with includes, but not the virtual part of it. What does the virtual do? And, can it be done in Unix?

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?

slobizman

5:02 am on Oct 17, 2003 (gmt 0)

10+ Year Member



I got the whole thing figured out! Thanks.