Menu

onClick() javascript on image w/o link

Help
Rurouni
2005-07-12
2013-04-26
  • Rurouni

    Rurouni - 2005-07-12

    i'm trying to click on an image that has an onClick() javascript which would take me to a new page.  unfortunately, it's not taking me to the new page.  it's staying on the same page.  any help would be very much appreciated.

    the javascript is:

    <tr>
                                <td align=center><a href="javascript:;" onclick="ShowPhoto(); return false"><img name="photo" src="./images/white_180x120.gif" width=200 border=0 alt="Click to enlarge"></a></td>
                                </tr>

    my code is the following:

    WebImage image [] = response2.getImages();
                   if( image.length != 0 )
                   {
                       for( int i = 0; i < image.length; i++ )
                       {
                           WebLink imageLink = image[ i ].getLink();
                           WebResponse imageResponse = imageLink.click();;
                           if( imageResponse != null )
                           {
                               WebImage images [] = imageResponse.getImages();
                               for( int j = 0; j < images.length; j++ )
                               {
                                if( ssd.parcelImage1.equals( "" ) )
                                {
                                    String tempImage1 = images[ j ].getSource();
                                }
                               }
                           }
                       }
                   }

     
    • Rurouni

      Rurouni - 2005-07-15

      Nevermind, found the solution.  Used WebWindow to solve this.

       

Log in to post a comment.

MongoDB Logo MongoDB