New Posts
Live Radio
Welcome guest, is this your first visit?
  • Login:
PowerPoker.com Affiliate Program
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Member
    My Status
     

    Add as a friend
    Join Date
    Nov 2008
    Location
    United States of America
    Posts
    77
    Feedback Score
    2 (100%)

    Default Need some coding help

    Hi guys..

    I am no coder, but when I work on my site I can usually disect the stuff and get certain things to happen. Well, I am having trouble with this one. First of all here is the code:

    <%
    'open article image record
    set air = Server.CreateObject("ADODB.Recordset")
    sql="SELECT top 1 * from articleimages where id="&cms("articleimage")&""
    air.Open sql,dconn
    if air.bof and air.eof then
    else
    picurl="../editor/assets/article_images_200x200/" & air("filename")
    if cms("articleimageloc")=1 then%>
    <img class="squareright" alt="<%=air("alttext")%>" src="<%=picurl%>" <%if request.servervariables("script_name")="/default.asp" then%> usemap="#m_offers" <%end if%> >
    <%end if%>
    <%if cms("articleimageloc")=3 then%>
    <img class="squareleft" alt="<%=air("alttext")%>" src="<%=picurl%>" <%if request.servervariables("script_name")="/default.asp" then%> usemap="#m_offers" <%end if%> >
    <%end if%><%end if%>

    <%
    air.close
    set air=nothing
    %>


    The logic for that code is basically "if the user has chosen an articleimage and the page we are talking about is "default.asp", then use the image map "m_offers"

    Well, I want to make the image map be included in another page as well. That page is "/sec_gameinstructions.asp"

    I have tried a few different things including "or" but I can't get the image map to work for both default.asp and sec_gameinstructions.asp

    My question is what modifications do I need to make to this code so it knows that if the conditions are all met, and the page is "sec_gaminstructions.asp" that it should use "m_offers" as well?
    Cut a deck of cards with one hand!

    Contact me for all your content needs as well as flash design and logo design. PM on this site for information and pricing.

  2. #2
    New Member
    My Status
     

    Add as a friend
    Join Date
    Mar 2009
    Location
    england
    Posts
    17
    Feedback Score
    0

    Default

    Im more of a php developer so im not sure if this will work but try it anyway.

    Instead of using "OR" USE "||"

    EG:

    <%if request.servervariables("script_name")="/default.asp" || request.servervariables("script_name")="/sec_gaminstructions.asp" then%> usemap="#m_offers" <%end if%> >

    (IF Script_name = default.asp || script_name = sec_gaminstructions.asp user m_offers)

    //////////////////////////////////////////////////////////////////////////////////////////////////////
    Modified code.



    <%
    'open article image record
    set air = Server.CreateObject("ADODB.Recordset")
    sql="SELECT top 1 * from articleimages where id="&cms("articleimage")&""
    air.Open sql,dconn
    if air.bof and air.eof then
    else
    picurl="../editor/assets/article_images_200x200/" & air("filename")
    if cms("articleimageloc")=1 then%>
    <img class="squareright" alt="<%=air("alttext")%>" src="<%=picurl%>" <%if request.servervariables("script_name")="/default.asp" || request.servervariables("script_name")="/sec_gaminstructions.asp" then%> usemap="#m_offers" <%end if%> >
    <%end if%>
    <%if cms("articleimageloc")=3 then%>
    <img class="squareleft" alt="<%=air("alttext")%>" src="<%=picurl%>" <%if request.servervariables("script_name")="/default.asp" || request.servervariables("script_name")="/sec_gaminstructions.asp" then%> usemap="#m_offers" <%end if%> >
    <%end if%><%end if%>

    <%
    air.close
    set air=nothing
    %>

    Hope this helps.

  3. #3
    New Member
    My Status
     

    Add as a friend
    Join Date
    Sep 2009
    Location
    India
    Posts
    8
    Feedback Score
    0

    Default the above probably helps

    s i believe this helps as i am also a php coder jus try and let us know if u got it!!


 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. coding and design job
    By suffolkpoker in forum Graphics
    Replies: 3
    Last Post: 02-07-2010, 06:38 PM
  2. PSDGator - Coding/PHP
    By CK in forum Affiliate Services
    Replies: 8
    Last Post: 11-22-2009, 04:03 PM
  3. Is the theme coding ok
    By Newjabber in forum Wordpress - Web Design - Coding - Technical
    Replies: 0
    Last Post: 03-17-2009, 04:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Powered by vBulletin® Version 4.1.5
Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.
SEO by vBSEO 3.6.0
Affiliate Program Consultant