Non-traditional input using CSS sprites and JavaScript: opinions sought - webforms

My client is very invested in using a bunch of non-traditional inputs in a form we are developing for him. The image below represents various states of the interface with the last indicated it is disabled in the current context. The end users will be trained in how to interact with the inputs.
alt text http://www.nolaflash.com/interface.gif
My idea is that we will develop an image map representing the clickable zones of the image and let the onclick event set a hidden field and change the CSS for the element to move the background sprite to the appropriate coordinates.
What do folks think of this? Obvious flaws other than folks with JavaScript disabled?
I want the end solution to be iPhone/other device friendly.
Your thoughts will be appreciated.

let the onclick event set a hidden field and
change the CSS for the element to move
the background sprite
sounds reasonable

Here is my solution using CSS Sprites and JS
http://egolfplan.com/testform.html

Related

Can images be block-hilighted? (like text)

I'm trying to adapt ckeditor, where the content is not text, but images only, where each image displays a character in the alphabet. (By creating an image from an off-screen canvas object)
Only problem is that users can't do block selections by dragging over them (like you would with text). Is this even possible in the contentEditble world? I was hoping that setting the draggable attribute to false for each tag would do it - but no dice :-(
Any ideas would be greatly appreciated.
Thanks!
Yes:
I've copied the image in the demo and then I'm able to drag select all of them.
I guess that it might be harder to control the selection like you do with text.
I got this to work now. Just had to listen for mouse & key events and handle the selection manually.

Region selection in canvas

I'm setting up an experimental html5 website using canvas.
I am drawing 3 circles all next to each other and all I want to know is how to be able to select them.
I'd like them to become links, in a way. Not tags, since everything's gonna be created using javascript.
Something like kinetic JS : http://www.kineticjs.com/, but without the extra library.
I have found some scripts that are using ghost canvas and contexts, but the examples are for dragging and stuff. I only want to be able to select my shape and execute some code.
Thank you!
I am thinking you might want to look into the IsPointInPath() method. It will help you figure out whether or not the mouse clicked on your canvas object.
See Detect mouseover of certain points within an HTML canvas?
if you are talented in xml i suggest you to use canvas + SVG (http://www.w3schools.com/svg/)
And follow this simple example.
http://jsvectoreditor.googlecode.com/svn/trunk/index.html
regarding to SVG and Canvas , the differences are obvious, as you can load bitmaps in SVG, and you can draw lines using the canvas API. However, creating the image may be easier using one technology over the other, depending on whether your graphic is mainly line-based or more image-like.

rollover image for form

Is it possible to have a rollover effect for an image and a form.
I.e. I would like to have an image, which when the user hovers over, rolls away to reveal a form (like a login or sign up form).
Cant find anything out like there like this so assuming its not possible but thought I'd ask!
Thanks
JD
This is very much possible.
Using CSS, say position: absolute for the image and the form's div.
Then using z-index, make sure that the image lies over the form.
Then you can use the HTML onmouseover event to execute something like a call to Adobe Spry's slide animation effect to neatly accomplish what you're trying to do.
But in my honest opinion, this is unnecessary glitter.

Grow Images on Hover like Google Images

Hey everyone, I am trying to accomplish something with images growing on hover like the fancy grow mouseover effect on google images.
Here is what I have:
http://www.1stbusinessneeds.com/tooltip/tooltip.html
The tooltip is offset and is based on the walter zorn tooltip. What's the best way to have the mouseover popup grow out just like google images (with the text), instead of following the mouse?
(I still need it done with the same tooltip - maybe overwrite it, but it must be present to pass the text and image, it's just the positioning and display method of it that I need help creating, any samples would be appreciated)
You might want to look at JQuery.
this might be a good start http://jsfiddle.net/ZwhEu/

Displaying an image when hovering a label

I'm wondering if there is a simple and quick way of displaying an image when the user hovers a QLabel...
Since QLabel can be used to display QPixmap, I would like to display some kind of "preview" when hovering a QLabel...
Do you guys know how I could manage this ?
Thanks in advance !
You can set the tooltip to use html, including <img> tags. Will that do what you need?
As described in the docs, you can override the object's event handler if you need to do something fancier in a tooltip than can be done by default. (such as selecting a particular area of an image to put in the tooltip)
As long as you set the button size large enough, you should be able to capture the mouse-over events and display on mouse-over... but this seems like a somewhat strange way to go about things. Why not display all the images at first?
For those who are interested in the result proposed by jkerian :
Simply :
MyLabel->setToolTip("<html><img src="+MyImagePathAsString+"/></html>");
Will result in :
Thanks again to jkerian.
I don't know what kind of layout your QLabel is in, but I'm guessing it will cause weird layout changes if you just set the pixmap on the label when mouseovering it. Rather use a tooltip or just display a pixmap freely on the canvas.

Resources