Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: combo box

  1. #1
    New to the CF scene
    Join Date
    Jan 2005
    Location
    Malaysia
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question combo box

    Hi,

    Currently the system is using J2EE. How can I populate the member's policy in the combo box after input member ID?
    For example, this member ID:12345 have 2 policy which are P1 and P2.

    Member ID : 12345
    Policy : "Combo box here will auto populate 'P1' and 'P2' after 12345 input.

    Thanks & Regards

  • #2
    Regular Coder
    Join Date
    Dec 2004
    Location
    Jamaica
    Posts
    592
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Cool

    Well I'm thinking that you already have the alogirthm to calculate/display the user policy based on the user number so here is my simple suggestion:


    Code:
    <input type=text onChange='showPolicy()' name='memberID' value='Enter your member iD'>
    You could include an onChange event in there that when the user enters data in the fields and comes out of the field that policy is shown

    OR
    Code:
    <input type=text onkeyUp='showPolicy()' name='memberID' value='Enter your member iD'>
    You could use the onkeyup event to get a real time showing of the member id. As in, each time the user types a letter the code would be run. I suggest you use the first instance depending on the length of the algorithm... as u might not want to run the code each time the user types a letter if the code is REALLY long... that might just slow up the typin process into the combo box.

    If u wanna use the latter and the code to calculate the policy is LONG then you should include in your code lil things that will exit the code, like say first you could check to see if the string length is okay.... if not exit.....

    Hope something above helps ya!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •