http://www.udev.info
Mail/Login: Password : forgot my password!
[UPDATE MODE]
Back

GHANIFIED! Subfield

Direct link http://www.udev.info/uniface/ghanified-subfield
Written by -GHAN- // Tags: ghanified subfield

Available from : v0.32
needs : -

The subfield is a cute little extension to which looks like a combobox. It adds an additional output container beneath an bound element. As this is bound, its only visible while the parent input field is focused or the mouse points on it.

I started off in v0.3 with this and found this to be stable in v0.32! Previous versions had problems with the mouseovers and clicking. Further to find the right position within the page was a mess. But well ... all this has been solved.

Usage

Javascript SOURCE CODE
Sorry- ... please log-in or register to get this!

The params are plain and easy. The _parent_id is the id of the field, onwhich the subfield has to be connected. The position in the window will be taken from the parent and so the subfield will show up beneath the parent.
The second parameter _my_id lets you choose, on which id the subfield will be placed. This param isnt mandatory. If you just skip it, it will create an id called _parent_id + "_sub".

Example:
If the parent would be "DATE_FIELD" then the subfield would get the id "DATE_FIELD_sub".

Once you have the subfield object, you can do nice stuff with it:
Javascript SOURCE CODE
Sorry- ... please log-in or register to get this!


Preparing the style of the subfield

Sorry- ... please log-in or register to get this!
You will need to CSS classes to be defined in order to style you subfield. I didnt define it as I cant know how you want it to look. Every subfield element belongs to the CSS class "subfield". A good idea is to put a background color in that style. Maybe you would find a tinier text also more fitting than the default size in the page.

Further we will need a CSS class called "subfield_hidden". This class is set when the subfield has to disappear. An example comes here
Nice styles SOURCE CODE
Sorry- ... please log-in or register to get this!



Back to the overview of GHANIFIED! ... a JavaScript ToolKit

Comments

828 view(s) / 2011-03-30 13:51:57 / LAST UPDATED: 2011-08-03 11:48:13