-
January 25th, 2011, 03:30 AM
#1
push image
Hello,
Is it possible to push image into client browser?
Thanks,
Semua
-
January 26th, 2011, 08:38 AM
#2
-
January 26th, 2011, 02:44 PM
#3
Semua,
As for displaying pushed images in an HTML page, you can use data URI scheme (see http://en.wikipedia.org/wiki/Data_URI_scheme).
Basically, you will push the Base64-encoded image as the value of a field of subscribed item. Your JavaScript code will change the src property if the img to inject the Base64-encoded source.
-
February 7th, 2011, 08:17 AM
#4
Hello,
Rather than do encode image into base64.
Can lightstreamer just push the image file name? and then in client browser, it will replace the old src value in the <img /> tag?
I see in the example folder, all of them are using div / span as a place to put the text.
Thanks
-
February 8th, 2011, 08:56 AM
#5
In that case, you can get the filename field values through the onItemUpdate callback;
from there, you can modify the <img> element by your code.
The StockListDemo, for instance, shows the use of fields that are not associated to cells (see "item_status")
and the dynamical modification of an image filename (though not directly from a field value, in that case).
Note that the filename field cannot be associated with a cell directly,
hence you cannot define your Table by specifying null as the schema descriptor.
If there are no fields to be associated with cells in your item containing the filename field, you can use a NonVisualTable.
There are no simple examples showing the NonVisualTable; however, using a NonVisualTable is simpler than using the other kinds of tables.
-
February 22nd, 2011, 02:39 AM
#6
Ok, it's working now
Thanks,
Semua
Similar Threads
-
By BKnight in forum Client SDKs
Replies: 1
Last Post: April 12th, 2012, 04:29 PM
-
By Cerogil in forum Adapter SDKs
Replies: 7
Last Post: October 29th, 2010, 09:58 AM
-
By atamel in forum General
Replies: 3
Last Post: August 9th, 2010, 02:09 PM
-
By mnanda in forum Client SDKs
Replies: 2
Last Post: July 16th, 2010, 11:04 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 07:35 AM.
Bookmarks