How to set up seperate pages with header/footer |
Post Reply | Page <12 |
Author | |
BlackReefDesigns
Newbie Joined: 28-May-2008 Location: San Diego, CA Status: Offline Points: 8 |
Post Options
Thanks(0)
|
Assuming Im using HeaderW and HeaderF, this will be the only code I put in the header.asp? And what does home.asp recognize as the main page? maybe I should get some sleep and tackle this in the morning. my brain is mush, hehe
<% if headerw=1 then %> <!--#include file="headerW.asp"--> <% else %> <!--#include file="headerF.asp"--> <% end if %> Edited by BlackReefDesigns - 25-June-2008 at 5:54am |
|
Joe S.
BlackReef.net |
|
Hamish
Admin Group Joined: 12-October-2006 Location: United Kingdom Status: Offline Points: 56 |
Post Options
Thanks(0)
|
It must be mad o'clock there !! :-)
All you will need is some code to read the cookie var and the code as shown, nothing else. home.asp and all the customer facing pages #include the header and footer files so you new versions will automatically be used and pick up the new variations of the files automatically. |
|
Hamish
Admin Group Joined: 12-October-2006 Location: United Kingdom Status: Offline Points: 56 |
Post Options
Thanks(0)
|
Get some zzzz's and then take a look at :-
http://www.w3schools.com/asp/default.asp - A good basic into to asp & vbscript are available there, including using cokkie based vars. |
|
BlackReefDesigns
Newbie Joined: 28-May-2008 Location: San Diego, CA Status: Offline Points: 8 |
Post Options
Thanks(0)
|
Hamish - Thank you again for your help.
So this is what I did.
I created the headerwide.asp and footerwide.asp <---100% Table Width
I also created headerfull.asp and footerfull.asp <----800px Table Width
The Footer is identical in both instances.
The next thing I did was opened the header.asp and erased everything and put this in:
<% if headerw=1 then %>
<!--#include file="headerwide.asp"--> <% else %> <!--#include file="headerfull.asp"--> <% end if %> I saved the header.asp, and uploaded all 6 files. It should be noted that all 3 footer files are identical.
Im pretty sure thats the way you explained it to me. Now, this is where I get lost. How do I set it up on the splash page so the customers can select between wide and full? Obviously there is no .asp files to link the pages to, so how do I set it up so the customer can choose thier version?
|
|
Joe S.
BlackReef.net |
|
Hamish
Admin Group Joined: 12-October-2006 Location: United Kingdom Status: Offline Points: 56 |
Post Options
Thanks(0)
|
Hi, I personally wouldn't bother with a "splash" page. Customers will not always arrive on your site via the same route & I think the less there is between the customers and choosing the goods the better.
I would use a button in the header to toggle between the wide and narrow, the code behind the button toggling the value of the headerw var - which is stored & retrieved from the cookie file. If you do want a splash page as well you can add the code to set the cookie var in there. You could make the splash page choice using javascript. Using ASP to work with cookies :- http://www.w3schools.com/asp/asp_cookies.asp Using Javascript to work with cookies :- www.w3schools.com/js/js_cookies.asp If you use javascript ONLY use it on the splash page - it's not suitable for the ASP pages as otherwise both copies of your header will be sent to the browser as the javasc rpit executes in the browser not the server. In header.asp you must add asp code at the beginning to retrieve, or attempt to retrieve the cookie var headerw (Actually the cookie vars name can be anything - it's value must end up in vbscript var headerw). 6 files? If you haven't changed footer.asp then you only need that version of footer.asp & can delete the other two. |
|
Post Reply | Page <12 |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |