krish80 - Tuesday, March 10, 2009 10:01 PM:
Hi,
While entering the values to the fields. how to show the pop up window & how to get the values from pop up window to the field?
For Example: In textbox control, when the cursor is goes to the filed/click the field, the pop up window should show the list of Messages & we select any one message from the list and the message should appear to the field.
Pls guid me how to do.
Regards,
Krish
tstickel - Wednesday, March 11, 2009 6:00 PM:
Have you looked at the use of Innovator Lists? An Itemtype's property can be defined a type=List instead of type=String or type=Text. If a type=List property is included on a Form then an HTML <select> control with automatically be generated on the form, which presents the user with a selection list. If type=List does not work for you because your list of messages is more dynamic than what is supported by type=List or if your list of messages comes from a separate Innovator itemtype then consider the solution described below. I have developed a solution that you can use to implement the pop-up list of messages. It assumes that you have a moderate level of experience with Innovator customization. Also, I reference 4 files that contain either a screen shot or some text. I tried to insert these files into this reply but I could not get it to work. The best I could do was to upload the files to an area in the Innovator associate with my Forum ID (tstickel). I am not sure how and whether you can access the area, but if you click on my Forum user name it should take you to where the files can be viewed/downloaded. 1. Create an Itemtype (I'll call it kmessages), and include a property called klabel as shown in attached ItemType.gif. The property must be named klabel. Enter an appropriate label (e.g. Messages) and length for the klabel property. Create the associated form for kmessages and use it to enter an initial set of messages. 2. On the form where you want this pop-up list of messages to be used, create an HTML field and enter HTML code similar to what is shown in attached Form.gif. The significant aspects of this HTML code are: <select name="ksupplier".... -> The name used for the Select control must be the same as Field Name on the form. Therefore, it must also be the name of a property on the ItemType that is being viewed/updated via this form. So in Krish's case the field might be called kmsg. ... size="1" style="font-weight: bold" ... -> These are standard parameters for a Select control. Although I set size="1" in this example, I suggest that you set size to a number more than 1. More about this issue is discussed below. ... itemlist="1" itemtype="ksupplier" itemadd="1" .... -> These are non-standard parameters for the Select control!!!! itemlist="1" is used to identify this select control as being special and that it would be recognized by code that I wrote in kLoadList.js. itemtype="ksupplier" specifies the Itemtype that contains the list of entries to populate this control with (It’s the Itemtype created in Step 1, above. So in Krish's case it would be kmessages). itemadd="1" specifies that the Select control will automatically include an <Add> choice as the first entry in the list. This allows the user to dynamically add entries to the list. More about this below. .... onpropertychange="if (event.propertyName=='selectedIndex' && this.selectedIndex!=-1) if (window.handleItemChange) handleItemChange('ksupplier',this.options(this.selectedIndex).value)"> </select> .... -> This onpropertychange parameter triggers Innovator perform an update action when the user selects one of the entries in the list. Note that the call to handleItemChange must have a field name as its first parameter and it must also be the name of a property on the ItemType that is being viewed/updated via this form (so it’s the same property name Specified above in <select name="ksupplier".... So in Krish's case it would be kmsg.) 3. Also on the form where you want this pop-up list to be used you must add a Form Event that calls kLoadList after the form is populated (see attached FormEvent.gif) 4. Finally you must have a client method called kLoadList. See attached kLoadList.txt. When this code is triggered it will search the form looking for Select controls that have itemlist="1". For each one it finds it will populate the list of choices for the Select, optionally inserting <Add> as the first choice. The javascript will also has a function, kLoadListAdd, which will be automatically called if the user selects the <Add> option from the list. This function will display the Form for the user to enter a new entry in the selection table (e.g. it would pop up the Form to insert a new Message). kLoadList.js is generic and would not generally have to be modified. Of course, there are some issues with the implementation that I have not resolved: 1. As I mentioned above there is a problem if you specify size="1" for the Select control. In IE7 (and other Internet Explorer versions), size="1" specifies that the Select control will initially only show one choice and that it will automatically be selected. So if the first choice is <Add> and it is automatically selected then if the user clicks on <Add>, then IE7 says nothing has changed and does not trigger an onChange event. So in this case the user has to select another choice and then select <Add>. If the Select control is set with size="2" or more then this behavior does not occur. 2. When the user does successfully select <Add>, then the kLoadList control will display the appropriate Form to add a new entry into the database and into the list. But I could not figure out a way to get control passed back into kLoadList when the user Saves/Unlocks/Closes the Form. So I added code in kLoadList to pop-up a dialog box asking the user to click "OK" when they are done adding new choices. Unfortunately, when this dialog box pops-up it causes the Form to be minimized (why is this happening ???). So the user has to know that the Form is open and ready for the Insert, but is just been minimized. Of course, if Krish does not want to utilize the <Add> option then just remove itemadd="1" from the Select controls definition. Krish, these instructions have not been verified. So it would be good for someone to test them out. Also, kLoadList has a lot more capability than what you appear to need (e.g. it can handle lists where there is the need for a klabel and a kvalue field, similar to the static Innovator lists).
krish80 - Wednesday, March 11, 2009 11:39 PM:
Hi Tstickel,
Thks for ur reply, am facing the same issue what you have discussed in the last. Hope done it.
actually i have posted quary for displaying Pop up menus (akin to New Window/Form from there i want to retive the values)
Thanks & Regards,
krish
arif - Wednesday, February 8, 2012 5:40 AM:
Hi, Terry Stickel
Sorry to say that I am not getting the images (ItemType.gif, FormEvent.gif etc.) you have referred above. Actually I need to perform the same job of "Relationship Tab Grid" with a "List Box and Button couple".
I have asked with another post on http://www.aras.comhttp://www.aras.com/Community/forums/t/2146.aspx. I have fall in big trouble with that. It would better to have images over [email protected]. Could you please help me?
Regards
Arif
