SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: button states

  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2009
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    button states

    Hi

    I am in the middle of contsrtucting a website and have a question about the buttons on my page.

    If you go to: site demo

    You will see quite a few buttons e.g. 1, 2, 3 that when pressed will change the content displayed on the page. The content is controlled by the querystrings generated from each icon.

    What i am trying to achieve is a simple down state graphic for whichever button/icon is pressed.

    For example if button1 is pressed it will display a different graphic (down state button) to show that current video is showing and so on.

    How do i achieve this effect through a page that consists of loops and querystrings?

    I have acheived something similar before but on static html pages, where i give the body id of each page a name, but this page is the same page but the data from the database changes the content.

    I hope it makes sense what i am trying to say.


  2. #2
    SitePoint Zealot gidday's Avatar
    Join Date
    Jan 2007
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi robert475

    If I understand you correctly, how about something like:

    Code:
    <a href="index.asp?productcode=J72537&imageid=6&display=effects&videoeffect=Animation&videoNo=2"></a>
    <%
    If VideoNo = 1 Then
      <img border="0" src="assets/numbers/1downstate.png"/>
    Else
      <img border="0" src="assets/numbers/1.png"/>
    End If
    %>
    </a>
    Then just redo this If Then for each of the VideoNo. Consider Select Case as well to achieve the same effect.
    Joe
    "All that is necessary for the triumph of evil
    is that good men do nothing."

  3. #3
    SitePoint Enthusiast
    Join Date
    Nov 2009
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi gidday

    Thanks for your reply. I will try your approach and update the thread asap to let you know how i got on.

    Thanks


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •