For all you newbies out there... here is some really simple code for
removing image borders and adding alt tags

Cheers

Troy


-------------------

public synchronized  static void  ImageBorderRemove(CSpHtmlOutputEvent
event, String sAltText) 
  {
       CSpHref  disp_val        =       (CSpHref) event.getSource();
// get handle to href object
       CSpValue val1            =       disp_val.getValue();
// get value of href object
       String   sHtmlText       =       disp_val.getHtmlText();
// get HTML text of href object
           String       sCustomText     =       " BORDER=0 ALT=\"" +
sAltText + "\"";        // String which contains code for zero border and
alternative tag user specified
       String   sPrefix         =       CSpUtil.replaceSubstring     
                                (sHtmlText, " SRC", sCustomText + " SRC");
// Set border to zero and add alt tag
       
       disp_val.setHtmlText(sPrefix);           // return new HTML value to
object
  }

//[[SPIDER_EVENT<href_Home_onBeforeHtmlOutputEvent>
        public   int href_Home_onBeforeHtmlOutputEvent(CSpHtmlOutputEvent
event)
        {
                String sAltText = "Alt text here"; // set the alternate text
for the image
                ImageBorderRemove (event, sAltText);
                
                
                return (PROCEED);
        }

> -----Original Message-----
> From: Gueorgui Nikolov Popov [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, May 14, 1999 12:49 PM
> To:   NetDynamics Forum
> Subject:      [ND] Little problem on an event
> 
> Hi, thank you for helping me.
> 
> I have a problem:
> 
> I have a href with an image, but i want to set border="0" alt="an
> something else" in the <img src> tag of the href.
> 
> How can i add this properties with its values to the img tag ?
> I think that there is an event in which i can change this.
> Thank you again for helping me.
>  << File: Card for Gueorgui Nikolov Popov >> 
_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

Reply via email to