Availability: |
| |||
Property/method value type: | Image object | |||
JavaScript syntax: | NES | myBlob.blobImage(aFormat) | ||
NES | myBlob.blobImage(aFormat, aTxt) | |||
NES | myBlob.blobImage(aFormat, aTxt, anAlign) | |||
NES | myBlob.blobImage(aFormat, aTxt, anAlign, aPixWid) | |||
NES | myBlob.blobImage(aFormat, aTxt, anAlign, aPixWid, aPixHgt) | |||
NES | myBlob.blobImage(aFormat, aTxt, anAlign, aPixWid, aPixHgt, aPixBrdr) | |||
NES | myBlob.blobImage(aFormat, aTxt, anAlign, aPixWid, aPixHgt, aPixBrdr, isMap) | |||
Argument list: | aFormat | Image file format | ||
anAlign | The alignment of the image | |||
aPixBrdr | The border value | |||
aPixHgt | The height of the image | |||
aPixWid | The width of the image | |||
aTxt | The alt text for the image | |||
isMap | Whether the image is a map |
The data is pulled out of the database according to the specified parameters. The BLOB can then be displayed as if it were an image in an <IMG> tag.
The format argument should contain an image specifier such as "GIF" or "JPEG" that can map conveniently to a file extension or MIME type.
The remaining parameters to this method mainly correspond to the HTML tag attributes that can be used with an <IMG> tag and are optional.
This method generates the necessary <IMG> tag to place into a document that refers to the BLOb data as if it were an image file on the server. When the document is parsed, the browser will request the image in the normal way; the contents of the BLOB are then returned in response to that request. The browser is not aware that the image data was retrieved from the database and by caching the image in memory when the link to it is placed in the document most of the latency associated with requesting objects out of the database is eliminated, albeit at the cost of increased memory usage in the server backend.
See also: | Cursor.blobImage(),blob object,MIME types |
Prev | Home | Next |
blob object | Up | blob.blobLink() |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |