VBS: auto-complete text boxes

Discussion in 'Software' started by sm007hie, Jun 2, 2005.

  1. sm007hie

    sm007hie Private E-2

    A few questions from a n00b:

    1) I'm needing to change some textbox values depending upon what I choose from a combo box. For instance, when a user selects a certain vendor from the dropdown list, I want the remaining text boxes underneath (address, phone, etc) to fill in, depending on what they chose. I've done this for an entire page, but can't figure out how to constrain it to a few text boxes on a page.

    2) I need to figure out how to sort a combo box list. For instance, my current page is for Purchase Orders. I have a combo box at the top, showing all PO #s, for users to click on and it auto-populates the fields below. The records themselves in the table will sort by PO # just fine, but the dropdown list shows the records by when they were created. How do I go about placing a sort on that box?
     
  2. Kodo

    Kodo SNATCHSQUATCH

    sorting should be done via the query to populate your list box in your asp page. The other things should be done via javascript. Look up cascading combo boxes using javascript.
     
  3. sm007hie

    sm007hie Private E-2

    Is there a way to reference a module built in Access through a Data Access page? My database is Access and it's easier for me to code in VBA than it is in script. I would assume there is a way to reference a DLL from a web page... ?
     
  4. Kodo

    Kodo SNATCHSQUATCH

    there is a way to reference a dll from a web page (ASP3 otherwise known as classic ASP)but the dll needs to be registered on the server in order be referenced. Honestly, DAP sucks and you should never use it for the web.

    My vote is for an ASP.NET because you can use events like in VB(A).
     
  5. sm007hie

    sm007hie Private E-2

    OK, forget that. New VBS/JS question:

    I have a checkbox to mark when a work order is completed. I want to make it so when the box is checked, then today's date will be entered to an adjoining textbox. I figured a quick little code would do it, but it won't do anything:

    In VBS:
    <script language=vbscript event=onchange for=statusCheck>
    <!--
    if statuscheck.checked then
    datecompleted.value = date()
    else
    datecompleted.value = ""
    end if
    -->
    </script>

    In JS:
    <script language=javascript event=onchange for=statusCheck>
    <!--
    if (statuscheck.checked)
    datecompleted.value == date();
    else
    datecompleted.value == null;
    -->
    </script>

    BTW, I am working with ASP pages.
     
  6. Kodo

    Kodo SNATCHSQUATCH

    I'm a javascript bozo.. so I can't help you with js other than you're headed in the right direction.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds