Dynamic Images Show/Hide

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default Dynamic Images Show/Hide

    I have a product page which shows pictures from a access db on a page. Some
    items dont have pictures. What would be an effective way to show a default
    nopicture.gif image in the event the database does not contain an image. Using
    ASP Need help desperatly with this and will pay for a solution.

    Speegs Guest

  2. Similar Questions and Discussions

    1. Show and Hide Layers
      I am using the show and hide layers JS from Dreamweaver. I am using it to have simulated "tabs" on the HTML page, so I have a div set up for Tab1,...
    2. popup menus won't hide - PVII show/hide layers behaviour
      I've used the 'Auto show/hide by PVII" behaviour to create some popup menus for the navigation which make use of divs which appear and disappear....
    3. show hide netscape
      view the followinng page and both Netscape 7.2 and IE 6.0: http://128.164.137.82/sci/Untitled-2.htm When you click the check boxes for the...
    4. show/hide layers
      I've got two layers. The first layer is always visible. The second layer is only visible when you click on the first layer. How do I hide the...
    5. HIde/Show Templatecolumn
      Hi Guys, I have a templatecolumn that only has a edititemplate with a textbox, when not editing it must not be visible. Right now I set the...
  3. #2

    Default Re: Dynamic Images Show/Hide

    <img src='<% If (recName.Fields.Item('colName').Value <> '') Then Response.Write(recName.Fields.Item('colName').Valu e) Else Response.Write('nopicture.gif')%>'>

    Felix
    Felix1 Guest

  4. #3

    Default Re: Dynamic Images Show/Hide

    Thanks Fexlix1 you are the best. I noticed it gives it a blue outline around the nopicture.gif, is there a way to get rid of taht?
    Speegs Guest

  5. #4

    Default Re: Dynamic Images Show/Hide

    Hi Speegs,

    How about this:

    <%IF (rsRecordset.Fields.Item("imagefieldname").Value) <> "" Then%>
    <img src="<%=(rsRecordset.Fields.Item("imagefieldname") .Value)%>">
    <%End IF%>

    This basically hides the image, if there is no image reference in the image
    field. This saves you having to display a blank gif.

    HTH

    Nath.

    "Speegs" <webforumsuser@macromedia.com> wrote in message
    news:d0iph0$sop$1@forums.macromedia.com...
    >I have a product page which shows pictures from a access db on a page. Some
    > items dont have pictures. What would be an effective way to show a default
    > nopicture.gif image in the event the database does not contain an image.
    > Using
    > ASP Need help desperatly with this and will pay for a solution.
    >

    Nathon Jones Guest

  6. #5

    Default Re: Dynamic Images Show/Hide

    Great what if I want to display each as lets say a 100 x 100 thumbnail?

    Steve
    Speegs Guest

  7. #6

    Default Re: Dynamic Images Show/Hide

    Thanks Nathan and Felix you both were right and most appreciative

    Speegs
    Speegs Guest

  8. #7

    Default Re: Dynamic Images Show/Hide

    Hi,

    <%IF (rsRecordset.Fields.Item("imagefieldname").Value) <> "" Then%>
    <img src="<%=(rsRecordset.Fields.Item("imagefieldname") .Value)%>"
    width="100" height="100">
    <%End IF%>

    No problem.

    Nath.

    "Speegs" <webforumsuser@macromedia.com> wrote in message
    news:d0k71e$eq$1@forums.macromedia.com...
    > Great what if I want to display each as lets say a 100 x 100 thumbnail?
    >
    > Steve

    Nathon Jones Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139