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.
Expand|Select|Wrap|Line Numbers
- 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")
Expand|Select|Wrap|Line Numbers
- <% if variable = "Engraving" then %>
- <% else %>
Expand|Select|Wrap|Line Numbers
- <% if variable = "Engraving" then %>
- <!--#include file="sci.asp"-->
- <% else %>
Expand|Select|Wrap|Line Numbers
- 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
Expand|Select|Wrap|Line Numbers
- <% if if variable = "Engraving"
- else if variable = "About Awareness" then
- else %>
Expand|Select|Wrap|Line Numbers
- <%
- If if variable = "Engraving" Then
- <!--#include file = "sci.asp"-->
- Else if variable = "About Awareness"
- <!--#include file = "aar.asp"-->
- End If
- %>
Expand|Select|Wrap|Line Numbers
- 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