ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

JSP Tiff Image Display

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • JSP Tiff Image Display

    I have a problem in displaying Tiff image in jsp page. I am using Internet Explorer 6.0 . I have installed Tiff Image plug-in from the site www.alternatiff.com. If the location of the image is given directly i can view the image. But through javascript function if I pass the location of the image to the embed tag src then it is not diplayed.

    i have posted the code:

    <html>
    <head>
    </head>
    <SCRIPT LANGUAGE="JavaScript">
    function submitpage()
    {
    alert(document.forms[0].image.value)
    document.forms[0].img.src=document.forms[0].image.value
    alert (document.forms[0].img.src)

    }
    </script>

    <body >
    <form >
    <table border="0" cellpadding="0" cellspacing="0" align=center>

    <tr><td>Image Location : <input type="text" name="image" /></td></tr>
    <tr><td> <embed src=" " alt="Cheque Image will come here" width="600" height="300" name="img"> <tr><td>
    <tr> <td colspan=4 align=center><input type=button name="click" value="Submit" onclick="submitpage()" /></center></td> </tr>

    </table>
    </form>
    </body>
    </html>


    Is there anyother way to view the tiff image.
    Thanks in advance for any suggestions.
    Meera.

  • #2
    Re: JSP Tiff Image Display

    Let's see...where to begin...OK, here goes.

    An HTML document has two sections: a HEAD and a BODY. Your script is not within either section, it's off in neverland between the two. Move the <BODY> tag up to the line above the <SCRIPT> tag.

    The second row and column of your table are not closed properly. You should change the <tr><td> at the end of line 19 to be </td></tr>.

    There is no HTML element (tag) named "embed", so I am assuming this is from the image plug-in you mentioned, yes? If so, how is the browser supposed to know that? You have no DOCTYPE at the top. Did this plug-in come with any documentation at all?

    There is more, but I think that's enough to get you started.
    "Time passes, but sometimes it beats the <crap> out of you as it goes."

    Comment

    Working...
    X