First off, Hi everyone new to .asp and am trying to self teach myself. Im trying to figure out what exactly im doing wrong, or maybe what I think I can do, I really cant.
The Idea.
-------------------
On our website, we have several pieces of code we entered in so in the event that when you click on the category section, and "Engraving" was selected, it would load an include file and show our engraving options, etc. Well, I figured, we could use that same code, add some else statements we could have it when they clicked on "About Awareness" then the same thing would happen and include a different include file and have the new content show up. I might not be wording my words very well so ill show you the pieces of code and perhaps enlighten me on what im doing wrong.
There is other dims, but this is the one i am mentioning to the above. This is the first portion of the variable code. (I didnt code this, as it was done by an ex employee.) Im posting what was done first, and then posting what changes i made thinking it would work that way.
And then again here. This one I couldnt quite grasp why he had placed it where he did, but it works.
next piece.
And the last piece of where I see variable used.
I took Comp Sci I and II during highschool, so i have a rough understanding, so with what i thought would work I did the following
I didnt change anything in the first portion but on the second portion I did
next portion
and then the last portion.
I may have totally slaughtered some of this code, and may have taken more then I can chew, but im working hard to try to get it to work.
Any recommendations would be appreciated.
Thank you very much,
Gregory Gawaran
The Idea.
-------------------
On our website, we have several pieces of code we entered in so in the event that when you click on the category section, and "Engraving" was selected, it would load an include file and show our engraving options, etc. Well, I figured, we could use that same code, add some else statements we could have it when they clicked on "About Awareness" then the same thing would happen and include a different include file and have the new content show up. I might not be wording my words very well so ill show you the pieces of code and perhaps enlighten me on what im doing wrong.
There is other dims, but this is the one i am mentioning to the above. This is the first portion of the variable code. (I didnt code this, as it was done by an ex employee.) Im posting what was done first, and then posting what changes i made thinking it would work that way.
Code:
dim variable
'clear_cache
'=============='
'== INCOMING =='
'=============='
action = request("action")
sub_action = request("sub_action")
product_id = request("product_id")
cat_select = request.form("cat_select")
cat_select = replace(cat_select,"+"," ")
variable = request("brand_name")
Code:
<% if variable = "Engraving" then %> <% else %>
Code:
<% if variable = "Engraving" then %>
<!--#include file="sci.asp"-->
<% else %>
Code:
if variable <> "Engraving" then
response.write "<font face=arial color=BLACK SIZE=2><b>"
response.write "<CENTER>VIEWING PAGE " & mypage & " OF " & maxpages & "</CENTER><br>"
end if
I didnt change anything in the first portion but on the second portion I did
Code:
<% if if variable = "Engraving" else if variable = "About Awareness" then else %>
Code:
<% If if variable = "Engraving" Then <!--#include file = "sci.asp"--> Else if variable = "About Awareness" <!--#include file = "aar.asp"--> End If %>
Code:
if if variable <> "Engraving" then
response.write "<font face=arial color=BLACK SIZE=2><b>"
response.write "<CENTER>VIEWING PAGE " & mypage & " OF " & maxpages & "</CENTER><br>"
else
if variable <> "About Awareness" then
response.write "<font face=arial color=BLACK SIZE=2><b>"
response.write "<CENTER>VIEWING PAGE " & mypage & " OF " & maxpages & "</CENTER><br>"
end if
Any recommendations would be appreciated.
Thank you very much,
Gregory Gawaran
Comment