How do you add images to ubiquity preview?
I'm trying to figure out how to add images to Ubiquity I tried using the Google Maps example but couldn't figure out how to replace the map with just an image from a URL.
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
-
Inappropriate?Here's how to add an image to the preview.
The preview itself is like a web page, it has HTML inside. The author tutorial shows that the preview function can take two arguments. The first is "pblock", and pblock.innerHTML has the HTML code that corresponds to the preview.
So if you want, say, the google logo there all you have to do is put this in your preview function:
pblock.innerHTML = '<img src="http://www.google.com/intl/en_ALL/images/logo.gif"/>'
There you go! I'm sure you can go from there and put your own image, or an image that depends on what the user has typed.
Loading Profile...




