Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: How do I use select/option with menu to change screen elements?  (Read 4273 times)

0 Members and 1 Guest are viewing this topic.

greenber

    Topic Starter


    Rookie

    • Computer: Specs
    • Experience: Experienced
    • OS: Other
    How do I use select/option with menu to change screen elements?
    « on: February 06, 2016, 09:09:45 PM »
    I'm using Microsoft Access. I'm able to (using Dreamweaver CS5) populate a select/option properly. Once selected I want to further populate other display items: once "John Smith" is selected I want to be able to display his address and telephone number; when I select "Joe Blow" I want to display his address and telephone number.(without a page reload)

    How do I do so?Examples would be great. Showing me how that is done entirely in Dreamweaver would be excellent!

    Thank you.

    camerongray



      Expert
    • Thanked: 306
      • Yes
      • Cameron Gray - The Random Rambings of a Computer Geek
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Mac OS
    Re: How do I use select/option with menu to change screen elements?
    « Reply #1 on: February 07, 2016, 06:20:48 AM »
    This is the sort of thing that sounds like it would be easy but is actually somewhat complicated and almost certainly beyond the scope of Dreamweaver.  At the very least you would need to use Javascript to show/hide the appropriate elements based on the name selection, however this would require user details to be loaded into the page at load and then hidden which isn't great from an efficiency perspective.  The correct way to do this without reloading the page would be to use AJAX so your Javascript frontend can get data from the backend server without reloading the page.  When the user selects a name you make an AJAX request to some sort of server backend to get the address.etc which you would then display on the page.

    greenber

      Topic Starter


      Rookie

      • Computer: Specs
      • Experience: Experienced
      • OS: Other
      Re: How do I use select/option with menu to change screen elements?
      « Reply #2 on: February 07, 2016, 11:39:54 PM »
      Yes, I was trying to avoid a reload of the page. If the .value of the select/option is an index into the database and I have an onchange event handler to some function in the header section then I should be able to use that index to read into the database, then dissect the record and then to display what I need, such as
                  address.value= database record ("address")
      and likewise for telephone.value

      Although cumbersome that should work, no? If so then I should be able to pound the appropriate code into Dreamweaver's code view pane? If that works I will have to file that as a new definition of "kludge"!

      greenber

        Topic Starter


        Rookie

        • Computer: Specs
        • Experience: Experienced
        • OS: Other
        Re: How do I use select/option with menu to change screen elements?
        « Reply #3 on: March 08, 2016, 09:43:18 AM »
        (I've been trying to get this *censored* thing to work for over a month and I am frustrated beyond belief. :-( How do you populate a RecordSet within an Onchange event on an Access database? Once I read the record into a RecordSet I can dissect it as needed. Any help? Examples would be wonderful!)