2 Replies Latest reply on Sep 12, 2008 4:39 AM by Newsgroup_User

    Dreamweaver search and replace wild cards

    spirofantasio
      The image tag <img> often includes the attribute ALT in order to display text when passing the mouse over the image.

      But for this to work in Firefox I need to include the attribute TITLE.

      I therefore need to search for all instances of ALT= in my website and include TITLE= along with the same value.

      For instance, search for:

      ALT="lovely landscape"

      and replace with:

      ALT="lovely landscape" TITLE="lovely landscape"

      Because there are so many images I would prefer to use wild cards.

      Is there any way of doing this in Dreamweaver?
        • 1. Re: Dreamweaver search and replace wild cards
          Level 7
          spirofantasio wrote:
          > The image tag <img> often includes the attribute ALT in order to display text
          > when passing the mouse over the image.

          No it doesn't. The alt attribute is to provide alternative text for
          non-visual browsers. Internet Explorer is the only browser that also
          displays alt as a tooltip.

          > I therefore need to search for all instances of ALT= in my website and include
          > TITLE= along with the same value.

          Title is meant to provide additional information about the image, so alt
          and title shouldn't really be the same. However, if all you're
          interested in is displaying tooltips, you do need to duplicate them.

          > Because there are so many images I would prefer to use wild cards.
          >
          > Is there any way of doing this in Dreamweaver?

          Yes. Use Find and Replace with the following settings:

          Search for: Specific Tag img
          With Attribute: alt = (.+)
          Without Attribute: title
          Set Attribute: title = $1

          Also select the Use regular expression checkbox.

          --
          David Powers, Adobe Community Expert
          Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
          Author, "PHP Solutions" (friends of ED)
          http://foundationphp.com/
          • 2. Re: Dreamweaver search and replace wild cards
            Level 7
            And, just in case, before you do this, MAKE A BACKUP of your pages.


            "David Powers" <david@example.com> wrote in message
            news:gadjqd$d2e$1@forums.macromedia.com...
            > spirofantasio wrote:
            >> The image tag <img> often includes the attribute ALT in order to display
            >> text when passing the mouse over the image.
            >
            > No it doesn't. The alt attribute is to provide alternative text for
            > non-visual browsers. Internet Explorer is the only browser that also
            > displays alt as a tooltip.
            >
            >> I therefore need to search for all instances of ALT= in my website and
            >> include TITLE= along with the same value.
            >
            > Title is meant to provide additional information about the image, so alt
            > and title shouldn't really be the same. However, if all you're interested
            > in is displaying tooltips, you do need to duplicate them.
            >
            >> Because there are so many images I would prefer to use wild cards.
            >>
            >> Is there any way of doing this in Dreamweaver?
            >
            > Yes. Use Find and Replace with the following settings:
            >
            > Search for: Specific Tag img
            > With Attribute: alt = (.+)
            > Without Attribute: title
            > Set Attribute: title = $1
            >
            > Also select the Use regular expression checkbox.
            >
            > --
            > David Powers, Adobe Community Expert
            > Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
            > Author, "PHP Solutions" (friends of ED)
            > http://foundationphp.com/